library(yfR) tickers <- c("TSLA", "MMM") enddate<- Sys.Date() begdate <- Sys.Date() - 356 df<- yf_get(tickers = tickers,first_date = begdate,last_date = enddate) head(df) > head(df) # A tibble: 6 × 11 ticker ref_date price_open price_high price_low price_close volume price_adjusted ret_adjusted_prices 1 MMM 2023-06-13 84.7 86.2 84.3 85.9 3926827 80.6 NA 2 MMM 2023-06-14 86.3 86.7 84.6 85.2 3888196 80.0 -0.00769 3 MMM 2023-06-15 85.2 87.0 85.0 86.8 3375590 81.5 0.0182 4 MMM 2023-06-16 87.2 87.7 86.3 87.4 7412210 82.1 0.00703 5 MMM 2023-06-20 85.9 86.1 84.5 85.5 3284455 80.3 -0.0214 6 MMM 2023-06-21 85.0 85.5 84.3 84.8 3011648 79.7 -0.00811