Want the full code behind this test? The Mega Backtrader Strategy Pack includes 500+ Backtrader-ready Python strategies, batch runners, dashboards, CSV metrics, chart exports, and documentation. You can get the full package here: Mega Backtrader Strategy Pack.
Most momentum strategies look at one return window. Rough path methods look at the shape of the return path. In this BTC-USD test, that approach produced a 40.52% return, 75% win rate, and no open trade at the end of the run.
The test used BTC-USD daily candles from July 27, 2024 to July 27, 2026. The benchmark was BTC buy-and-hold over the same period.
| Result | Value |
|---|---|
| Strategy return | 40.52% |
| BTC buy-and-hold return | -3.70% |
| Excess return | 44.22% |
| Final portfolio value | $14,052.27 |
| Sharpe ratio | 1.07 |
| Max drawdown | 10.12% |
| Closed trades | 8 |
| Open trades | 0 |
| Win rate | 75.00% |
RoughPathMomentumStrategy is a path-signature
momentum with trailing stops strategy.
The strategy is interesting because it uses path structure instead of a single indicator threshold. It calculates signature-style components from recent return increments, checks whether the structure is stable, and trades only when the momentum signature is strong enough.
The strategy logic is:
Returns become the path increments:
self.returns = bt.indicators.PctChange(self.close, period=1)
self.path_increments = []The signature calculation includes multiple levels:
level1 = np.sum(increments)
level2 = 0
for i in range(n-1):
for j in range(i+1, n):
level2 += increments[i] * increments[j]The final momentum signature combines direct and higher-order path structure:
momentum_sig = (
level1 * 0.5 +
level2 * 0.3 / path_length +
level3 * 0.2 / (path_length**2)
)This is the benefit of packaging the idea as a Backtrader strategy: the indicator setup, signal rules, position management, and output metrics all run through the same repeatable research workflow.
| Setting | Value |
|---|---|
| Asset | BTC-USD |
| Benchmark | BTC-USD |
| Period | 2y |
| Data window | July 27, 2024 to July 27, 2026 |
| Interval | 1d |
| Starting cash | $10,000.00 |
| Final value | $14,052.27 |
| Strategy file | RoughPathMomentumStrategy.py |
| Strategy class | RoughPathMomentumStrategy |
| Metric | Value |
|---|---|
| Starting portfolio value | $10,000.00 |
| Final portfolio value | $14,052.27 |
| Strategy return | 40.52% |
| BTC buy-and-hold return | -3.70% |
| Excess return vs BTC buy-hold | 44.22% |
| Sharpe ratio | 1.07 |
| Max drawdown | 10.12% |
| Total trades | 8 |
| Closed trades | 8 |
| Open trades | 0 |
| Winning trades | 6 |
| Losing trades | 2 |
| Win rate | 75.00% |
| Runtime | 3.84 seconds |
The run ended with no open trade, so the trade count and final equity are fully closed-position results.
The equity curve shows whether the strategy built its return steadily or relied on one isolated jump. Here the comparison is especially useful because BTC buy-and-hold finished negative while the strategy finished strongly positive.
The drawdown chart shows how much pain the strategy had to absorb during the test. Return alone is not enough; a publishable strategy review needs the drawdown path next to the benchmark.
The rolling return chart shows when the strategy gained or lost its edge. This helps separate one lucky ending from a result that developed across the test window.
The daily return distribution excludes zero-return strategy days. In this run, 652 flat strategy-equity days were removed, leaving 78 non-zero strategy return days plotted.
The main lesson is not that one backtest is automatically tradable. The lesson is that the research workflow matters. A useful strategy package should let you move from idea, to code, to batch test, to metrics, to charts, to publishable research without rebuilding the same infrastructure over and over.
That is exactly what the Mega Backtrader Strategy Pack is designed to do. It gives you hundreds of ready-to-run strategy modules plus the tooling to test them across assets and time windows.
Get the full package here: Mega Backtrader Strategy Pack.
This article is for research and educational use only. Backtest results are not financial advice, investment advice, or a guarantee of future performance. Always validate strategy logic, data quality, execution assumptions, costs, slippage, and risk before using any trading system.