Testing Training Window Lengths and Probability Thresholds for Financial ML
Summary
The document outlines an experiment for studying how training-window length and predicted class-probability thresholds affect a financial prediction strategy. It constructs directional labels from returns and uses lagged returns and volatility measures as model inputs. Logistic regression is trained with rolling time-slice resampling across a range of fixed window lengths, then evaluated using probability cutoffs to decide whether to take long, short, or no exposure.
The supplied analysis code compares cumulative returns with the underlying and calculates profit factor and annualized Sharpe ratio across windows and thresholds. It also creates plots of equity curves and performance surfaces to inspect sensitivity rather than relying on classification accuracy alone. However, the document provides code and headings without presenting the resulting figures or conclusions. The example therefore describes an experimental design, not evidence that a particular window or threshold is superior; transaction costs, robustness checks, and full out-of-sample results are not established in the text.
Key ideas
- The example uses lagged returns and volatility features to predict the next directional outcome.
- Rolling time-slice resampling compares models trained on different fixed history lengths.
- Probability thresholds determine whether predictions produce long, short, or flat positions.
- Profit factor, Sharpe ratio, and equity curves assess trading outcomes across model settings.
- The code does not report its results, so it cannot establish a best window or threshold.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.