Using Oscillator Signals to Label Trades Without Look-Ahead Bias
Summary
The article proposes labeling machine-learning training examples from oscillator states available at the time of a trading decision. RSI, CCI, Stochastic, Bollinger Bands, and a Fourier-based method are among the examples. Values beyond overbought or oversold thresholds label sell or buy signals, while values between thresholds become no-trade labels. The approach aims to avoid the future-price labels that can leak information into training and inflate historical results.
An experimental RSI labeler additionally checks whether a trade later proved profitable, but the article explicitly recognizes that this introduces look-ahead bias. Oscillator parameters and thresholds require selection, and signals can be unreliable across instruments. Since oscillators are reversal-oriented and may remain extreme during trends, the method is presented as more suitable for ranging markets. The article includes code descriptions and a small study, but the supplied text gives no quantified out-of-sample results. It also notes that labels that avoid look-ahead do not account for spread, which can materially affect tested performance.
Key ideas
- Oscillator values known at decision time can define training labels without using future price moves.
- The examples map overbought and oversold readings to sell and buy labels, with a neutral label between thresholds.
- A profitability-check variant uses future outcomes and therefore reintroduces look-ahead bias.
- Oscillator choice and threshold settings need testing across instruments, and reversal signals can struggle in trends.
- Spread is not included in the no-look-ahead labeling, so it can change strategy test results.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.