Skip to model research
Systematic Trading ModelsSpecification / Evaluation / Release

How to build a trading model

Specify a causal target, inspect label boundaries, freeze entry identity and preserve experiments before measuring a trading implementation.

Original editorial revision: 10 October 2026. Expanded edition: 14 October 2026.

Research design and arithmetic, not model recommendations. Classification scores are not monetary returns; a registered artifact and a passing software test are not independent strategy validation.

Start with an observable objective and a possible failure

A model-building task needs a target that can be evaluated, not a collection of attractive indicators. Specify the instrument, decision clock, eligible population and observation horizon. A raw causal boundary-recovery objective, a direction label and an account-return objective are different tasks. Choose the authorised entry objective before fitting candidates and state a result that would reject the proposed model.

Write the baseline alongside the target. It must use the same eligible opportunities and available inputs, not a weaker population selected after the model's results are known. Keep abstentions, unknown labels and exclusions in the contract. A model that declines difficult rows can look accurate when only accepted predictions are reported. The first useful artifact is a specification another researcher can implement and challenge; it is not an impressive model name or a screenshot of the best historical curve.

Map source availability and transformation ownership

For every input, identify event time, source release or receipt time, revisions and instrument identity. A date on a data row may describe the observation period rather than when the value became available. Later corrected values cannot automatically be inserted into earlier decisions. Save corporate-action, session and missing-data conventions so a cleaner reconstructed series does not silently become the historical information set.

The scikit-learn pitfalls source explains that fitted preprocessing must respect the training boundary. A pipeline helps enforce transformation ownership but cannot verify an external source's release clock. Record the actual rows used for fitting a scaler, imputer or feature selector. Apply the saved transformation to later evaluation rows without refitting there. A correctly coded pipeline can still leak information if the supplied features themselves were unavailable at the intended decision time.

Test label spans, not just chronological row order

Use invented observation indices one through one hundred for a training region, with a label requiring five later observations. A training decision at index ninety-five can finish its label at one hundred. A decision at ninety-six reaches one hundred and one, outside that declared region, and is ineligible for a fully contained training label. Save terminal-label indices rather than assuming every row before the split is safe.

Chronological split mechanics alone do not inspect those label spans. A configured gap must match the declared information overlap, not a convenient arbitrary integer. Warmup observations can supply earlier context under a defined contract without becoming extra evaluation outcomes. Test missing bars and irregular event spacing separately; five rows need not mean five minutes. These index fixtures establish boundary behaviour in software, not an independently validated market model or a recommended universal gap.

Preserve the candidate family and freeze the entry

Record candidate identities, features, parameters, fit rows and authorised ranking metric, including rejected variants. Do not report only the winning configuration while pretending it was the only attempt. A larger candidate family creates more opportunities to discover a flattering result. Save who had access to each evaluation region and when a decision became final.

Freeze entry identity on its raw causal objective before applying the selected exit. Use one predeclared exit for the experiment; exit-adjusted return, profit factor or holding drift can validate, reject or constrain implementation, but must not retrospectively define the entry ranking. Reopening an exit tournament after validation consumes the observed information. If a genuinely new experiment is authorised, retain the old identity and recognise which samples are no longer untouched. An experiment registry can preserve these facts only if the artifacts are actually supplied.

Validate the prediction and the action as different layers

A prediction score needs labels, class counts, thresholds and uncertainty assumptions. Economic validation additionally needs the action, fill convention, quantities, costs, exposure and account accounting. A correct direction can be unprofitable at the available spread; a missed prediction can have a small loss under one exit and a large loss under another. Do not present prediction accuracy as a realised return.

Keep research fills under their declared observation-window convention distinct from actual broker executions. Preserve native exit and maximum-hold policy instead of simplifying it for a prettier backtest. A software unit test verifies implementation, not strategy skill. Independent evaluation needs genuinely reserved observations and an inspectable frozen contract. This guide supplies no training dataset, fitted model or live account, so it does not invent accuracy, profit factor, statistical significance or a successful production result.

Package the model before discussing deployment

A reproducible research package contains source versions, causal input map, fitted artifacts, candidate history, entry freeze, exit policy and evaluation outputs. Pin dependencies and attach tests for boundary, missing-input and accounting behaviour. MLflow's tracking documentation describes software for retaining parameters, metrics and artifacts; logging an unsupported claim does not make it true or independently verified.

Deployment is a separate task with revision, gate, active route and durable cloud execution evidence. A model file, endpoint inventory or research live label cannot establish customer availability. Normal production must continue with personal computers off; local research and correctness tests can remain local without becoming production dependencies. Use the blank construction record to keep these layers separate. A complete package may validly conclude that no candidate passed, rather than promoting a weak model simply because a build pipeline completed.

Review checkpoints

Evidence requests, not completed study results
ObjectPreserveDo not infer
DataAvailability and transformation fit ownershipChronological dates guarantee causal features
SelectionCandidate history and frozen entry objectiveExit-adjusted winners define entry skill
ReleaseResearch, gates, revision and cloud routeA saved model is a deployed product

Download blank review record (CSV)

Headers only. No trades, subscriber outcomes or operating receipts are supplied.

Source documents

Documentation establishes the stated mechanism, not tested trading performance. Checked 10 October 2026; a later version can differ.

Detailed research

Complete the card without fabricating completion

Fill the input, availability, target, transform, entry objective and action contract before asking a result to validate it. Where an artifact does not exist, write absent rather than a plausible invented hash. Distinguish specification completeness from fitting, evaluation and independent master completion. The boundary-classifier card is fully described but has no learned parameters; its supplied count table is fictional. That difference is useful to expose. A documented design can guide genuine research later, while its missing source and master remain missing today. Do not promote an educational card or a component fixture into a certified trading model.