Publications by Job Boonstoppel

Apply to your data 7

02.06.2023

# Load packages # Core library(tidyverse) library(tidyquant) Goal Visualize and compare skewness of your portfolio and its assets. Choose your stocks. from 2012-12-31 to 2017-12-31 1 Import stock prices symbols <- c("TSLA", "META", "XOM", "AAPL", "PG", "AMZN") prices <- tq_get(x = symbols, get. = "stock.prices", ...

3121 sym R (3370 sym/17 pcs) 2 img

Code Along 6

28.05.2023

# 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 stock prices symbols <- c("SPY", "EFA", "IJS", "EEM", "AGG") prices <- tq_get(x = symbols, ...

401 sym R (4159 sym/21 pcs) 2 img

Apply to your Data 6

28.05.2023

# Load packages # Core library(tidyverse) library(tidyquant) Goal Visualize expected returns and risk to make it easier to compare the performance of multiple assets and portfolios. Choose your stocks. from 2012-12-31 to 2017-12-31 1 Import stock prices symbols <- c("TSLA", "META", "XOM", "AAPL", "PG", "AMZN") prices <- tq_get(x = symbols, ...

1771 sym R (4208 sym/21 pcs) 2 img

Code Along 5

27.05.2023

# 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 stock prices symbols <- c("SPY", "EFA", "IJS", "EEM", "AGG") prices <- tq_get(x = symbols, ...

351 sym R (2715 sym/14 pcs) 3 img

Apply to your Data 5

27.05.2023

# Load packages # Core library(tidyverse) library(tidyquant) Goal Collect individual returns into a portfolio by assigning a weight to each stock Choose your stocks. from 2012-12-31 to 2017-12-31 1 Import stock prices symbols <- c("TSLA", "META", "XOM", "AAPL", "PG", "AMZN") prices <- tq_get(x = symbols, get. = "stock.price...

703 sym R (2608 sym/14 pcs) 1 img

Code Along 4

19.05.2023

# Load packages # Core library(tidyverse) library(tidyquant) Goal Take raw prices of five individual stocks and transform them into monthly returns five stocks: “SPY”, “EFA”, “IJS”, “EEM”, “AGG” 1 Import stock prices # Choose stocks symbols <- c("SPY", "EFA", "IJS", "EEM", "AGG") prices <- tq_get(x = symbols, ...

213 sym R (1521 sym/5 pcs) 1 img

Apply to your Data 4

19.05.2023

1 Import stock prices of your choice ## [1] "TSLA" "META" "XOM" "AAPL" "PG" "AMZN" 2 Convert prices to returns by quarterly ## # A tibble: 24 × 3 ## asset date returns ## <chr> <date> <dbl> ## 1 TSLA 2022-03-31 -0.107 ## 2 TSLA 2022-06-30 -0.470 ## 3 TSLA 2022-09-30 0.167 ## 4 TSLA 2022-12-30 -0.767 ## 5 META 2...

460 sym 1 img

Apply to your Data 3

19.05.2023

# Load packages library(tidyverse) library(tidyquant) Step 1 Get stock prices and convert to returns Ra <- c("TSLA", "META", "XOM", "AAPL", "PG", "AMZN") %>% tq_get(get = "stock.prices", from = "2022-01-01") %>% group_by(symbol) %>% tq_transmute(select = adjusted, mutate_fun = periodReturn, ...

548 sym R (4712 sym/14 pcs) 1 img

Code Along 3

19.05.2023

# Load packages library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.2 ✔ readr 2.1.4 ## ✔ forcats 1.0.0 ✔ stringr 1.5.0 ## ✔ ggplot2 3.4.2 ✔ tibble 3.2.1 ## ✔ lubridate 1.9.2 ✔ tid...

142 sym R (5205 sym/12 pcs)

Apply to your Data 2

15.05.2023

Import stock prices stocks <- tq_get(c("TSLA", "META", "XOM", "AAPL", "PG", "AMZN"), get = "stock.prices", from = "2016-01-01") stocks ## # A tibble: 11,118 × 8 ## symbol date open high low close volume adjusted ## <chr> <date> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> ## 1 TSLA 2016-01...

226 sym Python (5370 sym/16 pcs) 2 img