Strategies and backtesting
Turn an idea into a trading rule in Python, test it on past prices, and learn how a backtest can fool you.
- Prices as dataLoad ten days of prices and ask them questions.
- Daily returnsConvert prices to returns, the form every strategy works in.
- Moving averagesSmooth out the noise to see the trend.
- A trading ruleTurn an idea into something a computer can follow.
- BacktestingRun the rule on the past and count the money.
- Measuring performanceReturn alone is not enough. Meet the Sharpe ratio.
- DrawdownHow far you fell from your best point, and why it matters.
- OverfittingHow to fool yourself with a backtest.
- Transaction costsThe quiet reason most strategies fail.
- Paper tradingPractice with pretend money before risking the real thing.
- Track quizFive questions. Get four right to finish the track.