Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by Grant. 05/23/26 20:53
Issues resuming trades on Demo account
by Martin_HH. 05/22/26 13:31
XTB
by pr0logic. 05/18/26 12:27
Purchase A8 full licence version
by NeoDumont. 05/13/26 20:17
Black Book, 4th edition
by TipmyPip. 05/11/26 08:40
No errors in the command line
by jcl. 05/08/26 10:59
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (TipmyPip), 2,343 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
jayden, liu, Koti, curry, DeepxKalsi
19220 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: 28,100
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,100
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