l>
We hope that helps, happy coding ! Lionel.
Hi Lionel,
As a followup to your answer about penalties applied to rebalancing, I have a quick question.
The description states that we need to construct a “diversified long only portfolio [that] must be equally weighted, fully invested and must contain 50 stocks at any moment of time”. My question is about the “equally weighted”. If this portfolio is to be equally weighted, doesn’t that mean that we would have to rebalance it every day, thus incurring penalities? Or does this just mean that it has to be equally weighted every time we rebalance, but inbetween it doesn’t matter?
Thanks
Hi,
Great question!
We indeed mean equally weighted at rebalancing dates. Anytime you raise a new allocation (as materialised by a row output by your payout function), 2% weight has to be distributed across 50 stocks, rest is 0%. We simplify things and disregard weights drift from market movements in between rebalancing dates. However, very good you pointed this out, thanks.
I would add to Herve’s comment that you portfolio of stocks doesn’t have to be 2% everyday, that is NOT a requirement, it has to be 2% on any day your rebalance, that’s why there is a rebalancing penalty to avoid rebalancing small weights of the portfolio too often.
For example if you have an equally weight portfolio of 2 stocks MSFT.US GOOG.US, with weights 0.5 0.5, MSFT price goes up 10%, GOOG price is flat, your weight is 0.524 - 0.476 on day 2. This weight change is due to price so that’s fine to drift. but if you decide to replace MSFT by AAPL.US then you need to set back your portfolio 0.5-0.5.
I hope that’s clear ! Don’t hesitate to ask clarification if needed. Happy coding ! Lionel.
Hey guys,
Just want to double check that the transaction costs of rebalancing are taken into account when we run backtests?
Thanks
Hi,
This will be deployed over next week. For now, the backtest doesn’t take them into account. This does not change the way you construct your payout. It’ll just tell you how your trading impacts performances.
Post deleted by zzyer
Hi Ls,
Following up your example, (let’s say there are 3 stock in total MSFT, GOOG, AAPL, we need to choose 2 of them equal weight all time).
In day 1, I have payout function output of 0.5 - 0.5 - 0 , since I want to have MSFT and GOOG but not AAPL
In day 2, price change so my portfolio naturally change to 0.524 - 0.476 - 0
What should my payout function output (of day 2) be if :
1) I do not wish to rebalance my portfolio
2) I somehow want to rebalance my portfolio to 0.5 - 0.5 - 0
My understanding is that my payout function needs to have output of weights for every day, so I was wondering should I put all-zeros for any day I do not wish to rebalance my portfolio.
Regards
Hi Ccqqkk,
From my understanding, the output of your payout function should be the weight matrix for the rebalance dates of your choosing. If you do not wish to rebalance your potfolio on day 2 but on day 10, then the next row of you weight matrix should have the index of day 10 and the weights. This was explained in the youtube video from AIphien btw. Better to have a check.
- If you do not wish to rebalance, then you should not have a row for that day. Any raw on the weight matrix will indicate a rebalancing for that day.
2) if you want to rebalance 0.5 - 0.5 - 0 on that day so the weight matrix for that day should be just that.
Jiweng answer seems correct.
I hope that helps.
I hope that helps ! Thanks,