Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, SBGuy, Petra), 801 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
60/40 Portfolio #484510
11/03/21 17:08
11/03/21 17:08
Joined: Jul 2021
Posts: 2
Independencia
C
chrissierra Offline OP
Guest
chrissierra  Offline OP
Guest
C

Joined: Jul 2021
Posts: 2
Independencia
Hello, I want to make a trading system that uses a bond and equities. Use a fixed percentage of 60% and 40%. I can't find a way to use those distributions. What function can I use for it?

I thank you in advance !!
Greetings.

Last edited by chrissierra; 11/03/21 17:09.
Re: 60/40 Portfolio [Re: chrissierra] #484511
11/03/21 17:28
11/03/21 17:28
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Use distribute() to calculate weight distributions. Then call asset, enterLong, and exitLong as needed to attain the required positions.
https://zorro-project.com/manual/en/renorm.htm

Re: 60/40 Portfolio [Re: chrissierra] #484515
11/05/21 18:52
11/05/21 18:52
Joined: Jul 2021
Posts: 2
Independencia
C
chrissierra Offline OP
Guest
chrissierra  Offline OP
Guest
C

Joined: Jul 2021
Posts: 2
Independencia
Thanks ! Could you help me use the function? I don't understand how I can use distribute () and associate each weight to each asset. I already knew that this function is useful to me but I don't understand how to use it ...

Re: 60/40 Portfolio [Re: chrissierra] #484516
11/05/21 22:53
11/05/21 22:53
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline
Member
Grant  Offline
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
What often helps me is searching with keywords on this forum.
Here's a nice example for the distribute() function:

https://opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=481738&Searchpage=1&Main=58888&Words=%2Bdistribute&Search=true#Post481738

Re: 60/40 Portfolio [Re: chrissierra] #484523
11/07/21 10:30
11/07/21 10:30
Joined: Apr 2008
Posts: 586
Austria
Petra Online
Support
Petra  Online
Support

Joined: Apr 2008
Posts: 586
Austria
I believe that example actually has a bug, the asset name is not stored correctly. But the distribute call is ok.

Re: 60/40 Portfolio [Re: Petra] #484524
11/07/21 13:04
11/07/21 13:04
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline
Member
Grant  Offline
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
Yeah, 'asset(Stocks[i]);' doesn't seem correct.

Re: 60/40 Portfolio [Re: chrissierra] #484532
11/08/21 19:17
11/08/21 19:17
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Originally Posted by chrissierra
Thanks ! Could you help me use the function? I don't understand how I can use distribute () and associate each weight to each asset. I already knew that this function is useful to me but I don't understand how to use it ...
Better yet, make an attempt to put it into code. If it doesn't work, share your script and log output and we can give you some pointers.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1