Skip to content
Methodology

Every result should carry its own history.

Backtests are easy to produce and easy to fool yourself with. This page follows a strategy through Foundry’s method, step by step, and then sets out the principles behind each step.

Step 01In development

Frame the hypothesis

Research starts with a question, not a strategy. A Research Campaign groups the work on one problem: the instruments, the dataset family, the strategy grammar and the objectives. Everything that follows is counted against that campaign.

  • Research Campaign
  • Dataset family
  • Objectives
TAKES · A research question and market dataPRODUCES · A Research Campaign
Spec §5 steps 1–7, §13.1 · Pre-registration / protocol lock is planned for v0.5
Step 02In development

Construct strategies

Candidates are built from a typed search space and expressed as Strategy IR inside a versioned Strategy Package. The same search space and seed are designed to produce the same candidates, and duplicates are rejected before testing.

  • Typed search space
  • Strategy IR
  • Deterministic seed
TAKES · The campaign’s search space and seedPRODUCES · Candidate Strategy Packages
Spec §6–7, §10 · Roadmap §4.1
Step 03In development

Backtest under declared assumptions

Each candidate is evaluated with an explicit Execution Contract: bar-close signals, next-bar-open fills on the executable side, gap-aware stops, pessimistic intrabar resolution and modelled costs. Results are tied to fingerprints of every input.

  • Execution Contract
  • Bid / ask
  • Content-addressed
TAKES · Strategy Package, dataset and Execution ContractPRODUCES · A reproducible backtest record
Spec executive summary, §5 step 6 · Roadmap §4.2
Step 04In development

Test robustness, then the holdout

Promising candidates move through out-of-sample and walk-forward windows and a robustness battery. Finalists then face the Final Holdout: untouched history, evaluated once, with the exposure recorded.

  • Walk-forward
  • Robustness battery
  • Final Holdout
TAKES · Backtests of promoted candidatesPRODUCES · Robustness evidence and a holdout result
Spec §13.2–13.3 · Roadmap §1.2
Step 05In development

Generate the evidence

Every test result becomes evidence attached to the strategy: trial counts at selection, the Deflated Sharpe Ratio, promotion and rejection reasons. The validation state is decided from that evidence, not from a single score.

  • Deflated Sharpe
  • Trial counts
  • Promotion reasons
TAKES · Test results and the campaign’s trial historyPRODUCES · A validation state: Rejected, FINALIST or VALIDATED
Spec §13.3, §15 · Roadmap §1.1
Step 06In development

Reproduce and review

Software version, Strategy Package, dataset fingerprint, campaign ledger, seed and validation policy are enough to rebuild the experiment. Lineage shows how the strategy evolved, so the work can be checked.

  • Six recorded inputs
  • Lineage
  • Export fingerprints
TAKES · The recorded inputs and lineagePRODUCES · A result that can be rebuilt and challenged
Spec §1, §15 · Portable reproducibility bundle is planned for v0.2
01 · Reproducibility

If it can’t be rebuilt, it can’t be trusted.

Generation, execution and validation are designed to give identical results when their inputs and seeds are identical. Any experiment is intended to be reconstructable from six recorded inputs.

Fig. 1 — What reconstructs an experiment
Software version
Strategy Package
Dataset fingerprint
Campaign ledger
Seed
Validation policy
Reproducible experiment
02 · Explicit execution assumptions

Rules are not enough.

When a signal is evaluated, where an order fills, how a gap or an ambiguous bar is resolved: each changes the result. Foundry’s approach is to declare these choices rather than leave them implicit in one engine, and to make unsupported semantics fail loudly instead of quietly approximating them.

Fig. 2 — The Strategy PackageSpec §6
Strategy Packageversioned · the unit Foundry tests and exports
  • 01Strategy IRLogic, calculations, orders, sizing and risk.
  • 02Execution ContractWhen signals evaluate, where orders fill, how costs apply.
  • 03Instrument SpecificationContract, sessions, volume rules and broker constraints.
  • 04Account SpecificationCurrency, capital, margin model and conversion.
  • 05Data ManifestDataset identity, source, timezone, spread basis and quality.
  • 06Validation PolicyRequired tests, thresholds and holdout rules.
  • 07ProvenanceSoftware version, seed, campaign IDs, lineage and search counts.
03 · Robustness testing

Break it on purpose.

A strategy that only works at one parameter value, one spread or one ordering of trades is a fragile description of the past. Foundry is designed to stress each finalist and keep the results as evidence, not a single score.

Walk-forward
Does it hold up across successive, unseen periods?
Parameter perturbation
Does it survive small changes to its own settings?
Execution stress
Does it survive wider spreads, more slippage, higher commission?
Monte Carlo
Does it depend on one lucky ordering of trades?
Data perturbation
Does it depend on exact price observations, where perturbation is methodologically defensible?
Data quality grading
Were gaps, duplicates and timezone issues found in the data before testing?
04 · Selection bias & overfitting

Search enough and something will look good.

The more strategies you try, the more likely the best one is luck. Foundry is designed to count every trial in the Research Campaign, always show the Deflated Sharpe Ratio, and keep one slice of history untouched until the end.

Fig. 3 — How history is dividedSpec §13.2 · Schematic
In-sample
OOS
Walk-forward
Final Holdoutuntouched · once
DEVELOPMENT / DISCOVERY REGION · used for selectionSELECTION-FREE

Once out-of-sample or walk-forward results are used to choose strategies, they are no longer truly unseen. The Final Holdout keeps one last selection-free evaluation, and the campaign records when it has been used.

  • Campaign-level trial counting

    Trials accumulate across reruns. Starting a new campaign is allowed, but Foundry is designed to state what that means statistically.

  • Deflated Sharpe Ratio

    Adjusts the headline Sharpe for the amount of searching. Always calculated and shown; it can’t be switched off.

  • Finalist is not validated

    Passing development tests makes a strategy a finalist. Only the validation policy, including the Final Holdout where the policy requires it, can make it validated.

05 · Lineage & evidence

Why it passed should be answerable.

Foundry aims to explain why a strategy is a finalist, validated or rejected from machine-readable evidence, rather than hiding the decision behind one robustness score. Every promotion keeps its trail.

Fig. 4 — Evidence trail of one finalistSchematic
  1. Generated in Research CampaignSeed, search space and trial number recorded
  2. Passed development baselinePromotion reason recorded
  3. Static IS / OOS and walk-forwardWindows and exposure state recorded
  4. Robustness batteryPerturbation, stress and Monte Carlo evidence kept
  5. FINALISTDSR and campaign trial count at selection
  6. Final Holdout → VALIDATEDHoldout marked as used for the campaign
06 · Local-first

Your research stays on your machine.

Core research is designed to run without an account, a hosted backend or uploading your data. Foundry aims to stay useful on ordinary hardware, such as an 8 GB Apple Silicon laptop.

  • No account

    Core research needs no sign-in.

  • No upload

    User data stays on the machine.

  • No hosted backend

    Research runs locally.

  • Commodity hardware

    Bounded parallelism and streaming data paths.

Foundry’s walk-forward and optimisation design draws on established practitioner methodology for evaluating trading strategies, and on published statistical controls for selection bias such as the Deflated Sharpe Ratio. Research software can’t remove market risk, and historical backtest results, however carefully validated, do not guarantee future trading outcomes. Nothing here is investment advice.

Be first to test Foundry.

Early-access registration. No download or subscription is available yet.

Join early access