1 Import stock prices of your choice

## [1] "TSLA" "META" "XOM"  "AAPL" "PG"   "AMZN"

2 Convert prices to returns by quarterly

## # A tibble: 119 × 3
##    asset date       returns
##    <chr> <date>       <dbl>
##  1 TSLA  2012-03-30  0.282 
##  2 TSLA  2012-06-29 -0.174 
##  3 TSLA  2012-09-28 -0.0664
##  4 TSLA  2012-12-31  0.146 
##  5 TSLA  2013-03-28  0.112 
##  6 TSLA  2013-06-28  1.04  
##  7 TSLA  2013-09-30  0.588 
##  8 TSLA  2013-12-31 -0.251 
##  9 TSLA  2014-03-31  0.326 
## 10 TSLA  2014-06-30  0.141 
## # ℹ 109 more rows

3 Make plot

4 Interpret the plot

A typical quarterly return is higher for AAPL, AMZN, and META than for PG, TSLA, and XOM.

The stock with the typical highest quarterly return is META, since the top of the curve is the most positive.

5 Change the global chunck options

Hide the code, messages, and warnings.

This was done by adjusting the echo setting from TRUE to FALSE.