Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Quad, TipmyPip, degenerate_762, AndrewAMD, Nymphodora), 997 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Optimisation results different when combining assets #477951
08/19/19 09:50
08/19/19 09:50
Joined: Feb 2019
Posts: 14
Other
J
j45p41 Offline OP
Newbie
j45p41  Offline OP
Newbie
J

Joined: Feb 2019
Posts: 14
Other
Hi,

i am trying to maintain different parameter values for each asset. When I train my algo with a single asset the parameter values are different to when I run the assets as a loop combined.

When trained as a loop of assets:

COP.US/USD +1.667 10.63=> 1.118
APA.US/USD +1.667 +5=> 99.999


Trained individually:
APA.US/USD +1.667 +15=> 0.398


COP.US/USD +1.667 10.63=> 1.118



I have looked at the manual and it states that you should make your optimisation calls outside of the loop:


so my code is:

TakeProfit = optimize(0.01, 1, 5, 1, 0); //Parameter 1
Stop = optimize(0.01, 5, 15, 5, 0); //Parameter 2 - need to imcrease 15 to 30

// Testing - 1
while (stock=(loop((char*)"COP.US/USD"))){

asset(stock);
//string algo = Algo;

algomain(stock, HLIMIT);
}



}



It looks like parameters are being shared between the loop - how do I get the same results as if ran individually pls?


i can see:

For optimizing asset- or algo-independent parameters in a portfolio system, call optimize outside the loop, but select an asset before calling optimize. The global parameters are then assigned to this asset. If individual optimization is not desired, don't use loop, but enumerate the assets in a simple for loop, f.i. for(used_assets) ..., and optimize the parameters outside the for loop. Make sure in that case to select all assets before the first optimize call; otherwise the optimizier will assume a single-asset strategy.

however the asset is only selected after the loop has started execution, so how do you select the asset outside of the loop?

Last edited by j45p41; 08/19/19 12:46.
Re: Optimisation results different when combining assets [Re: j45p41] #477966
08/20/19 08:42
08/20/19 08:42
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Asset order matters - read here why and when:

https://manual.zorro-project.com/asset.htm

You select an asset with the asset() function.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1