Portfolio Analysis with R
R packages used Choosing a portfolio Getting the data (from Yahoo Finance) Breaking down the code above Getting monthly returns Filtering the data Calculating returns Adding portfolio weights Ok, now for some useful calculations Standard Deviation of returns Table of Downside Risks Table of Drawdowns SemiDeviation Sharpe ratio Returns summary Visualizing portfolio performance Combining all returns into one object Plotting portfolio returns Visualizing each component compared to the portfolio Using highcharter Computing rolling standard deviations.