Global allocation - disappearing assets/robustness

I thought some clarifications could be useful for everyone so posting here.


If we let’s say generate weights at time T that include some assets, and we don’t rebalance until some time later (T+n days),

but between these two dates, some securities become untradable for a short time (and possibly become tradable again by the next rebalancing time). Do we have to make sure we add additional weights in between? Or the restriction on availability only applies to purchase and we can hold assets as long as we want?



Hello,


Thanks for your question. For this current challenge, the answer is no, you do not have to rebalance between the dates. You can set a weight once (as long as its tradable when you decide to hold) and hold it for as long as you want.


Hope this answers your question

Thank you!


Hello,


The test is expecting returns on that date. You might have assigned weights before this date but there might not be returns because the assets that you assigned weights to is not tradable. You can try to following to replicate this


# simulate missing data
port = portfolio.createMissingData(port)

rerun payout on missing data

port = eval(port)

check weights

head(port@weightsMatrix)

check asset returns (no weights should be assigned to assets with NA returns)

head(port@returnsMatrix)


Hope this clarifies it!

Hello Yongcheng,


The above method add some strange weights for me: (even négative ones and NA)


                     DM SP NQ         VG            Z          SMix
2003-01-01 NA NA NA NA NA NA
2003-01-02 0.031208701 NA NA 0.0542797 0.0203246990 0.000000000
2003-01-03 0.001513199 NA NA -0.0051485 -0.0022550992 0.057971000
2003-01-06 0.015457901 NA NA 0.0222930 -0.0007534004 -0.001431199
2003-01-07 0.001487899 NA NA -0.0144081 -0.0108067004 -0.007780501
2003-01-08 -0.019085700 NA NA -0.0276571 -0.0091462999 0.002269900
NX HI KM XP TU FV TY US RX G
2003-01-01 NA NA NA NA NA NA NA NA NA NA
2003-01-02 0.0269794695 NA 0.01194969 NA -0.0035579001 NA NA -0.0224626 NA NA
2003-01-03 0.0005711003 NA 0.03791175 NA 0.0001456998 NA NA 0.0011348 NA NA
2003-01-06 0.0074200895 NA 0.01317365 NA -0.0005100001 NA NA -0.0022669 NA NA
2003-01-07 -0.0249291798 NA -0.02600473 NA 0.0010934999 NA NA 0.0028401 NA NA
2003-01-08 -0.0156885509 NA 0.00242718 NA 0.0012379007 NA NA 0.0062305 NA NA
JB XM GC
2003-01-01 NA NA NA
2003-01-02 0.000000e+00 NA -0.004871062
2003-01-03 0.000000e+00 NA 0.014684713
2003-01-06 -4.223603e-04 NA 0.001418839
2003-01-07 -7.042012e-05 NA -0.012468122
2003-01-08 5.634203e-04 NA 0.018938312


Maybe i just give the daily weights matrix even they are the same? This will not add my trading cost?

Hello,


I think you are looking at returns for the above. Weights should be in the portfolio@weightsMatrix slot. Giving the daily weights matrix will mean that you’re rebalancing daily so it will add to your rebalancing cost.


Hi, Petitfort. I do not have a problem, I only clarified the rules.

Hi Indira, yes thank you for your clarification, it helps me to identify my problem in fact.