Trading Dev AcademyFree quant education

Free lesson · Putting it all together

1 / Define the job and a small research contract

Open interactive lessonPractice calculationsExplore labs

Start with the idea

Putting the course together does not mean using every technique at once. Choose one instrument, one decision and one measurable outcome; add a component only when it solves a stated problem.

Symbols, units & horizon
  • p: assumed chance of the favorable one-session outcome
  • G: favorable gross return as a decimal
  • L: positive magnitude of unfavorable gross return
  • c: round-trip cost as fraction of entry notional
  • μ_net: expected net return per unit of capital actually exposed
  • example horizon: next open to next close

When and why to use this

Use a research contract to decide what data, equations and benchmarks the project actually requires.

Our running example is a hypothetical long-or-cash strategy in a liquid ETF-like instrument. It decides after a completed daily close, may enter at the next session’s open, and exits that session at the close. Starting cash is $10,000; reference price is $100; exposure is capped at 25% of equity. All prices and probabilities are teaching inputs, not empirical edge estimates.

Write the mechanism first. For example, delayed reaction to information might motivate testing continuation after a price move. State a competing explanation such as market beta or chance. Define the universe, horizon, data availability, order assumptions, costs, capacity and rejection criteria before fitting.

Connect each course component to a job: probability describes uncertain outcomes; time series builds causal features; ML estimates a conditional quantity; portfolio mathematics turns forecasts into bounded exposure; execution produces fills; accounting measures actual results. RL is optional and needs meaningful sequential action effects.

The output of this lesson is a research contract. It should specify what would make the idea fail, not merely the metric that would look impressive. A simple long-only baseline and staying in cash provide clear comparisons.

μnet=pG−(1−p)L−c
Model assumptions, derivation and arithmetic

1 / Define the job and a small research contract

  1. List favorable gross return +G and unfavorable gross return −L.
  2. Weight by p and 1−p, then subtract c paid under either outcome.
  3. Keep this per-exposure return separate from account return, which also depends on position size.
Work it by hand

Assumed p=.56, G=.012, L=.008 and c=.001 imply .56×.012−.44×.008−.001=.0022, or 22 basis points per exposed dollar. This is a hypothesis input, not measured performance.

Apply it in a strategy

  • Choose the asset wrapper using the instrument guide.
  • Write the decision timestamp and economic hypothesis; list all alternatives tried.
  • Set the cost assumptions and evidence required before advancing to paper trading.

Research deliverable

Produce a one-page strategy specification with a falsifiable edge hypothesis and a no-trade baseline.

The running example · synthetic teaching inputs

Instrument: ETF-like shares, USD, whole-share lots. Decision: after a completed close. Trade: next open to next close. Capital: $10,000. Risk: 25% exposure cap, assumed daily asset volatility 2%, target daily account volatility .5%. Costs: two 1-basis-point commissions and 8 basis points adverse exit slippage, all based on entry notional. Evidence status: mechanics only; no real prices, estimated edge or broker execution.

Research sources, review dates and limitations

Connection checkpoints: research review

Reviewed 9 October 2026. These checkpoints reuse the existing synthetic capstone and its worked calculations and Python; they are not market-performance evidence. Recent primary research checked: Bysik and Ślepaczuk, Machine Learning-Based Bitcoin Trading Under Transaction Costs: Evidence From Walk-Forward Forecasting, arXiv v1 working paper, submitted 19 May 2026. Abstract and metadata only reviewed. Market: hourly BTC-USDT, approximately 70,000 observations in 2018–2026; exact sample endpoints and implementation were not independently checked. Its relevance is evaluating forecast-to-trade conversion and costs; results do not validate this ETF-like teaching example or establish implementable profitability.

Primary working paper and abstract →

Python implementation

Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.

def hypothesis_expectancy(probability,gain,loss,cost):
    if not 0<=probability<=1 or min(gain,loss,cost)<0: raise ValueError("Invalid hypothesis inputs")
    return probability*gain-(1-probability)*loss-cost

print(hypothesis_expectancy(.56,.012,.008,.001))

Continue learning

Putting It All Together: Build a Complete Trading Research System — all lessons
  1. 1 / Define the job and a small research contract
  2. 2 / Make a point-in-time data contract
  3. 3 / Turn an idea into a causal feature and a baseline
  4. 4 / Replay decisions into fills and net returns
  5. 5 / Add ML, regime models or RL only at a defined interface
  6. 6 / Convert forecasts into constrained portfolio positions
  7. 7 / Turn targets into idempotent orders and handle partial fills
  8. 8 / Reconcile fills, costs, cash and performance
  9. 9 / Run the miniature system and define the promotion decision

Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations