Posted By: 7th_zorro
lookback setting performance issue - 04/15/24 10:15
If I develop a mix of several assets and algorithms, lookback settings greatly affect the backtesting performance. Can you tell me why?
// initial settings ... LookBack = max((1440 / BarPeriod) * MANUAL_LOOKBACK_DAY_SETTING, LookBackNeeded); ... while(asset(loop(Assets)) { algo("trend"); trendAlgo(); algo("reversion"); reversionAlgo(); }
// initial settings ... LookBack = max((1440 / BarPeriod) * MANUAL_LOOKBACK_DAY_SETTING, LookBackNeeded); ... for(auto it : myAlgoContainerMap) { algo(it.first); // name of algo while(asset(loop(Assets)) { it.second->run(); // process function of algo } }