Repository navigation
feat(testnet): testnet runner, weekly comparison infra, SMF known-answer tests, and validation audit - #12
Merged
Conversation
- Add interval param (default 1m) to BinanceFeed.__init__
- Change _build_url() to stream @kline_{interval}
- Rewrite _handle_message() for kline schema with nested k object
- Add _kline_start to event data
- Update docstrings for kline feed
- Use function-level lazy imports
- Add 4 unit tests for kline parser (fields, skip non-kline, combined stream, open candle)
Add percentage-based stop-loss, take-profit, and trailing-stop exits before existing ATR-based exits in all SMF cells across 3 templates. - swing.yaml: SL 3%, TP 5%, TS 2% (trend); SL 2%, TP 3% (reversion) - intraday.yaml: SL 1.5%, TP 2.5%, TS 1% (trend); SL 1%, TP 2% (reversion) - scalping.yaml: SL 0.8%, TP 1.5%, TS 0.5% (trend); SL 0.6%, TP 1.2% (reversion) - Non-SMF cells (swing_reversion, swing_momentum, intraday_volume_breakout, scalping_reversion) left unchanged
Move debug log after _calc_atr() so ATR value is available for display. Show both pct and ATR exit values: SL_pct, SL_ATR, TP_pct, TS_pct, TS_ATR, TS_min, TS_max, Z, and computed ATR.
- Update BinanceFeed component table to show @kline_1m - Add exit management section with pct + ATR layer docs
… event root; sync spec/design values
- Pre-set entry/short_entry smf_strength to > 0.3 (was > 0.4) - Optimized ADX period 38, threshold > 27 (was 14 / > 20) - Optimized exits: SL 6.0%, TP 4.3%, TS 3.0% - Tightened ATR exits (atr_mult 0.5, 0.6) - Adjusted risk sizing to 0.035, max_positions 3
Add comprehensive validation tests for the indicator infrastructure: - Known-answer tests (19 tests): EMA, ATR, Donchian, buy-and-hold benchmark, and insufficient-data guards using synthetic data - Cross-validation tests (45 cases): 9 exact-match indicators validated against pandas_ta across 5 real symbols with 1e-8 tolerance - Edge-case tests (6 tests): NaN propagation, constant-price RSI=50, zero-volume VWAP, hand-calculated VWAP verification - Golden fixture schema: tests/golden/schema.json for future snapshot testing RSI/ATR/ADX excluded from cross-validation matrix: pandas_ta uses Wilder RMA (alpha=1/N) while the project uses SMA/rolling-mean. These are covered by known-answer tests instead. Part of: sdd/auditoria-validacion-infraestructura (Phase 2)
…nown-answer tests - Add _scripts/run_testnet.sh: continuous paper-trading runner - Add _scripts/weekly_compare.py: parallel backtest + signal comparison - Add _scripts/run_weekly_compare.sh: weekly wrapper - Add tests/test_smf_known_answers.py: 27 known-answer SMF tests - Add Guia_testnet.md: quick reference guide - Enable regime_filter on swing_smf + intraday_smf YAML - Restrict enabled_strategies to 2 SMF strategies in config
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.
Summary
Changes
Test Plan
Notes