Momentum Tracking Adaptive Statistical Arbitrage Strategy
Overview
This strategy builds a dynamic volatility envelope based on the Nadaraya-Watson kernel regression method to generate trading signals of buying low and selling high by tracking the crossover situations between price and the envelope bands. With a mathematical analysis framework, the strategy can adapt itself to the market changes.
Strategy Logic
The core of the strategy is to calculate the dynamic envelope of the price. Firstly, by using a custom lookback window, it constructs the Nadaraya-Watson kernel regression curves of the price (close, high, low) to get a smoothed price estimation. Then it calculates the ATR based on a custom ATR length, and forms the upper and lower envelope bands with near and far factors. When the price breaks into the envelope from below, a buy signal is generated. When the price breaks out of the envelope from above, a sell signal is triggered. By tracking the dynamic relationship between price and volatility-related statistical properties, the strategy adjusts its trading decisions adaptively.
Advantages
- Based on mathematical models with controllable parameters, less probability of overfitting.
- Adaptive to market changes by leveraging dynamic relationship between price and volatility to catch trading opportunities.
- Log scale works well with different timeframes and instruments with varying volatility magnitudes.
- Customizable parameters to adjust strategy sensitivity.
Risks
- Theoretical nature of mathematical models, may underperform in live trading.
- Key parameters need expertise, improper settings may hurt profitability.
- Lagging issue may cause missing some trading chances.
- Vulnerable to whipsaws in highly volatile markets.
Proper optimization, sufficient backtest, understanding key factors and prudent position sizing in live trading could help mitigate these risks.
Improvement Directions
- Further optimize parameters to find best combination.
- Apply machine learning methods to auto-select optimal parameters.
- Add filters to activate strategy in certain market environments.
- Incorporate other indicators to filter misleading signals.
- Try different mathematical model algorithms.
Conclusion
The strategy incorporates statistical analysis and technical indicators analysis to generate trading signals by dynamically tracking the relationship between price and volatility. The parameters can be adjusted based on market conditions and personal needs. Overall speaking, despite the solid theoretical foundation, its actual performance still needs further verification. One should treat it prudently and trade cautiously.
/*backtest
start: 2022-12-04 00:00:00
end: 2023-12-10 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// © Julien_Eche
//@version=5
strategy("Nadaraya-Watson Envelope Strategy", overlay=true, pyramiding=1, default_qty_type=strategy.percent_of_equity, default_qty_value=20)- 1

