Part II
Building Data-Driven Trading Strategies
9 Introduction to Backtesting
9.1 What is Backtesting?
9.2 A First Example: Testing a SMA Strategy
9.3 A Philosophy of Realism and Conservative Assumptions
9.4 Roadmap for This Part
10 Preparing Historical Market Data
10.1 Getting the Data
10.2 Understanding the Dataset Structure
10.3 When to Use Close vs. Adjusted Close
10.4 Why Daily Data?
10.5 Preprocessing the Data
10.6 What Comes Next
11 Buy and Hold: The Baseline Strategy
11.1 Introduction to Buy and Hold
11.2 SPY Buy-and-Hold Backtest
11.3 QQQ Buy-and-Hold Comparison
11.4 SPY vs. QQQ: Which Is Better?
11.5 Common Misconceptions
11.6 Why This Strategy Matters
12 Dollar Cost Averaging: A Smoother Path Through Volatility
12.1 How Dollar Cost Averaging Works
12.2 SPY DCA Backtest Results (1993–2025)
12.3 Why We Use XIRR (Not Just Gain)
12.4 Drawdowns and Investor Experience
12.5 Risk-Adjusted Return: Calmar Ratio
12.6 Buy and Hold vs. DCA: Which Is Better?
12.7 Behavioral Edge: Why DCA Is Easier to Stick With
12.8 DCA Isn’t Always the Right Answer
12.9 Final Thoughts
13 The Golden Cross and Death Cross Strategy
13.1 The Strategy
13.2 Backtest Performance
13.3 Execution History
13.4 Drawdown Profile
13.5 Analysis and Tradeoffs
13.6 Why Use This Strategy?
13.7 Final Thoughts
Additional Resources
.1 BackAlpha.com
.2 Other Free Resources
9.1 What is Backtesting?
9.2 A First Example: Testing a SMA Strategy
9.3 A Philosophy of Realism and Conservative Assumptions
9.4 Roadmap for This Part
10 Preparing Historical Market Data
10.1 Getting the Data
10.2 Understanding the Dataset Structure
10.3 When to Use Close vs. Adjusted Close
10.4 Why Daily Data?
10.5 Preprocessing the Data
10.6 What Comes Next
11 Buy and Hold: The Baseline Strategy
11.1 Introduction to Buy and Hold
11.2 SPY Buy-and-Hold Backtest
11.3 QQQ Buy-and-Hold Comparison
11.4 SPY vs. QQQ: Which Is Better?
11.5 Common Misconceptions
11.6 Why This Strategy Matters
12 Dollar Cost Averaging: A Smoother Path Through Volatility
12.1 How Dollar Cost Averaging Works
12.2 SPY DCA Backtest Results (1993–2025)
12.3 Why We Use XIRR (Not Just Gain)
12.4 Drawdowns and Investor Experience
12.5 Risk-Adjusted Return: Calmar Ratio
12.6 Buy and Hold vs. DCA: Which Is Better?
12.7 Behavioral Edge: Why DCA Is Easier to Stick With
12.8 DCA Isn’t Always the Right Answer
12.9 Final Thoughts
13 The Golden Cross and Death Cross Strategy
13.1 The Strategy
13.2 Backtest Performance
13.3 Execution History
13.4 Drawdown Profile
13.5 Analysis and Tradeoffs
13.6 Why Use This Strategy?
13.7 Final Thoughts
Additional Resources
.1 BackAlpha.com
.2 Other Free Resources