Publications by Reed Wilson

Week 9: Code Along 8

25.03.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, ...

432 sym R (4463 sym/20 pcs) 3 img

Week 8: Code Along 7

20.03.2023

...

4 sym 2 img

Week 8: Apply 7

20.03.2023

Import your data # excel file airlines <- read_excel("../00_data/MyData.xlsx") %>% mutate(n_events = as.numeric(n_events)) %>% mutate(avail_seat_km_per_week = as.numeric(avail_seat_km_per_week)) airlines ## # A tibble: 336 × 6 ## Ref airline avail_seat_km_per_week year_range type_…¹ n_eve…² ## <dbl> <chr> ...

173 sym Python (10297 sym/18 pcs)

Week 8: Apply 7

19.03.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", "GOOG") prices <- tq_get(x = symbols, get = "stock.prices", from = "2012-12-31", ...

1300 sym R (2665 sym/16 pcs) 1 img

Week 8: Code Along 7

18.03.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, ...

428 sym R (4483 sym/20 pcs) 3 img

Week 8: Code Along 7

18.03.2023

Tidy Data Pivoting table4a_long <- table4a %>% pivot_longer(cols = c(`1999`, `2000`), names_to = "year", values_to = "cases") Long to wide form Wide to long form table4a_long %>% pivot_wider(names_from = year, values_from = cases) ## # A tibble: 3 × 3 ## country `1999` `2000` ...

179 sym Python (2611 sym/16 pcs)

Week 7: Code Along 6

05.03.2023

Introduction Question 2 Variation Visualizing Distributions diamonds %>% ggplot(aes(x = cut)) + geom_bar() diamonds %>% ggplot(mapping = aes(x = carat)) + geom_histogram(binwidth = 0.5) diamonds %>% filter(carat < 3) %>% ggplot(aes(x = carat)) + geom_histogram(binwidth = 0.5) diamonds %>% ggplot(aes(x = carat...

294 sym R (2181 sym/24 pcs) 18 img

Week 7: Apply 6

05.03.2023

Import Data # excel file airlines <- read_excel("../00_data/MyData.xlsx") %>% mutate(n_events = as.numeric(n_events)) %>% mutate(avail_seat_km_per_week = as.numeric(avail_seat_km_per_week)) airlines ## # A tibble: 336 × 6 ## Ref airline avail_seat_km_per_week year_range type_…¹ n_eve…² ## <dbl> <chr> ...

296 sym 11 img

Week 7: Code Along 6

05.03.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, ...

374 sym R (4175 sym/21 pcs) 2 img

Week 7: Apply 6

05.03.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("JPM", "GOOG") prices <- tq_get(x = symbols, get = "stock.pric...

1482 sym R (3960 sym/21 pcs) 2 img