A backtest is a set of assumptions made visible. Before comparing returns, it helps to understand the data, the order rules, and the costs behind a result.
OpenBacktesting is an open-source Python framework for backtesting, optimization, and strategy research. Its website includes an inspectable example: two moving-average configurations, their equity and drawdown curves, and the full table of closed trades.
Start with a reproducible example
The website's example uses the framework's GOOG daily data, from August 19, 2004 to March 1, 2013. It compares 10/20 and 20/50 moving-average periods with the same execution assumptions.
| Setting | Example value |
|---|---|
| Initial capital | $10,000 |
| Commission | 0.2% per execution |
| Order size | 95% of available position capacity |
| Directions | Long and short |
| End of test | Close at the last close, including commission |
These are historical examples, not predictions. The buy-and-hold reference shown on the website is a normalized price series without transaction costs.
Look beyond the return
Start with three questions:
- What happened along the way? Compare the equity curve with the drawdown view.
- Which trades produced the result? Inspect entry and exit prices, dates, and costs.
- What changes when the parameters change? Keep the execution assumptions fixed while comparing configurations.
The website packages results from actual framework runs. It does not execute Python in your browser. The downloadable examples are the same source files used to prepare the demonstration.
Keep the source close to the result
The website repository includes the example scripts and a JSON dataset with source revisions, example hashes, the data range, and execution settings. You can inspect its recorded assumptions directly:
import json
from pathlib import Path
path = Path("apps/website/src/data/backtests.json")
recorded = json.loads(path.read_text())
print(recorded.keys())A result is easier to evaluate when its inputs and execution assumptions travel with it.
Continue your research
Use the quickstart to run a strategy, then consult the limitations before interpreting the results. The source repository is the reference for supported features, installation, and provenance.