I've been getting very confused on the topic of calculating returns. To get cumulative returns in time, log-returns are used, but apparently log-returns aren't used across different securities at a fixed time?
I would like to get cumulative returns as a function of time over my portfolio.
I have two securities, A and B. I buy one share of both A and B when the market opens and sell when it closes.
Suppose these are the prices for a specific day:
open close A 9 10 B 10 8
My overall return for that day is
(10+8)/(10+9) - 1 = -5.2%. I store that -5.2% for that day. I repeat this for many days. How do I then calculate my cumulative sum? If it helps, I'm doing this in python.
Side note: I can use a
cumsum() function very easily in python, but that assumes log-returns. I have no issue working with log-returns, but I'm not sure how to go about doing that.
I will add that I always purchase 1 share of whatever security is in my portfolio for that day. The securities in my portfolio change over the course of time.