1 Import stock prices of your choice

2 Convert prices to returns by quarterly

## # A tibble: 326 × 3
##    asset date        returns
##    <chr> <date>        <dbl>
##  1 GOOG  2010-03-31 -0.100  
##  2 GOOG  2010-06-30 -0.243  
##  3 GOOG  2010-09-30  0.167  
##  4 GOOG  2010-12-31  0.122  
##  5 GOOG  2011-03-31 -0.0122 
##  6 GOOG  2011-06-30 -0.147  
##  7 GOOG  2011-09-30  0.0170 
##  8 GOOG  2011-12-30  0.226  
##  9 GOOG  2012-03-30 -0.00724
## 10 GOOG  2012-06-29 -0.100  
## # ℹ 316 more rows

3 Make plot

4 Interpret the plot

Market Benchmark (^GSPC): The S&P 500 has the narrowest distribution, with most quarterly returns concentrated around 0. This shows that its returns were generally more consistent than those of the individual stocks.

GOOG, META, and NVDA: These stocks have wider distributions, meaning their quarterly returns changed more from one quarter to another. NVDA has the widest range, with some very large positive and negative returns, making it the most volatile of the stocks shown. META also has a wide range of returns, while GOOG is somewhat more concentrated.

DLR: DLR has a relatively narrow distribution compared with GOOG, META, and NVDA. Its returns are more concentrated around the middle, showing less variation over the period.

Overall: The wider the distribution, the more the quarterly returns varied. Based on the plot, NVDA had the most variation, while the S&P 500 had the least.

5 Change the global chunck options

Hide the code, messages, and warnings