For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

Why do analyzers seem to start calculating on data feeds' start date instead of first order date?

  • Suppose I have 2 data feeds, one starting in 1990, another starting in 2000.

    We're waiting for a date were both feeds are available. In 2000, a first order is then being executed inside the strategy.

    When checking the backtesting results, and more specifically the analyzers, I would normally like to see the performance for the strategy to be calculated starting from the date when the first order was executed.

    Unfortunately this does not seem to be the case, from what I can see with the AnnualReturn & SharpeRatio analyzers, the performance seems to be calculated starting from the earliest data feeds' date, so 1990 in this case. This changes the results of the metrics dramatically.

    Could someone shed some light on why this is the default behavior? In my opinion, it would make more sense if the calculations of those analyzers reflected the actual trading timeframe.

  • I have the opposite result. I have multiple feeds, about ~100. My annual return gets calculated from 2016, but most of my data starts in 2007.

      - 2016: 0.17989527927894033
      - 2017: 0.2342377414639476
      - 2018: -0.04878029921676286
      - 2019: 0.6714767320608188
      - 2020: 0.13523159391989115

    I would like to see a full list of annual returns from 2007.

Log in to reply