Table of Contents
In backtesting against 20 years of gold data, if my cost is around $1000, should I be concerned with the 2003-2010 period, since gold prices were significantly different after 2010, or should I add more cost for this test?
When backtesting against 20 years of gold data with a cost of $1000, the period from 2003 to 2010 warrants special attention for a few reasons:
Why Focus on 2003–2010?
- Market Regime Change:
- Gold underwent a major bull market during 2003–2010, rising from approximately $300 to over $1200 by the end of the period.
- After 2010, gold experienced new price regimes, including the 2011 peak and subsequent corrections. These changes may mean that strategies working well before 2010 might fail in later, more volatile markets.
- Cost Significance:
- A $1000 cost might have represented a larger relative percentage of the price during 2003–2010 (e.g., around 5%-10% of gold’s price) compared to post-2010 periods when gold prices have often been above $1500.
- Volatility Differences:
- The volatility structure of gold has evolved over time. Pre-2010, trends were stronger and more directional, while post-2010 has seen more erratic and range-bound movements.
Should You Be Concerned?
Yes, you should carefully evaluate this period because:
- Disproportionate Impact:
- If a strategy heavily depends on the trends of 2003–2010, its robustness in post-2010 periods (with more range-bound action) could be in question.
- Costs may have a larger impact on profitability for strategies built in this regime compared to more recent data.
- Regime Bias:
- A strategy optimized for pre-2010 conditions may overfit to that regime and not generalize well for the flatter periods seen later.
- Risk of Misleading Results:
- Even if the backtest shows strong performance overall, the pre-2010 period may dominate the results due to high trends and low relative costs.
Adjusting Costs for Realism
To ensure realistic testing:
- Increase the Cost:
- You can apply a scaled transaction cost to simulate the higher relative impact of costs during periods when gold prices were lower. For example:
- Use a percentage-based cost relative to price (e.g., 0.2% of the price per trade) instead of a fixed $1000.
- Alternatively, segment the backtest into multiple periods and apply different costs for each based on gold’s price levels.
- You can apply a scaled transaction cost to simulate the higher relative impact of costs during periods when gold prices were lower. For example:
- Separate Analysis:
- Evaluate performance metrics for 2003–2010 and post-2010 separately. This will help you determine if the strategy is overly reliant on the earlier period’s trends.
Practical Steps:
- Segment Backtest Results:
- Divide results into multiple time frames (e.g., 2003–2010, 2011–2020, and 2021–present) and analyze performance metrics separately for each.
- Simulate Robust Costs:
- Apply higher costs for lower price periods and re-run the backtest to evaluate its robustness across varying market conditions.
- Evaluate Strategy Adaptability:
- Check how the strategy performs during flat or range-bound periods (e.g., 2012–2015) compared to strong trends (e.g., 2005–2010).
- Compare Across Assets:
- Test the strategy on other metals like silver or correlated assets. This helps assess whether the strategy is robust to different price and volatility structures.
Conclusion:
You should absolutely scrutinize the 2003–2010 period. Adjusting costs based on relative price levels and segmenting your backtest will provide better insight into your strategy’s robustness. Additionally, focusing on OOS performance in post-2010 regimes is critical to avoid overfitting to historical bull markets.