--- license: other license_name: mixed license_link: LICENSE pretty_name: How Long Must a Trading Track Record Be? (code and data) language: - en tags: - finance - backtesting - monte-carlo-tree-search - bayesian - sharpe-ratio - reproducibility size_categories: - 10K.npz` | | `sim/experiments.py` | tests, `results.json`, `tables/*.tex`, `fig/*.pdf` | | `sim/robustness.py` | 20 random seeds and prior sensitivity → `seeds.json`, `tables/seeds.tex`, `tables/sensitivity.tex` | | `sim/synthetic.py` | size and power on synthetic markets → `synthetic.json`, `fig/power.pdf` | | `sim/market_making.py` | stylized market maker (Avellaneda–Stoikov quotes, sniping, fees, latency) → `mm.json`, `tables/mm.tex`, `fig/mm.pdf` | | `data/*.csv` | frozen daily closes: BTC, ETH, BNB, XRP, LTC, ADA (vs USDT, to 2026-11-15); SPY, QQQ, GLD, TLT (adjusted, to 2026-11-13); `irx.csv`: 13-week T-bill yield | | `out/*.npz` | cached daily positions (lets you skip the slow `positions.py`) | | `results.json`, `synthetic.json`, `seeds.json`, `mm.json` | all numbers reported in the paper | | `tables/`, `fig/` | the tables and figures the paper includes | ## Reproduce ```bash pip install numpy pandas scipy matplotlib cd sim python3 positions.py # ~25 min on 7 cores (optional: out/ is included) python3 experiments.py # ~25 min python3 robustness.py # ~3 h on 7 cores (MCTS dominates) python3 synthetic.py # ~10 min python3 market_making.py 2 # ~6 min on 2 cores ``` Do not rerun `fetch_data.py` if you want the paper's numbers: new prices change every result. Random seeds are fixed in the code. ## Licenses - Code (`sim/`): MIT. - Outputs (`results.json`, `synthetic.json`, `seeds.json`, `mm.json`, `tables/`, `fig/`, `out/`): CC BY 4.0. - Price data (`data/`) come from Binance and Yahoo Finance and remain subject to their terms of use; they are included only so that the results can be reproduced. Not investment advice.