Reply

Why does testing on hours of the day produce hours of the day that don’t exist?

1 replies

Sparky

Customer, bbp_participant, community, 8 replies.

Visit profile

7 years ago #115682

Say I’m running an improvement strategy to find the best time of day.

 

I will get conditions saying Hour = 1 or Hour = 6 or Hour =23 

 

Yet, there isn’t any data with hour = 1 or 6 or 23. The data runs only from 07 to 21. I’ve been through my files and checked.

 

And when I go into the list of trades for this strategy, there are, of course, no trades being opened at 1am or 11pm.

 

 

 

  

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #139836

it is because these values are generated randomly. The algorithm doesn’t check if these hours really exist in your data file.

 

It’s the same with indicators, it could generate comparisons that will be always or never true.

 

The strategy backtest and its evaluation should take care of dismissing such strategies – if strategy doesn’t open any trades or is worse than the original strategy then it should be dismissed.

Mark
StrategyQuant architect

0

Viewing 1 replies (of 1 total)