sam
cfc27a38de
Rewrite as a probabilistic model with walk-forward evaluation.
...
Replace the 2024 model (model.py, ~2000 lines) with the btcmodel package, the
baseline for future work:
- Forecasts are quantiles of log price at each horizon, scored with CRPS in a
walk-forward backtest (origins every 30 days from 2014, horizons 1 month to
4 years). Skill is relative to a zero-drift random walk, with circular
block-bootstrap intervals and a count of independent windows.
- Development data stops at 2024-11-26, the last day the 2024 model saw.
Later outcomes are a holdout, scored only by `backtest --holdout`.
- Models: random_walk, drift_rw, and cycle (the 2024 model's cycle-position
drift, now kernel-smoothed and recency-weighted). On development data
nothing beats the random walk with confidence; cycle loses at every horizon.
- Prices: the Investing.com archive moves to data/ (cut at 2024-11-26; its
last row was intraday) and is extended with Coinbase daily closes by
`update`.
Also: Nix flake dev shell (Python 3.13, pandas 3), ruff in place of black,
pytest suite, and a rewritten README. NOTES.md is removed as inaccurate, and
poetry is dropped.
2026-09-24 02:19:02 -07:00
sam
eefff47070
Merge branch 'next' into mkt-fndm
2024-11-26 19:46:13 -08:00
sam
f89fd3bb4e
Update prices.
2024-11-26 19:46:08 -08:00
sam
8d2d351bbb
Merge branch 'next' into mkt-fndm
2024-11-26 00:49:58 -08:00
sam
525d3ba634
Add CDPR plot.
2024-11-26 00:49:54 -08:00
sam
49872447ab
Merge branch 'next' into mkt-fndm
2024-11-25 22:44:46 -08:00
sam
2a13b4ef46
Update prices.
2024-11-25 22:44:36 -08:00
sam
66d7e4329e
Merge branch 'next' into mkt-fndm
2024-11-20 23:30:11 -08:00
sam
3869ced1ff
update prices
2024-11-20 23:30:02 -08:00
sam
7223144b13
Use S2F metrics for trend analysis.
2024-11-19 08:45:40 -08:00
sam
f77cc955db
Improve CI coverage.
2024-11-19 08:12:42 -08:00
sam
96fdf5a88e
Use market fundamentals intsead of empirical era adjustments.
2024-11-19 07:59:13 -08:00
sam
d2ac5749dc
Manage output files in less-janky fashion.
2024-11-17 17:14:44 -08:00
sam
7211ed1723
Update prices.csv
2024-11-17 16:01:28 -08:00
sam
84464151be
warn when val period shorter than projection period
2024-11-17 15:59:33 -08:00
sam
ca69495071
it's an error not to provide halving dates
2024-11-17 15:53:14 -08:00
sam
41c62e1af2
Use more conservative 1e-6 to prevent division by zero.
2024-11-17 15:52:35 -08:00
sam
3158d7479d
Actually use long-term vol in adaptive calculation.
2024-11-16 21:56:39 -08:00
sam
50f3f76830
Update prices.csv.
2024-11-16 21:47:55 -08:00
sam
56f669ac0f
Fix projection plot bugs.
2024-11-16 21:46:31 -08:00
sam
06f5620cb3
New, streamlined NOTES.
2024-11-16 21:37:24 -08:00
sam
5679d99ece
Add adaptive volatility window.
2024-11-16 21:33:38 -08:00
sam
3d6397da21
Add Claude's notes from the last revision.
2024-11-16 21:08:31 -08:00
sam
f023f7e999
Improve uncertainty estimation.
2024-11-16 20:23:59 -08:00
sam
453df222d6
Tweak the backtests.
...
* Start from 2011 instead of 2013.
* Validate over two years instead of one.
2024-11-16 20:00:58 -08:00
sam
47b2ce1476
Use ruff linter.
2024-11-16 14:07:24 -08:00
sam
db45b14882
Add notes on new backtesting framework.
2024-11-16 03:38:24 -08:00
sam
bbd7d493b7
New systematic backtest framework.
2024-11-16 03:20:21 -08:00
sam
f5bed410ae
More helpful additions to workflow.
2024-11-15 22:48:17 -08:00
sam
1e8c6ba75e
Add Claude's notes from recent session.
2024-11-15 22:48:03 -08:00
sam
e484331196
Tuning session; removed market maturity.
...
The market maturity score only complicated the model with no clear
benefit. Still working on getting the various backtests tuned.
2024-11-15 18:07:33 -08:00
sam
b9cf04aed7
Run more projections from various start dates.
2024-11-15 16:48:33 -08:00
sam
2b7abecdcb
Add justfile to simplify organizing results for comparison.
2024-11-15 16:36:52 -08:00
sam
502b47842e
Add updated notes from Claude.
2024-11-15 15:16:31 -08:00
sam
368878a482
Add era-aware market maturity adjustments.
2024-11-15 15:12:36 -08:00
sam
294c665106
Merge branch 'new-backtests' into market-maturity-backtests
2024-11-15 14:08:22 -08:00
sam
4975e1647d
Fix create_plots() output.
2024-11-15 14:08:16 -08:00
sam
8f94c60034
New backtest suite proposed by Claude.
2024-11-15 13:57:36 -08:00
sam
b024a38040
Improve volume handling in market maturity calculations.
2024-11-15 13:48:14 -08:00
sam
b018296a51
Add market maturity projection adjustments.
2024-11-15 13:37:14 -08:00
sam
5b80eac207
Run projections and backtests in parallel.
2024-11-15 10:22:12 -08:00
sam
16ce8823f3
Add Claude's notes on current model.
2024-11-15 02:09:11 -08:00
sam
f9b8af828a
Implement trend smoothing.
2024-11-15 01:59:19 -08:00
sam
36eda3eb3e
Add improved vol calculation.
2024-11-15 01:22:16 -08:00
sam
588c4a8fa4
Switch to simpler log-based projection.
2024-11-14 22:29:34 -08:00
sam
3e96a320b9
Implement some basic backtesting.
2024-11-14 20:43:25 -08:00
sam
5fa358e6ae
Clean up the code.
...
- Re-order functions.
- Remove older projection methods.
- Format with black.
2024-11-14 20:05:27 -08:00
sam
5e1908f4c9
Fix date of fifth halving.
2024-11-14 17:06:09 -08:00
sam
ed9426afd5
Update example projection with more time points.
2024-11-14 17:03:00 -08:00
sam
1a419f439f
Add more time points to last plot.
2024-11-14 17:02:35 -08:00
sam
6f070303e5
Give credit where it's due.
2024-11-14 16:54:42 -08:00
sam
e964c97eac
Initial commit.
2024-11-14 16:53:12 -08:00