Why NinjaTrader Backtest Results Differ from Leaderboard Results

Backtest results from NinjaTrader and the Blue Edge Optimizer differ due to variations in order simulation, slippage, and commissions. Below are the key factors causing these discrepancies.

Zak

Last Update sebulan yang lalu

Order Filling Simulation Differences

NinjaTrader and the Blue Edge Optimizer use different methods for simulating order fills. This is one of the main reasons why backtest results don’t perfectly match:

  • NinjaTrader allows users to choose between two extremes:
    • Optimistic: Limit orders are always filled when the price touches the level.
    • Pessimistic: Limit orders are only filled when the price moves completely through the level.
  • The Optimizer takes a more realistic approach by simulating order fills probabilistically, based on factors such as:
    • Volume at the time
    • Bid/ask spread

Why It Matters
In live trading, orders are not always filled perfectly. The Optimizer’s probabilistic method more closely resembles real market conditions, while NinjaTrader’s settings may produce overly optimistic or pessimistic results.


Slippage Simulation

Slippage – the difference between the expected and actual fill price – is another factor that creates differences.

  • NinjaTrader uses user-defined slippage settings, which default to zero unless changed manually.
  • The Optimizer applies a default slippage of 2 points to account for real market delays and fills.
Example Impact:

When slippage occurs:

  • Trades on one platform might execute while failing on another.
  • Differences in trade entries and exits accumulate over time, causing the equity curves to desynchronize (drift apart).

Even a small amount of slippage at the beginning of a backtest can have a cascading effect, leading to significant discrepancies as the test progresses.


Commissions Handling

NinjaTrader and the Blue Edge Optimizer handle commissions differently:

  • NinjaTrader requires users to configure commissions manually, which can sometimes be overlooked.
  • The Optimizer automatically applies realistic commission costs during the backtest.

Commissions affect net profit, especially for strategies with high trade frequency. If commissions are not accounted for correctly in NinjaTrader, backtests may appear more profitable than they realistically would be.


Small Differences Add Up Over Time

Small differences in order fills, slippage, or commissions can add up and cause the strategies to get out of sync over time. For example:

  • If one platform fills an order while the other does not, the strategies can quickly fall out of sync.
  • A platform that remains in a trade longer may hit a stop loss or profit target that the other platform avoids.

This effect can cause the two equity curves to diverge, especially towards the end of the backtest.


Bug-Related Differences in NinjaTrader

NinjaTrader backtesting has some known issues that can artificially inflate results:

  • Same Bar Trades: NinjaTrader may enter and exit trades on the same bar due to its slippage handling, which is unrealistic in live markets.
  • Bogus Trades: NinjaTrader occasionally generates small, impossible trades caused by its simulation behavior.

The Blue Edge Optimizer avoids these unrealistic behaviors, providing cleaner and more accurate backtesting results.


Performance Metrics Discrepancies

Some performance metrics differ between the two platforms due to underlying calculation methods:

  • Maximum Drawdown: NinjaTrader resets this value inconsistently during challenges, causing inaccurate results.
  • Sharpe and Sortino Ratios: These risk-adjusted metrics rely on assumptions that differ between platforms. However, within each platform, these ratios are relative and still useful for comparison.

The Blue Edge team is actively working to resolve any inconsistencies in these metrics to ensure accuracy.


Key Takeaways:

  • Live Market Approximation: The Blue Edge Optimizer is designed to provide results that more closely reflect live trading conditions.
  • Order Fills & Slippage: NinjaTrader’s order fill settings and lack of default slippage often make its results appear unrealistically good.
  • Desynchronization: Even small order fill differences compound over time, creating discrepancies in the equity curve.
  • Commission Handling: Ensure commissions are configured properly in NinjaTrader to avoid overestimating performance.
  • Known Bugs: NinjaTrader’s simulation issues (same-bar trades, resets, etc.) can artificially inflate results.

By understanding these differences, you can better evaluate strategy performance and set appropriate expectations for live trading. If you have further questions, feel free to reach out to our support team!

Was this article helpful?

1 out of 1 liked this article

Still need help? Message Us