To calculate the returns of AAPL & GOOG over the time period, you can use the Return.calculate function. This will then calculate the daily returns of AAPL and GOOG over the time period. The first day, as there is nothing to divide it by, will be NA. It generally makes sense to use this code […]
The post Calculating Stock Returns and Portfolio Returns in R appeared first on Finance Train.