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
2 registered members (AndrewAMD, Nymphodora), 485 guests, and 3 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
optimize() function #466722
06/29/17 02:45
06/29/17 02:45
Joined: Jan 2017
Posts: 64
J
Jeff1228 Offline OP
Junior Member
Jeff1228  Offline OP
Junior Member
J

Joined: Jan 2017
Posts: 64
In the manual, it reads "In portfolio strategies, parameters are optimized for all assets separately. This means when a loop is used, all optimize calls must be inside that loop. If this is not desired, but different assets must still be used, enumerate them in a simple for loop, f.i. for(i=0; Name=Assets[i]; i++) { .... "

I am using MVO script with an assetList of 30 stocks and there is loop() in the script. The problem is, loop() is called in the script to calculate the Return, then, outside the loop, the covariance is calculated and requires the LookBack for all the assets to be the same. So how can I use optimize() to find out the optimal LookBack in this case?

Thank you

Jeff

Last edited by Jeff1228; 06/29/17 04:05.
Re: optimize() function [Re: Jeff1228] #466724
06/29/17 11:20
06/29/17 11:20
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
This is one of the mentioned cases in the manual. Replace the loop() with a for() loop.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1