Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, exile, Ayumi), 1,085 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
lookback setting performance issue #488186
04/15/24 10:15
04/15/24 10:15
Joined: Oct 2018
Posts: 94
7
7th_zorro Offline OP
Junior Member
7th_zorro  Offline OP
Junior Member
7

Joined: Oct 2018
Posts: 94
If I develop a mix of several assets and algorithms, lookback settings greatly affect the backtesting performance. Can you tell me why?

Re: lookback setting performance issue [Re: 7th_zorro] #488188
04/15/24 16:59
04/15/24 16:59
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
There can be many reasons. Post code.

Re: lookback setting performance issue [Re: AndrewAMD] #488189
04/16/24 03:08
04/16/24 03:08
Joined: Oct 2018
Posts: 94
7
7th_zorro Offline OP
Junior Member
7th_zorro  Offline OP
Junior Member
7

Joined: Oct 2018
Posts: 94
When using a mix of assets and algos, the manual suggests the following.
Select asset first, then algo.

Code
// initial settings
...
LookBack = max((1440 / BarPeriod) * MANUAL_LOOKBACK_DAY_SETTING, LookBackNeeded);
...

while(asset(loop(Assets))
{
    algo("trend"); trendAlgo();
    algo("reversion"); reversionAlgo();
}


However, it is often convenient to choose algo first.
For example, if you write an algo that you want to trade selectively from multiple assets.

Code
// 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
    }
}


In this case, the number of times the asset is switched will also increase in proportion to the increase in algo.
When the asset is switched, lookback data may also need to be moved(or copied).
I'm asking you to review whether this can be a factor in performance degradation.


Last edited by 7th_zorro; 04/16/24 05:58.

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1