# In theory historical performance of a portfolio

I am looking at the quantitative model our team is using for analyzing the performance of a portfolio of stocks. However I don't understand what the model is trying to achieve.

The model is supposed to do a simple job: evaluate the performance of a portfolio against the market history. The basic idea is, say, I have a portfolio in my mind consisting of 10 different stocks. I want to know that if I had created this portfolio in market one month ago, how well would it perform?

To evaluate how well the portfolio would do, i need to calculate the value of the portfolio for every single day in the past month (in order to further calculate daily return rate). Here is the model implemented in our code: $$V_{t}=V_{t-1}\sum\nolimits_i(\frac{P_{i,t}}{P_{i,t-1}}\cdot W_{i,t})$$ where $$W_{i,t} = \frac{Q_{i,t}\cdot P_{i,t}}{\sum\nolimits_i(Q_{i,t}\cdot P_{i,t})}$$

$V_t$ is the value of portfolio on date $t$

$P_{i,t}$ is the price of stock $i$ on date $t$

$Q_{i,t}$ is the quantity of stock $i$ on date $t$ (which is for most of time a constant with regard to %t%)

$W_{i,t}$ is the weight of stock $i$ in the portfolio on date $t$

I would imagine the value of the portfolio on a given date t is as simple as the sum of the value of all the constitute stocks on that given day. However looking at the model we are using at the moment, the value of a portfolio on day t is expressed relatively to the value of the portfolio on the previous day. Whoever implemented the model has left a comment there saying "it is because we need consider IPO stocks"

Can anybody help me understand this model? what is the difference between this model and a simple sum of value?

• The weight $W_{i,t}$ should have the price times quantity $Q_{i,t} P_{i,t}$ in the numerator. – Ric Dec 1 '14 at 12:51

## 1 Answer

I think the model you are presenting is trying to capture the pro-forma performance of a collection of stocks. However, it is not that 'flexible' and is accurate if:

1. You are fully invested throughout the time window you are considering
2. You do not place new trades during this time window

A portfolio value is simply the sum of your assets, so at time $t$ you have

$$V_{t}=C_{t}+A_{t}$$ where

$V_{t}$ is the total value of your portfolio at time $t$,

$C_{t}$ is your cash level at that time, and

$A_{t}$ is the value of your investments at time ${t}$, which for $N$ investments is equal to $\sum_{j \in N}Q_{j,t} \cdot P_{j,t}$ (shares times price)

Of course, if you cannot distinguish between your cash level and the rest of your assets, then you cannot really know how your portfolio evolved, because if you are studying the performance of your portfolio between $[0,t]$, and at $i\in(0,t)$ you make a new investment, at $i+1$ this investment would have a big impact on your portfolio whereas it really shouldn't as this initial investment should have been deducted from your cash.

For example, suppose you start with $N$ securities at $t=0$ and a cash level of $C_{0}$. Now consider that at time $i$ you make an investment, bying $Q_{N+1,i}$ shares of the security $N+1$ (so it will be your new investment) at price $P_{N+1,i}$. Your cash level would be reduced by that amount, and your investments would grow by the equivallent amount. Depending on how you study the performace this is not necessarily net zero as at end of day, the price may(will) change.

$$V_{i-1} = C_{i-1}+\sum_{j \in N}Q_{j,i-1} \cdot P_{j,i-1}$$

$$V_{i}=(C_{i-1}-Q_{N+1,i} \cdot P_{N+1,i})+\sum_{j \in N+1}Q_{j,i} \cdot P_{j,i}$$

where $Q_{N+1,i} \cdot P_{N+1,i}$ is the investment you made at time $i$. Please check that there are now $N+1$ investments and not $N$ as before, and that the cash level is $C_{i-1}$ which is the level you had prior the investment, (in our example if there is only one trade until time $i$, then $C_{i-1}=C_{0}$). Of course you can complicate it further by considering multiple investments etc.

I think your colleague could not model the cash level (I've experienced it multiple times in investment firms, as the portfolio manager and risk manager, who are really pushing for these numbers, are mostly interested in the stocks and not the cash) and just tried to do a quick pro-forma track. Not necessarily wrong, but not exactly the best way to do it. Having said that, I am not implying that my suggestion is ground-breaking or an optimal/complete one.

Let me know if this makes things clearer.

Thanks