One of the bumps I'm running into with my optimizations are due to the averages. For instance, the AvgTradesPerDay metric only seems to calculate for the days traded, not days where no trades were placed.
For example, in 5 days, the strategy places 6 trades as 0,4,2,0,0 where 3 of these days are 0 trades. This ends up being returned at an avg of 3 trades per day (as there were only 2 days in which trades were placed), instead of ~1.2 trades per day.
My goal is to help optimize towards a consistent minimum # of trades occurring each day, even if there are still spikes here and there. I am trying hard to avoid months and months without trades and then one month with 80% of them.
One idea was to take AllTrades.TradePerformance.TradeCount within the strategy and divide it by the start date of the run up to the current date the strategy is running (or end date, if possible!) (i.e. # trades / (days in (end date - start date)) )
How does one access the start date and end date of an optimization from within a strategy? If not from within a strategy, then how?
AvgTradesPerDay is very misleading, given your implementation. It implies every day, not just trading days.
On the upgrade list, could you add my suggestion of also including basic stats for some of these attributes? For instance, AvgTradesPerDay = 10 is great. However having a StdDev of 40 (which implies 0 trades per day likely) is very different than a StdDev of 5 (which implies at least 5 trades per day 67% of the time). I believe these measures are meaningful when running long backtests and optimizations.
Please let me know about the start/end date. I think my question is easily solved with access to those two fields.
Thank you!

Comment