I need to calculate a profit and loss for an equity timeseries. The position size (column D in the below table) is not binary (not moving from zero position to a position and then back to zero position again - the position can increase and decrease over time without closing). The trades are at the close (so one trade a day).
I have looked for an on-line benchmark source for this function but I cannot find one. Below I have come up with what I hope is the correct way to do this but if someone could let me know if I'm incorrect (and if not correct my equations), or point me towards a source of information it would be appreciated.
cost = 1.35 bases points or (0.0135%)
(A) (B) (C) (D) (E) (F)
date close_price trade_price position trade size cash - nominal position
30/10/2014 343.70 343.70 -27400 -27400 9417380
31/10/2014 357.90 357.90 -26300 1100 9806460
03/11/2014 357.90 357.90 -26300 0 9412770
04/11/2014 363.87 363.87 -26300 0 9569781
05/11/2014 368.77 368.77 -26300 0 9698651
06/11/2014 365.22 365.22 -26300 0 9605286
07/11/2014 367.81 367.81 -25600 700 9673403
10/11/2014 359.29 359.29 -25600 0 9197824
11/11/2014 370.85 370.85 -25600 0 9493760
12/11/2014 375.08 375.08 0 25600 9602048
(G) (H) (I) (J)
cash - pnl position before cost cost (%) % day pnl before cost % day pnl after cost
0 0.0135% 0.00% -0.01%
-389080 0.0135% -3.97% -3.98%
0 0.0000% 0.00% 0.00%
-157011 0.0000% -1.64% -1.64%
-128870 0.0000% -1.33% -1.33%
93365 0.0000% 0.97% 0.97%
-68117 0.0135% -0.70% -0.72%
218112 0.0000% 2.37% 2.37%
-295936 0.0000% -3.12% -3.12%
-108288 0.0135% -1.13% -1.14%
I've tried to explain the above table below using a MS Excel formula style calculations below (the letters in the equations are the columns associate with the above columns)
Thanks