Skip to content

Convert Daily PnL to Returns

3 messages · Subhrangshu Nandi, Brian G. Peterson

#
Convert them to a wealth index. Add 1 to your first PnL number, and 
cumsum. This creates a fake "price series" that can then be turned into 
a return series for all the other analysis you need to do.

if 'PnL' is your data variable:

cumsum(PnL+1)

Regards,

- Brian
Subhrangshu Nandi wrote:

  
    
#
Oops, my code line is wrong. Sorry.

I wasn't thinking clearly about what you said. You need to add the 
capital number to the series.

if you have $1000, and your PnL series is in $, then you would do

cumsum(PnL)+1000

to create your wealth index from which you can calculate returns.

if the capital changes, you have to take into account the addition or 
withdrawal from the capital account in your series.

Sorry for the confusion,

- Brian
Brian G. Peterson wrote: