60/40 Portfolio

Posted By: chrissierra

60/40 Portfolio - 11/03/21 17:08

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.
Posted By: AndrewAMD

Re: 60/40 Portfolio - 11/03/21 17:28

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
Posted By: chrissierra

Re: 60/40 Portfolio - 11/05/21 18:52

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 ...
Posted By: Grant

Re: 60/40 Portfolio - 11/05/21 22:53

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
Posted By: Petra

Re: 60/40 Portfolio - 11/07/21 10:30

I believe that example actually has a bug, the asset name is not stored correctly. But the distribute call is ok.
Posted By: Grant

Re: 60/40 Portfolio - 11/07/21 13:04

Yeah, 'asset(Stocks[i]);' doesn't seem correct.
Posted By: AndrewAMD

Re: 60/40 Portfolio - 11/08/21 19:17

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.
© 2024 lite-C Forums