1 Import Stock Prices

2 Convert Prices to Returns by Quarterly

## # A tibble: 138 × 3
##    asset date       returns
##    <chr> <date>       <dbl>
##  1 FNV   2021-03-31 -0.0480
##  2 FNV   2021-06-30  0.149 
##  3 FNV   2021-09-30 -0.108 
##  4 FNV   2021-12-31  0.0647
##  5 FNV   2022-03-31  0.145 
##  6 FNV   2022-06-30 -0.190 
##  7 FNV   2022-09-30 -0.0938
##  8 FNV   2022-12-30  0.135 
##  9 FNV   2023-03-31  0.0685
## 10 FNV   2023-06-30 -0.0198
## # ℹ 128 more rows

3 Make Plot

4 Interpret the Plot

A typical quarterly return is higher for CAT, CCJ, and PLD than for FNV, NVDA, and TPL. All companies are strong and have a larger number of returns above a rate of 0.0, but CAT, CCJ, and PLD have a greater concentration of quarterly returns above 0.0 than the other three companies. It is also important to note that TPL had the largest gain and greatest loss of the six stocks. Many macro-level events and technological changes have occurred in the past 5 years, so if looking for constant positive returns, I’d recommend CAT, CCJ, and PLD.

5 Change the Global Chunk Options

Hide the code, messages, and warnings