Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/20/24 06:09
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (henrybane, flink, Edgar_Herrera), 726 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 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,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
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