Repository navigation
Merged
Conversation
- mmv2/data.py, fetch.py: stream Binance USD-M bookTicker + aggTrades (data.binance.vision) over HTTPS, verify SHA-256 against the published checksums, inflate in memory and keep one compact NPZ per instrument-day (100 ms top of book + per-bin aggregated trades); nothing raw on disk. - mmv2/config.py: calm, median and volatile weeks for BTC/ETH/LTC/SOL; per-week chronological 4/1/2 train/validation/test split; SOL held out. - mmv2/sim.py: queue-position replay with latency, post-only orders, queue tracking, inventory cap and liquidation at the end; causal market features. - mmv2/policies.py, baselines.py: fixed half-spread grid, Avellaneda-Stoikov (sigma, k from training days; gamma and horizon tuned on validation), the repo's fixed-midpoint quotes and the previous TD3 through an adapter. - mmv2/rl.py, ablate.py, select.py: TD3/SAC with markout or PnL rewards, validation checkpointing and seed ensembles. - mmv2/evaluate.py, stats.py, report.py: one-shot test evaluation, day-block bootstrap CIs, exact sign-flip and HAC paired tests. - tests: fill rules, perturb-the-future no-look-ahead test (catches a one-bin peek), streaming zip and statistics. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Ablations on validation (TD3/SAC, PnL vs 30 s markout reward, residual action, feature set, anchor, inventory penalty) chose SAC with the markout reward; five seeds trained for 600k steps, the validation-best checkpoint of each averaged as an ensemble (mmv2/final_config.json). - Held-out test, evaluated once: no instrument shows a significant difference from the validation-chosen best baseline, and the agent trails the hindsight-best baseline everywhere (not significantly). Pooled it loses -1.17 USDT/h [-2.98, +0.37]; it does improve on the previous TD3. - results/v2: results.md, test results, tuned baselines, ablation summary, frozen agent, data manifest and the site parity log. - README documents data, simulator, baselines, agent, protocol, limits and data credits; v1 documentation kept below. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
train/train_td3.py changed on main in #7 after the manifest was recorded, so the render guard failed on main and on this branch. The replay demo itself runs simulator.replay, which is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A v2 pipeline for market making on real order flow, evaluated honestly on held-out data.
What's new
Result
The agent does not significantly beat the validation-chosen baseline on any instrument. Pooled: agent -1.17 USDT/h [-2.98, +0.37] vs baselines -1.67 [-4.80, +0.98], difference +0.50 [-0.17, +1.36], p = 0.34. It clearly improves on the previous TD3 (+9.19 USDT/h pooled, HAC p = 0.005; day-level sign-flip p = 0.125). Full tables are in
results/v2/results.md.Entry point:
python -m mmv2 all. 107 tests pass.🤖 Generated with Claude Code