Reconstructing Daily Portfolio Weights Between Rebalancing Dates
Summary
The note shows how to fill gaps in portfolio weight data between known rebalancing dates. The method treats the holdings established at the start of the period as fixed in share count until the next rebalance. Convert each starting weight into an invested value using an assumed portfolio value, then divide by that stock’s starting price to obtain the number of shares held.
For each later date, multiply those share counts by the current stock prices, sum the position values to get portfolio value, and divide each position value by that total to obtain updated weights. A numerical illustration shows how one holding’s weight rises when its price increases while other prices are unchanged. This procedure captures weights drifting with price moves; it assumes no intervening trades, cash flows, transaction costs, or corporate actions. The source does not provide code, but describes the calculation steps needed to implement it.
Key ideas
- Convert each known starting weight into an invested amount using the portfolio value.
- Divide invested amounts by starting prices to estimate share counts.
- Revalue each holding daily using its share count and current price.
- Compute each daily weight as the position value divided by total portfolio value.
- The method assumes holdings remain unchanged between recorded rebalancing dates.
Tags
Full text
# I have missing data on my portfolio weightings but it can be solved through stock prices - how can I code to find this? # I have missing data on my portfolio weightings but it can be solved through stock prices - how can I code to find this? firstly I would like to say sorry for the title - its not the best. In fact its crap. Here is my problem (I am new to coding btw - still learning) I am using Python on my MacBook - using Terminal. - I have a portfolio of stocks with their weightings but at random periods. E.g. 2/Jan/2018 - Company X - 3%, Company Y - 4% etc. On 15/Feb/2018, I readjusted the weights to: Company X - 4% , Company Y - 5% etc. But for the period between 2/Jan to 15/Feb - I have no weightings for the stocks. I want to fill in the gap - so between 2 Jan and 15 Feb 2018. I know we can easily do this by using the daily stock prices. What code can I use to to build daily weightings between 2 Jan 2018 to 15 Feb? So, if Company X price jump between 2nd of Jan to 3rd of Jan by some %, I would see the weighting get adjusted on 3rd Jan for Company X? Much appreciated. PS I'm a novice at this.. so go easy on me! ## Answer by Matteo (score 1) https://quant.stackexchange.com/a/57933 Assume a portfolio value (i.g. 100.000), find the value invested in each specific stock (if weight company X is 20% then we invest 20.000 in that stock), based on the price at that day you find the number of stocks invested (assume price 5, then we invested 20.000/5=4000 stocks). Once you have the exact number of stocks you invested in the portfolio for each company, every day find the new value for each stock (number stock times new price), find the portfolio value (sum of the new values) and divide the the values you have found by the portfolio value. Assume the day after the price of the stock of campany X is 6. Then, the value of the investent in that stock is 6*4000=24.000. Assuming all the other stock prices constant the new portfolio value is 104.000 and the new weight is 24.000/104.000=23.08%.
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.