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)?
This is a very good observation for this particular observer and therefore a candidate for inclusion.
Although it would seem trivial to simply override
prenextin the aforementioned observer, it is unfortunately not that simply given the dependencies the observer has on the
TimeReturnanalyzer which is the one actually doing the calculations (the
Benchmarkobservers do simply observe and return the values from this analyzer)