Backtesting an ATR-RSI Futures Strategy and Optimizing Its Parameters
Summary
This example shows a workflow for backtesting an ATR-RSI strategy on one-minute futures data. The setup specifies the contract, date range, transaction costs, slippage, contract size, tick size, and starting capital, then loads data, runs the simulation, calculates results and statistics, and displays a chart.
It also demonstrates a genetic algorithm optimization targeting the Sharpe ratio, varying the ATR lookback and its moving-average length over specified ranges. The document provides implementation settings and identifies the optimization objective, but reports no resulting performance, selected parameters, or robustness checks. The example therefore illustrates how to run and parameterize a backtest, not evidence that the strategy is profitable or that optimized settings will generalize beyond the tested sample.
Key ideas
- The backtest configures market, date range, costs, slippage, and capital before simulation.
- The example evaluates an ATR-RSI strategy on one-minute futures data.
- Results and summary statistics are calculated after the simulation.
- A genetic algorithm searches ATR parameter ranges using Sharpe ratio as its target.
- No performance results or out-of-sample validation are provided.
Tags
From a private course collection; the original is not published.