Publications by Kenton Quaglieri

CA11

12.11.2024

# Load packages # Core library(tidyverse) library(lubridate) library(nycflights13) Introduction Functions When should you write a function? # For reproducible work set.seed(1234) # Create a data frame df <- tibble::tibble( a = rnorm(10), b = rnorm(10), c = rnorm(10), d = rnorm(10) ) # Re-scale each column df$a <-...

303 sym R (2738 sym/27 pcs)

Code along 9

06.11.2024

# Load packages # Core library(tidyverse) library(tidyquant) Goal Calculate and visualize your portfolio’s beta. Choose your stocks and the baseline market. from 2012-12-31 to present 1 Import stock prices symbols <- c("NVDA", "PG", "MSFT", "SMCI", "LME") prices <- tq_get(x = symbols, get = "stock.prices", ...

852 sym R (2910 sym/16 pcs) 1 img

Code along 10

05.11.2024

# Load packages # Core library(tidyverse) library(tidyquant) 1 Import stock prices # Load packages # Core library(tidyverse) library(tidyquant) Goal Collect individual returns into a portfolio by assigning a weight to each stock five stocks: “SPY”, “EFA”, “IJS”, “EEM”, “AGG” from 2012-12-31 to 2017-12-31 1 Import sto...

502 sym R (3621 sym/18 pcs) 2 img

Apply 8

01.11.2024

Goal is to predict Spam Emails from key words library(tidyverse) ## Warning: package 'ggplot2' was built under R version 4.3.3 ## Warning: package 'forcats' was built under R version 4.3.3 ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1...

590 sym R (13351 sym/67 pcs) 5 img 3 tbl

Code along 9

30.10.2024

# Load packages # Core library(tidyverse) library(tidyquant) Goal Visualize and examine changes in the underlying trend in the performance of your portfolio in terms of Sharpe Ratio. Choose your stocks. from 2012-12-31 to present 1 Import stock prices symbols <- c("LME", "GME", "LMO", "UNH", "UPS") prices <- tq_get(x = symbols, ...

1094 sym R (3491 sym/16 pcs) 1 img

Code along 8

29.10.2024

Goal is to predict attriction, employees who are likely to quit library(tidyverse) ## Warning: package 'ggplot2' was built under R version 4.3.3 ## Warning: package 'forcats' was built under R version 4.3.3 ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ##...

1168 sym R (24799 sym/69 pcs) 6 img 3 tbl

CA 9

28.10.2024

# Load packages # Core library(tidyverse) library(tidyquant) 1 Import stock prices # Load packages # Core library(tidyverse) library(tidyquant) Goal Collect individual returns into a portfolio by assigning a weight to each stock five stocks: “SPY”, “EFA”, “IJS”, “EEM”, “AGG” from 2012-12-31 to 2017-12-31 1 Import sto...

483 sym R (4909 sym/19 pcs) 3 img

Apply 7 3100

25.10.2024

Goal is to predict Spam Emails from key words library(tidyverse) ## Warning: package 'ggplot2' was built under R version 4.3.3 ## Warning: package 'forcats' was built under R version 4.3.3 ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1...

305 sym R (13544 sym/67 pcs) 5 img 3 tbl

Apply 8

24.10.2024

# Load packages # Core library(tidyverse) library(tidyquant) Goal Visualize and examine changes in the underlying trend in the downside risk of your portfolio in terms of kurtosis. Choose your stocks. from 2012-12-31 to present 1 Import stock prices symbols <- c("UNH", "AAPL", "UPS", "WMT", "LME") prices <- tq_get(x = symbols, ...

933 sym R (3154 sym/14 pcs) 1 img

Code along 7 3100

23.10.2024

Goal is to predict attriction, employees who are likely to quit library(tidyverse) ## Warning: package 'ggplot2' was built under R version 4.3.3 ## Warning: package 'forcats' was built under R version 4.3.3 ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ##...

867 sym R (24489 sym/69 pcs) 6 img 3 tbl