Algorithmic Trading Curriculum — Commodity ETP & Native Crypto Intraday Edition
Audience: an intermediate-to-advanced Python practitioner building cost-aware, same-session systems for U.S.-listed commodity ETFs/ETPs and exchange-native crypto.
Reference system:
m1-trading-modelis the calibration benchmark, not the target venue architecture. Its production support is XAUUSD M5 and BTCUSD M5 on MT5; XAUUSD is an OTC CFD and therefore appears here only as a clearly labeled legacy/migration benchmark.Status: curriculum architecture v4. Module IDs and file paths remain stable. The titles and scope contract in this file are canonical while individual module bodies and strategy companions await their scope-migration pass.
Contents
- Scope Contract
- Mandatory Strategy and Project Contract
- Learning Philosophy
- Reference-System Calibration
- Canonical Order and Gates
- Part I — Scope, Instruments & Reference System
- Part II — Data, Honest Research & Mandatory Trading Gate
- Part III — Intraday Design, Alpha & Playbooks
- Part IV — Machine Learning & Validation
- Part V — Multi-Venue Deployment & Intraday Strategy Book
- Source and Evidence Standard
- Appendices
- Suggested Study Paths
Scope Contract
This contract decides whether an example, strategy, project, or source is part of this curriculum. It overrides legacy filenames and any stale examples that remain inside module bodies during the migration.
Canonical tradable universe
- U.S.-listed commodity ETFs/ETPs — including physical commodity trusts, futures-based commodity products or pools, and commodity ETNs. The legal wrapper, prospectus, underlying methodology, creation/redemption mechanism, roll method, issuer credit exposure, listing venue, and trading rules are part of the data.
- Exchange-native crypto — initially BTC and ETH spot plus linear perpetual contracts on one or two explicitly approved centralized exchanges. Approval is venue-, account-, jurisdiction-, and instrument-specific; it is not implied by a library supporting an exchange.
Canonical execution horizon
- Research may use ticks, seconds, M1, M5, and M15 for decisions and execution.
- Every position must be closed in its declared U.S. ETP trading session or UTC-bounded crypto session. No strategy carries risk into the next session.
- Completed H1, H4, and D1 bars may provide context, gating, routing, or sizing only. Their release time must be modeled explicitly with causal as-of joins.
- Multi-year history is required for validation. A long historical sample does not authorize a long holding period.
Venue defaults
| Lane | Default operating rule | Required exception handling |
|---|---|---|
| Commodity ETP | Regular trading hours plus declared opening/closing-auction participation | Halts, early closes, auction eligibility, short availability, wrapper events |
| Native crypto | Explicit UTC synthetic session with forced flattening | Maintenance, outages, funding windows, fee tier, mark/index changes |
| Higher-timeframe context | Last fully completed H1/H4/D1 bar only | Release lag, stale state, daylight-saving and calendar changes |
| Short exposure | Allowed only when the specific product/account can borrow or short | Reject or reroute when availability, locate, margin, or venue rules fail |
Extended-hours ETP trading is excluded initially. A crypto project that trades through a funding timestamp must declare that choice and book the actual payment or receipt; funding is never assumed to occur on a universal schedule.
Context-only material
- Direct commodity futures may explain curve, roll, and wrapper mechanics, but are not traded by a canonical strategy.
- Commodity CFDs and commodity perpetuals are market-structure context only.
- XAUUSD on MT5 is a legacy OTC-CFD migration benchmark, not a commodity ETP.
- MT5/MQL5 may be used to compare old and new serving paths, but direct broker and exchange APIs are the canonical deployment architecture.
- Research on excluded markets may be cited only as transfer evidence. It can motivate a hypothesis; it cannot establish an edge in the approved universe.
Excluded from the canonical curriculum
- Individual stocks; equity-index or sector ETFs; FX; bonds; REITs; options; and volatility-ETP strategies.
- Direct commodity-futures, commodity-CFD, or commodity-perpetual strategies.
- Crypto ETFs/ETPs, DEX execution, inverse contracts, dated crypto futures, and illiquid alternative coins in the initial lane.
- Swing, overnight, position, rotation, strategic-allocation, and long-term systems.
- W1 or monthly signal/context bars.
Mandatory Strategy and Project Contract
No strategy becomes canonical because its gross equity curve looks attractive. Before implementation, every module project must create a versioned project card containing all fields below. The project cards are incorporated by reference into every project in this syllabus.
| Contract area | Required statement |
|---|---|
| Identity | Instrument, legal wrapper or contract type, symbol, listing/execution venue, account and data source |
| Horizon | Decision and execution timeframe, maximum hold, and unconditional same-session exit |
| Clock | Timezone, eligible session, auction treatment, funding-window treatment, and forced-flatten timestamp |
| Execution | Order types, quote used for decisions, fill/partial-fill/cancel rules, latency assumption, and rejection behavior |
| Costs | Dynamic spread, fees/commissions, slippage, impact, and any applicable funding or borrow cost/availability |
| Information | Point-in-time product/venue metadata and exact availability of each completed H1/H4/D1 input |
| Risk | Per-trade, per-instrument, per-session, per-day, per-venue, and strategy-book limits; concentration controls; kill and recovery rules |
| Validation | Purged rolling out-of-sample design, embargo tied to label overlap, trial ledger, stability tests, and untouched final period |
| Acceptance | Cost and latency stress, executable-price reconciliation, paper-trading duration/sample target, tolerances, and reject criteria |
A project may use a legacy XAUUSD or BTCUSD MT5 result only as a migration baseline. Its acceptance decision must be based on the declared commodity-ETP or native-crypto instrument, venue, fills, and costs.
Learning Philosophy
- Instrument truth comes before alpha. A commodity ETP share is not the spot commodity, and a crypto last price is not necessarily its mark, index, bid, ask, or executable price.
- Costs and fills are prerequisites, not cleanup. At intraday horizons, spread, fees, slippage, funding, borrow, impact, and missed fills can consume the entire expected move. Modules 22 and 23 therefore precede strategy construction.
- Causality follows release time. Event timestamps, completed slower bars, product metadata, funding schedules, and session calendars enter the system only when they were knowable.
- Prediction is not a trading result. Models are judged by calibrated decisions and net executable P&L under the same risk and cost contract, not accuracy alone.
- Simple baselines earn the right to complexity. A deterministic rule or calibrated linear model is the control for trees; trees are the control for deep learning; realistic scripted execution is the control for reinforcement learning.
- Validation discipline beats model novelty. Purged rolling out-of-sample evidence, trial accounting, cost stress, stability, and paper acceptance are more valuable than another hyperparameter search.
- Every session ends flat. Slower context can change which intraday playbook is active, but it never silently converts the system into a longer-horizon strategy.
Reference-System Calibration
The curriculum uses m1-trading-model to distinguish existing strengths from work
that still must be built. These statements reflect the verified repository, not old
branch plans or archived profiles.
What exists now
- Production support is XAUUSD M5 and BTCUSD M5 only.
- Enabled routes are XAU R0 mean reversion, XAU R2 breakout, and BTC R2 breakout. Do not describe R0/R1/R2 as universally enabled.
- The five-phase causal pipeline covers broker OHLCV; technical and volume-profile features; monthly forward-only Student-t HMM regimes; deterministic candidates; cost-floored future-close triple-barrier labels; route-local XGBoost and calibration; nested rolling walk-forward with purge/embargo; portfolio replay; and immutable bundles.
- Durable strengths include provenance and cache-DAG controls, an experiment ledger, serving golden-parity tests, latency benchmarks, and live WAL-based recovery, reconciliation, and idempotent order intent handling.
- Optuna v12 tuning capability exists, but current production profiles are pinned or bypass tuning rather than optimizing every build.
What must not be claimed
- There is no current
feature/hierarchical-advanced-v2branch and no currentfeat/lstm-modelbranch. - Production remains single-timeframe M5. Generic timeframe parsing does not prove a causal H1/H4/D1 context feed.
- Labels resolve on future closes from the signal close. Conservative M5 OHLC replay is not executable-price or tick-level barrier reconciliation.
- Replays use flat fixed costs/fixed lots and omit dynamic spread, slippage, commission, swap/funding, and market impact.
- Live sizing is operator-entered fixed lots, not volatility- or correlation-controlled sizing.
- MT5 adapters are CFD-centric. The WAL journal is durable operational telemetry, not a complete arrival-price transaction-cost-analysis ledger.
Curriculum response
| Verified gap | Primary modules | Required outcome |
|---|---|---|
| Executable-price and tick reconciliation | M4, M5, M22 | Quote/fill truth plus measured TCA and stressed replay |
| Commodity-ETP and native-crypto support | M1, M4, M24 | Point-in-time instrument master and approved venue adapters |
| Causal slower-bar context | M9, M18 | Completed-bar release service plus ablation evidence |
| Route-local baseline comparison | M17, M19 | Same-fold simple-model bake-offs on enabled routes |
| Robustness beyond one walk-forward path | M6, M19 | CPCV/PBO/deflated-Sharpe and drift evidence |
| Session and book risk | M13, M23, M25 | Forced flattening, risk budgets, co-crash and kill controls |
| Venue/feed portability | M3, M24 | Canonical contracts, reconciliation, shadow and rollback tests |
| Realistic simulator before RL | M5, M21, M22 | M21 remains extension-only until the simulator gate passes |
Canonical Order and Gates
Module numbers and filenames are stable identifiers, not the study order. The five PDF parts implement seven pedagogic stages.
| Stage | Modules in canonical order | Gate before continuing |
|---|---|---|
| 1. Scope, instruments, reference | M0 → M1 → M2 → M3 | Signed scope charter and reference-system gap register |
| 2. Data and honest research | M4 → M5 → M6 | Point-in-time data, reconciled fills, and acceptance report |
| 3. Mandatory trading gate | M22 → M23 | Measured cost surface and approved intraday risk constitution |
| 4. Timing and design | M7 → M8 → M9 → M13 → M14 | Feasible clock, causal context, event/session controls |
| 5. Alpha and routing | M10 → M11 → M12 → M15 → M16 | At least one stable, net-cost, paper-eligible playbook |
| 6. ML and validation | M17 → M18 → M19 → M20 → M21 | Simple baseline beaten honestly; M21 remains optional |
| 7. Deployment and book | M24 → M25 | Shadow parity, rollback drill, and strategy-book approval |
The authoritative PDF mapping is:
- Part I: M0, M1, M2, M3.
- Part II: M4, M5, M6, then the mandatory M22 and M23 gate.
- Part III: M7, M8, M9, M13, M14, then M10, M11, M12, M15, M16. Each existing strategy companion stays immediately after its core module.
- Part IV: M17, M18, M19, M20, M21.
- Part V: M24, M25, then the consolidated appendices.
Part I — Scope, Instruments & Reference System
Module 0 — Orientation, Scope & Evidence Workflow 🎯
File: docs/modules/00-orientation.md
Purpose: turn the scope contract into operational research boundaries before an idea is tested.
Learn and build
- Separate instrument mechanics, an economic hypothesis, statistical evidence, execution feasibility, and deployment acceptance.
- Use a research funnel: primary product/venue facts → preregistered hypothesis → causal data → cost/fill gate → purged rolling test → paper decision.
- Maintain an exclusion log so a convenient dataset cannot silently change the tradable universe or holding period.
Project: publish a scope charter, approved-symbol register, venue due-diligence checklist, and project-card template. The deliverable must reject at least one out-of-scope idea and explain which contract clause it violates.
Module 1 — Commodity ETP & Crypto Market/Venue Mechanics 🎯
File: docs/modules/01-markets-mt5-context.md
Purpose: establish exactly what is owned, owed, quoted, margined, and executable before treating a price series as a tradable instrument.
Learn and build
- Distinguish physical trusts, futures-based products or commodity pools, ETNs, BTC and ETH spot, and linear perpetual contracts.
- Map NAV and market price, premiums/discounts, creation/redemption, roll methodology, issuer credit, exchange auctions, halts, tick/lot rules, fee tiers, mark/index/last prices, liquidation rules, and venue-specific funding.
- Treat prospectuses, product supplements, exchange rules, and current instrument metadata as dated inputs rather than timeless prose.
- Contrast the target lanes with XAUUSD MT5 only as a legacy OTC-CFD migration case.
Project: create a point-in-time instrument master for one physical commodity ETP, one futures-based commodity ETP, one commodity ETN if accessible, BTC/ETH spot, and one linear perpetual. Include wrapper, venue, clock, price fields, tick/lot/minimum, fees, short/borrow rule, funding rule, lifecycle dates, and source retrieval time.
Module 2 — Statistics Refresher for Intraday Model Builders ⭐
File: docs/modules/02-stats-refresher.md
Purpose: refresh only the statistical tools needed to reject fragile intraday claims.
Learn and build
- Returns, conditional distributions, changing volatility, serial dependence, stationarity, and economically meaningful effect sizes.
- Multiple testing, false discovery, confidence intervals, bootstrap dependence, and why thousands of bars do not equal thousands of independent observations.
- Correlation and cointegration for same-session relative value, with breakdown and borrow/funding risk treated as first-class failure modes.
Project: test one preregistered intraday hypothesis on an approved instrument. Report effect size and uncertainty by session, cost regime, and rolling period; log all variants rather than selecting the best result silently.
Module 3 — Research Stack, Contracts & Reference-System Audit 🎯
File: docs/modules/03-research-stack.md
Purpose: preserve the strong causal and operational controls in
m1-trading-model while replacing its single-timeframe, flat-cost, MT5-centric
boundaries.
Learn and build
- Define contracts for point-in-time data, features, candidates, labels, fills, costs, risk, models, bundles, serving, and audit telemetry.
- Trace the existing five phases, provenance DAG, experiment ledger, golden parity, latency tests, and WAL recovery before proposing replacements.
- Produce a keep/extend/retire map rather than claiming nonexistent branches or rebuilding controls that already work.
Project: audit the current repository against the target multi-venue architecture. Every gap must name an owner contract, evidence, migration test, rollback condition, and the module that closes it.
Part II — Data, Honest Research & Mandatory Trading Gate
Module 4 — Point-in-Time Market, Product & Venue Data 🎯
File: docs/modules/04-market-data.md
Purpose: build one causal data plane for exchange sessions, auctions, ETP wrapper state, and continuous crypto venues.
Learn and build
- Store trades, bid/ask quotes, venue timestamps, sequence numbers, candles, and data corrections without confusing last price with an executable price.
- Version product metadata, fees, tick/lot rules, sessions, auctions, halts, funding schedules, mark/index definitions, and futures-based ETP roll methodology.
- Normalize timestamps in UTC while retaining source timezone/calendar semantics.
- Release completed H1/H4/D1 context through explicit as-of timestamps.
- Detect gaps, duplicates, crossed quotes, stale books, outages, late corrections, and vendor/venue disagreement.
Project: build a dual-lane dataset for one U.S. commodity ETP and one approved BTC or ETH market. Reconcile a sample to a second source, publish quality tests and lineage, and prove no incomplete slower bar reaches an intraday decision.
Module 5 — Intraday Backtesting & Executable-Price Reconciliation 🎯
File: docs/modules/05-backtesting.md
Purpose: make historical decisions and exits use prices, ordering, clocks, and constraints that could have occurred live.
Learn and build
- Separate fast vectorized hypothesis tests from event-driven acceptance replay.
- Resolve OHLC path ambiguity conservatively; graduate to quote/tick event replay for short holds and overlapping barriers.
- Model market, limit, stop, partial fill, cancel/replace, queue uncertainty, rejection, halt, auction, latency, and forced flattening behavior.
- Reconcile the existing future-close labels and M5 replay to executable bid/ask and actual paper fills.
- Use purged rolling out-of-sample tests, untouched final periods, trial ledgers, and sensitivity surfaces.
Project: replay one approved M5 setup three ways: legacy close-path, conservative quote-aware, and paper-fill reconstruction. Acceptance requires an explained P&L bridge, no impossible fills, declared flatten behavior, and survival under the M22 cost stress grid.
Module 6 — Performance, Robustness & Acceptance Analytics ⭐
File: docs/modules/06-performance-analytics.md
Purpose: replace one headline score with an auditable decision about edge, capacity, stability, and live readiness.
Learn and build
- Net expectancy, turnover, drawdown, tail loss, implementation shortfall, missed-fill opportunity cost, and risk-adjusted performance without misleading annualization.
- Slice results by instrument/wrapper, venue, session, auction/funding window, side, volatility, spread, event, route, and model version.
- Report confidence intervals, parameter plateaus, cost/latency break-even points, fold dispersion, and multiple-testing corrections.
- Define research, paper, limited-live, and retirement acceptance states.
Project: build an acceptance tear sheet that reconstructs gross-to-net P&L and makes a deterministic pass/revise/reject decision. The same report must compare a legacy route with one approved target-lane project without pretending they share identical costs or market structure.
Module 22 — Costs, Execution & Transaction-Cost Analysis 🎯
File: docs/modules/22-costs-execution.md
Purpose: install the mandatory cost and fill gate before any strategy-family module can produce a candidate for paper trading.
Learn and build
- Measure spread, fees, slippage, impact, adverse selection, missed fills, borrow, and venue-specific funding from quotes, orders, fills, and account records.
- Define decision, arrival, limit, fill, mark, index, and close benchmarks without substituting one for another.
- Build conditional cost surfaces by symbol, venue, session, order type, size, volatility, event proximity, auction, and funding window.
- Turn the live journal into a full decision-to-fill TCA ledger while retaining its recovery role.
Project: instrument one commodity-ETP lane and one native-crypto lane from signal through fill. Produce a gross-to-net TCA bridge, fill-probability model, p50/p90 cost surfaces, and a stress matrix that every later project imports unchanged.
Module 23 — Intraday Risk, Sizing & Kill Controls 🎯
File: docs/modules/23-risk-sizing.md
Purpose: convert fixed lots into bounded, observable risk that cannot outlive its declared session.
Learn and build
- Size from volatility, stop distance, executable liquidity, uncertainty, and instrument contract rules; treat any Kelly estimate as a ceiling, not a target.
- Enforce trade, instrument, route, session, day, venue, and strategy-book limits.
- Control correlated commodity wrappers, BTC/ETH co-movement, spot/perp basis risk, short/borrow failures, stale marks, disconnects, and liquidation distance.
- Define flatten, kill, cool-down, restart, manual override, and exception-audit procedures.
Project: replace fixed-lot paper orders with a deterministic sizing service and risk constitution. Monte Carlo and historical stress must include cost shocks, co-crashes, rejected exits, venue outage, stale data, and failure to flatten on the first attempt.
Part III — Intraday Design, Alpha & Playbooks
Module 7 — Scalping/Intraday Frequency & Feasibility 🎯
File: docs/modules/07-frequency-spectrum.md
Purpose: choose a decision/holding clock that the available data, venue, execution path, and cost budget can support.
Learn and build
- Compare tick, seconds, M1, M5, and M15 designs by expected move, spread/cost share, event rate, latency sensitivity, and effective sample size.
- Distinguish research cadence, decision cadence, order cadence, and maximum hold.
- Reject latency/queue claims that require infrastructure the project does not have.
- Use completed H1/H4/D1 context without lengthening the trade.
Project: create a feasibility frontier for approved ETP and crypto symbols. A candidate horizon passes only if stressed all-in cost, latency, fill rate, capacity, data resolution, and same-session sample count meet preregistered thresholds.
Module 8 — Low-Timeframe Trading Lab (Tick to M15) 🎯
File: docs/modules/08-low-timeframe-lab.md
Purpose: turn one simple setup into a reproducible low-timeframe laboratory where failed feasibility is a valid result.
Learn and build
- Engineer bid/ask-aware entries and exits, spread ceilings, order-state transitions, partial fills, stale-quote guards, and forced session exits.
- Test session-conditional momentum and reversion without cherry-picking a clock after seeing results.
- Reconcile bar, quote, and paper-fill outcomes before optimizing parameters.
Project: implement one simple setup on a named commodity ETP or BTC/ETH spot or linear perpetual. Freeze the project card first; then run rolling OOS, M22 cost stress, and paper acceptance. Report rejection honestly if net edge disappears.
Module 9 — Causal Multi-Timeframe Context for Intraday Entries 🎯
File: docs/modules/09-multi-timeframe-design.md
Purpose: let slower information route an intraday decision without leaking an unfinished bar or creating a longer-horizon position.
Learn and build
- Publish H1/H4/D1 features only after the source bar and any processing lag complete.
- Use slower states as gates, routes, context features, or size modifiers for tick-to-M15 execution.
- Specify stale-context behavior, session/calendar boundaries, and conflict rules.
- Ablate each context layer against the same lower-timeframe signal and cost model.
Project: add one completed-bar context feed to an approved M5 setup. Prove release causality row by row, compare signal-only versus context-gated rolling OOS results, and flatten both variants under the same session rule.
Module 13 — Sessions, Auctions & Funding Clocks 🎯
File: docs/modules/13-seasonality-sessions.md
Purpose: model the clocks that change liquidity, costs, information flow, and operational risk across the two target lanes.
Learn and build
- Represent U.S. regular trading hours, holidays, early closes, opening/closing auctions, halts, and product-specific eligibility.
- Create explicit UTC crypto sessions despite continuous trading; track maintenance, fee-tier effective times, and instrument-specific funding timestamps.
- Separate a prespecified clock hypothesis from a broad calendar search.
- Use session effects as execution/risk controls unless stable OOS evidence supports an alpha claim.
Project: build a versioned clock service and an hour/minute atlas for one ETP and one crypto venue. Preregister one window, include auction/funding treatment, and show both gross behavior and net executable behavior across rolling subperiods.
Module 14 — Intraday Events 🎯
File: docs/modules/14-event-news.md
Purpose: make scheduled and venue-specific events explicit trade, no-trade, or risk-reduction states.
Learn and build
- Construct point-in-time event calendars with release, revision, expected, and actual timestamps where licensed and available.
- Study spread, depth, volatility, rejection, and recovery around macro releases, inventory reports, product events, auctions, funding, maintenance, and outages.
- Separate anticipatory exposure, immediate reaction, stabilization, and embargo windows; do not label a retail-latency race as durable alpha.
- Encode cancel, flatten, cool-down, and resume policies.
Project: preregister one event window relevant to a commodity ETP or BTC/ETH market. Compare no-trade, defensive-flatten, and post-event-entry policies using quote-aware fills, stressed costs, purged rolling OOS, and paper evidence.
Module 10 — Intraday Trend & Momentum ⭐
File: docs/modules/10-trend-following.md
Purpose: test whether directional persistence survives the target instrument’s wrapper, clock, fills, and same-session exit.
Learn and build
- Intraday range expansion, opening-range logic, breakout confirmation, pullback continuation, and volatility-scaled exits.
- Session, auction, event, spread, and completed-bar regime gates.
- Whipsaw accounting, gap-through stops, false-break fill asymmetry, and parameter plateau tests.
Project: compare one deterministic intraday momentum rule on a commodity ETP and one approved crypto instrument. Keep the rule family fixed, adapt only documented market mechanics, and report route-level net OOS and paper results.
Module 11 — Intraday Mean Reversion ⭐
File: docs/modules/11-mean-reversion.md
Purpose: study short-lived overreaction or liquidity imbalance without assuming that every deviation must revert.
Learn and build
- Distance, z-score, band, residual, and short-horizon reversal signals.
- Half-life versus maximum-hold alignment; volatility/trend/event and spread gates.
- Limit-versus-market entry trade-offs, adverse selection, short availability, and stop discipline when the regime changes.
Project: implement one same-session reversion rule on an approved instrument. Estimate parameters only from trailing data, cap time in trade, prohibit averaging without an explicit size rule, and test spread/adverse-selection stress.
Module 12 — Intraday Relative Value ⭐
File: docs/modules/12-statarb-relative-value.md
Purpose: trade a temporary relationship, not a loose correlation, while treating two-leg execution and wrapper/contract mismatch as core risk.
Learn and build
- Economically defensible pair selection, cointegration/residual modeling, dynamic hedge ratios, and rolling breakdown detection.
- Same-session commodity-ETP pairs and approved BTC/ETH spot-perpetual or cross-instrument relationships.
- Legging, asynchronous quotes, fee and funding asymmetry, borrow availability, liquidation/margin interaction, and forced two-leg flattening.
Project: preregister one in-scope pair. The project must include synchronized executable quotes, both legs’ costs, hedge-ratio causality, breakdown stops, a maximum hold, and evidence that net results are not one directional leg in disguise.
Module 15 — Intraday Volatility & Regime Routing 🎯
File: docs/modules/15-volatility-regimes.md
Purpose: route or suppress intraday playbooks when volatility, liquidity, or execution conditions change.
Learn and build
- Causal realized-volatility, range, spread, depth, jump, and volatility-of-volatility features at approved horizons.
- Simple threshold/bucket routers before HMM or other latent-state models.
- State stability, delayed availability, transition costs, minimum dwell, and kill-state design.
- Separate volatility forecasting from evidence that a routed strategy earns net P&L.
Project: route one momentum and one reversion sleeve using a simple causal regime baseline, then compare it with the existing Student-t HMM where appropriate. Report state and route ablations, turnover/cost changes, and failure under transition shocks.
Module 16 — Commodity ETP & Crypto Intraday Playbooks 🎯
File: docs/modules/16-cross-asset-playbooks.md
Purpose: turn isolated studies into venue-specific operating playbooks without pretending commodity wrappers and crypto contracts are interchangeable.
Learn and build
- Playbook cards for physical, futures-based, and debt-note commodity ETP wrappers.
- Separate BTC/ETH spot and linear-perpetual cards with venue, mark/index, fee, funding, maintenance, margin, and liquidation rules.
- Define eligible clocks, event exclusions, regime routes, order tactics, costs, risk, observability, and retirement triggers for each card.
- Treat direct futures/CFD examples only as wrapper or migration context.
Project: produce at least two complete playbook cards: one commodity ETP and one native-crypto instrument. Apply an identical acceptance rubric, not identical market assumptions, and nominate only cards that pass net OOS plus paper gates.
Part IV — Machine Learning & Validation
Module 17 — Route-Local Model Toolbox Beyond XGBoost ⭐
File: docs/modules/17-ml-toolbox.md
Purpose: test whether another model improves a specific enabled route after costs, rather than building a model zoo detached from decisions.
Learn and build
- Calibrated logistic/elastic-net baselines, random forests, XGBoost, LightGBM, and CatBoost under identical features, labels, folds, costs, and thresholds.
- Route-local comparisons for XAU R0/R2 and BTC R2 as legacy benchmarks, then for approved target-lane routes.
- Probability calibration, threshold stability, interpretability, serving cost, and one-standard-error simplicity rules.
Project: run a same-fold bake-off on one enabled route. Select on nested rolling net decision utility, not PR-AUC alone; include calibration, latency, feature drift, trial count, and a simple-baseline retention decision.
Module 18 — Causal Features, Labels & Decision Alignment 🎯
File: docs/modules/18-features-labeling.md
Purpose: ensure every feature and label represents information and an exit path available to the strategy being trained.
Learn and build
- Point-in-time quote, trade, wrapper, session, funding, event, and completed-bar context features.
- Triple barriers aligned to executable prices, maximum hold, spread, fees, slippage, funding, and forced flattening.
- Meta-labeling, overlapping-label uniqueness/weights, provenance-leakage audits, and suspicious-feature investigations.
- Label choices for filtering, direction, return, volatility, and fill probability.
Project: reconcile one existing future-close label set to executable-price labels. Quantify label flips, route performance, cost-floor changes, overlap weights, and the impact of forced session exits.
Module 19 — Financial ML Validation & Model Governance 🎯
File: docs/modules/19-validation-engineering.md
Purpose: make selection uncertainty, repeated trials, drift, and retirement observable before models control orders.
Learn and build
- Rolling nested validation with purge and embargo tied to actual label intervals.
- CPCV, probability of backtest overfitting, deflated Sharpe, trial registries, and stability across time, venue, session, cost, and regime.
- Data, feature, prediction, calibration, execution, and P&L drift monitors.
- Model cards, approvals, shadow mode, limited rollout, rollback, and retirement.
Project: add CPCV/PBO and deflated-Sharpe reporting to a route-local experiment, then create paper-trading drift thresholds with explicit investigate, pause, and retire actions.
Module 20 — Deep Learning as a Controlled Extension ⭐
File: docs/modules/20-deep-learning.md
Purpose: use sequence or representation models only where they beat strong simpler baselines under the same causal and execution contract.
Learn and build
- MLP, convolutional, recurrent, attention, embedding, and anomaly-detection patterns appropriate to noisy intraday data.
- Sequence-window leakage controls, effective-sample limits, uncertainty, seed/window ensembles, and serving latency.
- Representation-engine designs in which a causal forecast becomes one feature for a simpler decision layer.
- HMM state/emission ablations without claiming an unverified development branch.
Project: compare a small sequence volatility model with a simple trailing volatility baseline and tree model. Feed forecasts into one fixed route; require rolling OOS net uplift, ablation, latency compliance, and paper stability.
Module 21 — Reinforcement Learning for Execution Research 🔭
File: docs/modules/21-reinforcement-learning.md
Status: extension only. Do not begin until M5 and M22 demonstrate realistic order, partial-fill, latency, spread, fee, impact, funding, borrow, auction, outage, and flattening behavior for the chosen venue.
Purpose: study constrained execution or control policies without allowing a weak simulator to manufacture an edge.
Learn and build
- State/action/reward design, offline evaluation, behavior-policy coverage, and sim-to-live uncertainty.
- Execution scheduling, cancel/replace, and bounded size/exit control as narrower and more auditable uses than end-to-end alpha discovery.
- Scripted heuristics and supervised policies as mandatory controls.
Project: only after the simulator gate passes, compare one bounded RL execution policy with deterministic order tactics on frozen parent signals. Reject deployment unless net OOS, stress, interpretability, action safety, and paper-fill results beat the scripted control.
Part V — Multi-Venue Deployment & Intraday Strategy Book
Module 24 — Multi-Venue Platform Engineering & Live Deployment 🎯
File: docs/modules/24-mt5-platform-engineering.md
Purpose: preserve hardened operations while moving the canonical system from one MT5-CFD path to explicit U.S. ETP broker and native-crypto exchange adapters.
Learn and build
- Venue-neutral contracts for instruments, calendars, market data, orders, fills, positions, balances, funding, borrow, health, and reconciliation.
- Adapter-specific tick/lot rounding, idempotency, order-state machines, rate limits, sequence gaps, clock sync, retries, outage handling, and dead-letter recovery.
- Training/replay/shadow/live parity, immutable bundles, latency budgets, secrets, least privilege, telemetry, alerts, kill controls, and rollback drills.
- Reuse the current WAL recovery/reconciliation and existing golden parity/latency harnesses; extend rather than falsely claiming they are absent.
- Retain MT5 as a documented legacy/migration adapter, not the architectural center.
Project: implement one paper-capable commodity-ETP adapter and one crypto adapter behind shared contracts. Pass golden-event replay, shadow parity, restart and outage fault injection, reconciliation, kill-switch, forced-flatten, and rollback tests.
Module 25 — Intraday Strategy-Book Construction 🎯
File: docs/modules/25-portfolio-construction.md
Purpose: combine approved intraday sleeves without hiding concentration, co-crashes, shared execution bottlenecks, or session-level loss.
Learn and build
- Normalize sleeve risk by executable volatility, liquidity, uncertainty, and stop distance rather than raw notional or fixed lots.
- Estimate dependence by route, instrument, wrapper, venue, session, and stress state; treat BTC/ETH and related commodity wrappers as potentially one crowded exposure.
- Budget turnover, capacity, venue/account margin, borrow, funding, and shared flattening liquidity.
- Route conflicts, net orders where lawful and observable, preserve sleeve-level attribution, and enforce book/session/day kill limits.
- Monitor edge decay, cost drift, concentration, and acceptance status; pause or retire a sleeve without retraining the whole book.
Capstone: combine two or three paper-approved sleeves spanning both target lanes. Run a UTC-day shadow/paper book whose every sleeve follows its own clock and whose aggregate exposure is flat by the final declared cutoff. Deliver attribution, TCA, risk-limit evidence, co-crash stress, incident drill, and signed go/no-go review.
Source and Evidence Standard
Use sources in this order:
- Current primary product documents — prospectus, product supplement, holdings or methodology, lifecycle notices, and issuer disclosures.
- Current primary venue and regulatory documents — rulebooks, sessions, auctions, halts, fee schedules, tick/lot/minimums, short/borrow rules, instrument metadata, API schemas, mark/index and funding definitions.
- Direct market/account observations — timestamped quotes, orders, fills, statements, and reconciliation records.
- Peer-reviewed research and reproducible technical references — used to frame a hypothesis or method, then retested in the approved universe.
- Practitioner education — background only; never sole support for a mechanism, parameter, performance claim, or venue rule.
Core starting references include:
- SEC — Updated Investor Bulletin: Exchange-Traded Funds, with its explicit caveat that the 1940 Act ETF discussion does not cover every exchange-traded commodity fund or ETN.
- SEC EDGAR for dated product filings and supplements.
- Fidelity — Commodity ETFs: contango and backwardation, as secondary wrapper/roll education rather than evidence of alpha.
- Coinbase International Exchange — Instruments and Coinbase — Funding rate, with venue/instrument-specific verification at implementation time.
- Machine Learning for Trading for the end-to-end research workflow, supplemented by primary library docs.
A mechanics source explains how a product or venue works. It does not prove a profitable strategy. Every edge claim still requires the project contract, rolling OOS evidence, cost/fill stress, and paper acceptance.
Appendices
The consolidated appendices provide:
- a scoped reading ladder;
- primary product, regulatory, venue, API, execution, and validation sources;
- a multi-venue tooling map with MT5 clearly labeled as legacy/migration context;
- a glossary centered on commodity ETP and native-crypto intraday mechanics.
Product and venue documents expire operationally even when their URLs remain live. Every project records retrieval time, effective date, jurisdiction/account context, and the fields copied into the instrument master.
Suggested Study Paths
Path A — Full canonical build
M0 → M1 → M2 → M3 → M4 → M5 → M6 → M22 → M23 → M7 → M8 → M9 → M13 → M14 → M10 → M11 → M12 → M15 → M16 → M17 → M18 → M19 → M20 → M24 → M25. Add M21 only after its simulator gate passes.
Path B — Migrate the current production reference
M0 → M1 → M3 → M4 → M5 → M22 → M23 → M18 → M19 → M24 → M25. The output is an executable-price/TCA upgrade plus one commodity-ETP and one native-crypto adapter; it is not a relabeling of XAUUSD as an ETP.
Path C — Commodity-ETP intraday lane
M0 → M1 → M4 → M5 → M22 → M23 → M7 → M13 → M14 → M10/M11 → M15 → M16 → M19 → M24 → M25. Choose the wrapper before choosing the signal.
Path D — Native-crypto intraday lane
M0 → M1 → M4 → M5 → M22 → M23 → M7 → M13 → M14 → M10/M11/M12 → M15 → M16 → M19 → M24 → M25. Freeze the CEX, spot/perpetual contract, mark/index, funding rule, and UTC flatten window in the first project card.
Path E — Model research after trading truth
Complete M4, M5, M22, and M23 first; then M17 → M18 → M19 → M20. Use route-local simple baselines and executable labels. M21 remains optional until the realistic simulator and paper evidence exist.
Maintained in docs/CURRICULUM.md. Canonical edition v4: commodity ETP and
exchange-native BTC/ETH intraday systems, multi-venue APIs, mandatory costs/risk
before alpha, and same-session exits throughout.