1 Import stock prices of your choice

2 Convert prices to returns by quarterly

## # A tibble: 63 × 3
##    asset date       returns
##    <chr> <date>       <dbl>
##  1 AAPL  2012-12-31  0     
##  2 AAPL  2013-03-28 -0.178 
##  3 AAPL  2013-06-28 -0.103 
##  4 AAPL  2013-09-30  0.191 
##  5 AAPL  2013-12-31  0.169 
##  6 AAPL  2014-03-31 -0.0383
##  7 AAPL  2014-06-30  0.198 
##  8 AAPL  2014-09-30  0.0858
##  9 AAPL  2014-12-31  0.0956
## 10 AAPL  2015-03-31  0.124 
## # ℹ 53 more rows

3 Make plot

4 Interpret the plot

Based on the distribution of quarterly returns from 2012 to 2016, Microsoft (MSFT) offered the highest and most consistent returns, with a strong peak and low volatility. In comparison, Apple and Amazon showed more dispersed and volatile return patterns, making MSFT the most favorable in terms of risk-adjusted performance.

5 Change the global chunck options

hide the code massgaes and warnings