Why the +1?

Course Name: Getting Started with Algorithmic Trading!, Section No: 9, Unit No: 6, Unit type: Notebook

why in this line "cumret = (returns+1).cumprod()"

are we adding the 1?

 

Hey Sebastian,



The code you provided calculates a cumulative product of returns, but adding 1 to the returns before taking the cumulative product, makes it so that the cumulative product starts at 1 (instead of 0), this will help the resulting cumulative product to be more interpretable and easy to understand when comparing with the original returns.



Thanks,

Rushda