Repository navigation
Tune on point-in-time pairs; re-tuned TrendRider4h overfits - #6
Merged
Merged
Conversation
research.py hyperopt passed no --pairs, so Freqtrade tuned on config.json's live list: today's top 25 coins by volume, a lookahead the rest of the pipeline avoids. It now tunes on the point-in-time universe at the in-sample start, the same pairs the in-sample backtest uses. A test locks this in. TrendRider4hPIT is TrendRider4h with its own parameter file, so re-tuning it on point-in-time pairs can't change the live strategy's parameters.
TrendRider4hPIT (300 trials, in-sample only, point-in-time pairs) raised the in-sample return from +5.6% to +45.6% but fell out of sample: +13.8% against +17.3%, profit factor 1.33 against 1.43, walk-forward 50% against 64%. The original parameters stay; the candidate is kept as evidence. Gates re-run for all five strategies at 1000 and 65 USDT. RESEARCH.md, the README's hyperopt notes and the case study (new section 5.7) are updated.
Merged
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.
Why
research.py hyperoptpassed no--pairs, so Freqtrade tuned onconfig.json's live list: today's top 25 coins by volume. That's a lookahead the rest of the research pipeline avoids. TrendRider4h's own parameters also came from tuning on a hand-picked list.What
Fix: hyperopt now tunes on the point-in-time universe at the in-sample start, the same pairs the in-sample backtest uses. A regression test checks the command.
Experiment:
TrendRider4hPITis TrendRider4h re-tuned that way, with 300 trials on in-sample data only. It has its own parameter file, so the live strategy's parameters are untouched.Result: it overfits.
In-sample went up eightfold; out of sample got worse. TrendRider4h stays the lead candidate.
Gates re-run for all five strategies at 1000 and 65 USDT. The other four reproduce their published numbers exactly.
Docs:
Testing
ruff check .clean,pytest68 passed.