Gamestudio Links
Zorro Links
Newest Posts
Instrument Price Zorro Chart
by felixfx. 10/19/19 20:48
Today real live account blown - my experience
by Clifford_B. 10/19/19 17:09
Building Diversified Portfolios - New Paper
by SnoopySniff. 10/18/19 16:23
Indices & metals easier to trade than FX???
by SnoopySniff. 10/18/19 10:08
What are you working on?
by txesmi. 10/17/19 07:00
Ducascopy exporter
by line7. 10/17/19 06:21
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
3 registered members (Dooley, AndrewAMD, Seymour), 736 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
VillageTalkies, line7, Shutch, Clifford_B, Paulius
18310 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,029
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

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

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

You select an asset with the asset() function.


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