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


  • administrators

    Use the link below to go the original post

    Click here to see the full blog post

  • I was playing with benchmark observer a little bit and noticed the following - benchmark curve is shown for the full set of data from very first bar. In cases when the strategy starts trading later due to certain period required for indicator calculations, the comparison with the benchmark fails. Especially if one uses long indicator periods like a year.

    Could you add an option to start benchmarking at the time when strategy actually starts (after min period gone)?

  • administrators

    This is a very good observation for this particular observer and therefore a candidate for inclusion.

    Although it would seem trivial to simply override prenext in the aforementioned observer, it is unfortunately not that simply given the dependencies the observer has on the TimeReturn analyzer which is the one actually doing the calculations (the TimeReturn and Benchmark observers do simply observe and return the values from this analyzer)

Log in to reply

Looks like your connection to Backtrader Community was lost, please wait while we try to reconnect.