Systematic Trading Research

Experiments and research on systematic trading, backtesting engineering and market structure.

Independent research by Alessandro A.

This site collects research articles and experiments originally published on Substack.

Opening Range Breakout Tested on MNQ futures

The Opening Range Breakout (ORB) is one of the most discussed intraday strategies in retail trading.

There are many variations of it online, but most examples I’ve seen have a few issues:

  • equities instead of futures
  • no contract rollover handling
  • no out-of-sample testing
  • unrealistic execution assumptions

So I decided to test it more carefully on MNQ futures (Micro Nasdaq).

Setup

  • Instrument: MNQ futures
  • Data: 15-minute bars from 2019 to 2026
  • Capital: $10,000
  • Position size: 1 contract
  • Commission: $0.68 per side
  • Proper contract rollover (switch ~5 trading days before expiration or when next contract volume becomes larger)

The strategy logic is very simple:

  1. Define the opening range (first 15 minutes of the US session).
  2. Enter long if price breaks the ORB high.
  3. Enter short if price breaks the ORB low.
  4. Use the opposite side of the ORB as a stop.
  5. Set a max loss to handle max risk per trade around 3%.
  6. Take profit using a fixed risk-reward multiple.
  7. Exit at the next session open if TP/SL are not hit.

I also used a daily SMA(200) as a simple trend filter.

Another rule that helped stability:
stop trading after one losing trade in the same session (ORB tends to overtrade in sideways markets).

One complication: backtesting futures in Python

I used backtesting.py, which doesn’t natively support futures.

A few workarounds were needed:

  • margin modeling to simulate futures leverage
  • position size adjustments to correctly map point value to PnL
  • continuous back-adjusted series for the SMA(200)
  • proper contract rollover handling

In-sample optimization

Parameters optimized:

  • trend sma
  • risk-reward multiplier

The interesting thing is that the heatmap doesn’t show a single isolated optimum, but rather a plateau region where performance is relatively stable.

That reduces the probability of curve fitting.

Results

In-sample

Sharpe ≈ 1.4
Max DD ≈ −11%

Out-of-sample (2023–2026)

Sharpe ≈ 1.10
Max DD ≈ −13%

The strategy does not beat buy & hold in absolute return, but it:

  • spends much less time in the market
  • has significantly lower drawdown
  • maintains positive Sharpe out of sample

So the edge seems thinner than most ORB discussions suggest, but it does not disappear.


The full article is available here

Backtest and optimization to built a DCA Strategy

A statistical example of how in-sample optimization and martingale dynamics guarantee eventual ruin.

The contest is of a mean reverting greedy strategy, that use leverage and trade long and short.
The original goal was to find parameter configurations that would make liquidation effectively impossible. In practice, this means pushing the failure mode outside the observed sample.

This article is not about how to make 10% per month.

It is about why a strategy that did make 10% per month still ended in liquidation.

I originally developed this system for TradingView and FreqTrade.

Here, however, the focus is not on execution, but on the backtesting and optimization process used to push a martingale-style strategy as far as possible before it inevitably fails.

Strategy


The strategy is a leveraged mean-reversion system that trades both long and short using Bollinger Bands as entry triggers.

When price crosses a band, a base order is opened.

If price continues to move against the position, additional safety orders are placed at increasing distances and sizes, progressively shifting the average entry price.

A fixed take-profit closes the entire position when mean reversion occurs.

A very important aspect of the strategy is the search for a stable setup. Since it’s a strategy that doesn’t accept losses, the trade can remain open for a long time, despite the potential for liquidation. The optimization process takes these aspects into account, and liquidation has been modeled using typical “isolated margin” limits plus an additional safety buffer.

Start                     2021-06-02 10:40:00
End                       2024-09-28 10:45:00
Duration                   1214 days 00:05:00
Equity Final [$]                   5209.83856
Commissions [$]                     420.80113
Return [%]                          941.96771
Buy & Hold Return [%]                -71.5597
Return (Ann.) [%]                   102.19721
CAGR [%]                             102.3141
Sharpe Ratio                          1.13084
Max. Drawdown [%]                   -42.69857
# Trades                                 2573
Win Rate [%]                         82.66615
margin calls                                0

The whole article and research jupyter is available on substack

Torna in alto