Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple inaccuracies with strat performance analysis tools

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Multiple inaccuracies with strat performance analysis tools

    I have run across several incongruent results and/or inaccuracies while attempting to use the NT performance analyzation tools on my script strategy. Could you please help me resolve these errors?


    Context

    I enabled my strategy across multiple markets at 0852 CST on Mon 8/5, and it ran continuously until 1600 CST on Fri 8/9. For the purpose of this troubleshooting, let's look at ES only.


    Problem #1 - Incorrect Dates On Strategy Performance Windows

    Please reference Screenshot1. As mentioned, the strategy was only enabled from 8/5 - 8/9, yet the Start and End dates reflect 8/1 - 8/6 on both the Real-Time and Historical windows. I realize that there is a "lookback" period, but even with this taken into account, the dates do not make sense.


    Problem #2 - Incorrect Number Of Trades (And PnL) On Strategy Performance Windows

    Please reference Screenshot1. Both the Trade Performance log and the Executions log confirm that there were 21 trades taken on ES during the 8/5 - 8/9 timeframe. This is clearly not reflected in Strategy Performance windows.​


    Problem #3 - No Results Data On Real-Time Strategy Performance

    Please reference Screenshot1. As seen, there are no results at all for Real-Time performance. For the record, I also tried this after disabling the strategy, and the output results were the exact same for both windows.


    Problem #4 - Inaccurate Unrealized & Realized PnL On Strategies Tab Columns

    Please reference Screenshot1. Why does this show -$5,937.50 Unrealized and $0.00 Realized PnL? According to the log file, the correct weekly sum was -$5,825.28. So the total isn't far from accurate, but my major concern is why it shows in the columns as Unrealized (i.e. and with $0 Realized for the week).


    Problem #5 - Incorrect Number Of Trades (And PnL) On Manual Backtest Of Strategy Over This Time Period

    Please reference Screenshot2. For comparison and verification, I also ran a manual backtest of the 8/5 - 8/9 week on Sataurday morning after the week's close using the Strategy Analyzer tool. As you can see, the results do not align with either the Strategy Performance tool (i.e. Screenshot1) nor the actual results as provided by the log files. Again, for example, 21 trades were taken over the week, yet the manual backtest of the week shows only 11 trades taken, along with completely different PnL figures.


    I apologize if this a lot to dig through all at once, but I hope I've presented everything clearly. Thank you for your time and any answers you can provide!
    Attached Files
    Last edited by gcaver; 08-11-2024, 12:50 PM. Reason: Fixed screenshots

    #2
    Hello gcaver,

    The dates that you see in the report are the dates that the strategy had processed and not the time it had been running in realtime from when you enabled it. Charts by default have a 5 day lookback period so you would see results for that full period of time. The reports only update if you re open the report, if you had this open and let the strategy run you will need to close the reports and re open them to refresh them.

    When comparing a backtest there are many reasons the strategy could produce different results. In order to find out why you would have to add debugging to the strategy. This is a common item so we have a guide that goes over how to debug the strategy here: https://support.ninjatrader.com/s/ar...language=en_US

    When you first enable a strategy it will process all bars as historical and do a backtest. The strategy will only report realtime trades if it traded in realtime to where you see the executions in the control center executions tab. Additionally the report will need to be re opened after realtime trades have happened for them to appear.

    The unrealized PnL means the strategy has not closed its position to realize a profit or loss. The strategy needs to first close the position before realized will be reported.

    For comparing backtest vs realtime you will need to debug the strategy as previously mentioned. This is not something you will be able to determine why there was a difference based solely on the results screen. You will need to see if the strategy worked the same in both use cases to know if it should have similar results.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    119 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    62 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    40 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    45 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    82 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X