library(quantmod)
getSymbols("MSFT", src="yahoo", from = "2024-10-01", to = "2025-02-01")
## [1] "MSFT"
head(MSFT)
## MSFT.Open MSFT.High MSFT.Low MSFT.Close MSFT.Volume MSFT.Adjusted
## 2024-10-01 428.45 428.48 418.81 420.69 19092900 417.5552
## 2024-10-02 422.58 422.82 416.71 417.13 16582300 414.0217
## 2024-10-03 417.63 419.55 414.29 416.54 13686400 413.4361
## 2024-10-04 418.24 419.75 414.97 416.06 19169700 412.9597
## 2024-10-07 416.00 417.11 409.00 409.54 20919800 406.4883
## 2024-10-08 410.90 415.66 408.17 414.71 19229300 411.6198
nrow(MSFT)
## [1] 84
MSFT_open <- MSFT$MSFT.Open
plot(MSFT_open)
library(cfbfastR)
Sys.setenv(CFBD_API_KEY = "AWhy28JyUU54vDVtJ0G4SgnZCRlrlyP4i19e+9Uu8nVA1PtWR/LE3pK4R9/LYz4Z")
has_cfbd_key()
## [1] TRUE
cfbd_api_key_info()
## ── CFBD API key info data from CollegeFootballData.com ─────── cfbfastR 2.0.0 ──
## ℹ Data updated: 2025-09-23 13:34:44 EDT
## # A tibble: 1 × 2
## patron_level remaining_calls
## <int> <int>
## 1 0 2992
sec_team_metrics <- cfbd_metrics_ppa_teams(year = 2025, conference = "SEC", excl_garbage_time = TRUE)
print(sec_team_metrics)
## ── Team PPA data from CollegeFootballData.com ──────────────── cfbfastR 2.0.0 ──
## ℹ Data updated: 2025-09-23 13:34:44 EDT
## # A tibble: 16 × 21
## season conference team off_overall off_passing off_rushing off_first_down
## <int> <chr> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 2025 SEC Alabama 0.45 0.69 0.09 0.35
## 2 2025 SEC Arkansas 0.45 0.52 0.39 0.23
## 3 2025 SEC Auburn 0.27 0.22 0.32 0.21
## 4 2025 SEC Florida 0.09 0.06 0.18 -0.04
## 5 2025 SEC Georgia 0.28 0.39 0.19 0.16
## 6 2025 SEC Kentucky 0.18 0.07 0.3 0.1
## 7 2025 SEC LSU 0.16 0.25 0.07 -0.01
## 8 2025 SEC Mississ… 0.38 0.47 0.32 0.04
## 9 2025 SEC Missouri 0.38 0.41 0.36 0.23
## 10 2025 SEC Oklahoma 0.25 0.38 0.11 0.08
## 11 2025 SEC Ole Miss 0.38 0.68 0.2 0.11
## 12 2025 SEC South C… 0.15 0.34 -0.02 0.04
## 13 2025 SEC Tenness… 0.46 0.6 0.34 0.29
## 14 2025 SEC Texas 0.13 0.09 0.18 0.13
## 15 2025 SEC Texas A… 0.33 0.48 0.17 0.1
## 16 2025 SEC Vanderb… 0.62 0.8 0.5 0.44
## # ℹ 14 more variables: off_second_down <dbl>, off_third_down <dbl>,
## # off_cumulative_total <dbl>, off_cumulative_passing <dbl>,
## # off_cumulative_rushing <dbl>, def_overall <dbl>, def_passing <dbl>,
## # def_rushing <dbl>, def_first_down <dbl>, def_second_down <dbl>,
## # def_third_down <dbl>, def_cumulative_total <dbl>,
## # def_cumulative_passing <dbl>, def_cumulative_rushing <dbl>