TAYU Academy course material · Quant Strategy Development
Text walkthrough
Detecting overfitting
A self-paced text walkthrough, without video or audio. See the article below for worked examples and materials.
Course Notes
1. Understand the core idea of “Detecting overfitting” and explain it in your own words
2. Master this module's focus: Strategy validation
3. Complete the assignment on your own and check it against the reference answer
Overfitting detection cannot prove that a strategy will be effective forever, but it can identify selection bias. Examining sample out-of-sample decay, parameter sensitivity, cost pressure, and baseline swapping can be more reliable than relying on a single metric.
Validation methods include in-sample/out-of-sample splitting, rolling forward (Walk-Forward), and sensitivity testing with cost inclusion. The validation report should list the data range, cost assumptions, number of trades, maximum drawdown, and failed scenarios.
Example: Used for optimization from 2018–2022, and for out-of-sample testing from 2023–2024; if the out-of-sample Sharpe ratio drops from 1.5 to 0.3, it suggests the strategy likely suffers from overfitting.
Freeze the candidate → double the costs → perturb neighbouring values → test out of period → compare with a simple baseline → record every result.
Training net gain of 20%, future -3%, explain why it is not appropriate to simply remove the future interval and report a gain of 20% again.
Deleting failed intervals produces selection bias; it should report attenuation and investigate the costs, distributions, or realizations. New assumptions should be designed with new future validation, not treat the re-tuned results as the original solution.
The net equity gain of the fictional strategy training was 12%, validation was 1%, and the final test resulted in a loss of 3%. After fees increased from 1bp per trade to 3bp, the test loss decreased to −6%. This does not prove that the strategy is always ineffective, but it is sufficient to refute the statement that it "has already been reliably validated." The loss segment during the testing cannot be removed and renamed to something like "training period.
It will be fixed later" is not evidence; a negative result is also a valid research outcome.
This dependency-free script contains small labs for rank correlation, time folds, inventory valuation, covariance risk and rejection paths. The grid part only models buy-on-the-way-down inventory, with no sell-side recycling or real fills; the risk-parity part only demonstrates a given covariance and is not a general optimiser. Work from the report, and do not treat a small lab as a complete production strategy.
python strategy_labs.py1. Out-of-sample testing is essential
2. Walk-forward testing simulates real use
3. A report must state its assumptions and failure cases
Risk warning: leveraged trading in forex, precious metals and similar products carries a high level of risk and you may lose all of your capital, or more. This course is for education only. It is not investment advice and does not promise any return. Example prices and contract specifications are teaching assumptions; always use what your own platform discloses. Past performance and backtests do not indicate future results.
All values, prices, accounts and cases in this course are teaching assumptions; the fixed materials can be reproduced offline. Marking a lesson complete only records your study. It is not a certification, a service approval or a promise of returns. Workbooks and answer files are currently provided in Chinese.
Key Takeaways
Completion records your own study, not verified competence. Exercises use fictional data; no real account or deposit is required.