- Joined
- 9/13/17
- Messages
- 11
- Points
- 13
Hey guys,
I'm in the process of starting my investment fund and I've ran into a little trouble calculating the returns to date on a portfolio over a given time. I want to know how to calculate the total amount of returns my portfolio has made from one date (date of investment) to the current date using xts daily time series data. If someone could correct me on the following that would be awesome.
To calculate portfolio capital returns (ignoring dividends etc.. for a second which can be added after) the following steps are required:
Begin with a weighted portfolio with total weights = 1
For example: AMZN:0.25, GOOG:0.25, FB:0.35: BA:0.15
Get the closing data for each of these companies -> convert to returns.
Calculate the weighting differences from the base weights on a daily basis by multiplying the initial weights by the returns over time (without any rebalancing).
Multiply the returns of the 4 companies by their respective daily weights to get the daily portfolio returns.
Sum the daily returns r1 + r2 + r3 + rn... to get aggregate return.
So at a basic level, does the daily return on a portfolio = Daily returns of each stock * current weight of each stock.
And thus the returns to date = sum(daily portfolio returns).
I'd be really keen to get some help around this. I'm currently using R and building my portfolio management system through a cloud database, web-scraper and shiny dashboard frontend with algorithms backtesting on R.
Thanks a lot.
I'm in the process of starting my investment fund and I've ran into a little trouble calculating the returns to date on a portfolio over a given time. I want to know how to calculate the total amount of returns my portfolio has made from one date (date of investment) to the current date using xts daily time series data. If someone could correct me on the following that would be awesome.
To calculate portfolio capital returns (ignoring dividends etc.. for a second which can be added after) the following steps are required:
Begin with a weighted portfolio with total weights = 1
For example: AMZN:0.25, GOOG:0.25, FB:0.35: BA:0.15
Get the closing data for each of these companies -> convert to returns.
Calculate the weighting differences from the base weights on a daily basis by multiplying the initial weights by the returns over time (without any rebalancing).
Multiply the returns of the 4 companies by their respective daily weights to get the daily portfolio returns.
Sum the daily returns r1 + r2 + r3 + rn... to get aggregate return.
So at a basic level, does the daily return on a portfolio = Daily returns of each stock * current weight of each stock.
And thus the returns to date = sum(daily portfolio returns).
I'd be really keen to get some help around this. I'm currently using R and building my portfolio management system through a cloud database, web-scraper and shiny dashboard frontend with algorithms backtesting on R.
Thanks a lot.