Publications by Daniel Lee

Code Along 6

15.10.2024

Goal: to predict attrition, emplyees who are likely to leave the company. Import Data library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.4 ✔ readr 2.1.5 ## ✔ forcats 1.0.0 ✔ stringr 1.5.1 ## ✔ ggp...

726 sym R (20861 sym/30 pcs) 3 img 3 tbl

Code Along 7

15.10.2024

# Load packages # Core library(tidyverse) library(tidyquant) Goal Measure portfolio risk using skewness. Skewness is the extent to which returns are asymmetric around the mean. It is important because a positively skewed distribution means large positive returns are more likely while a negatively skewed distribution implies large negative ...

612 sym R (4588 sym/17 pcs) 3 img

Document

15.10.2024

# 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= symbo...

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

Applyit7

15.10.2024

# 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("AAPL", "MSFT", "TSLA", "JNJ", "AMZN") prices <- tq_get(x = symbols, get = "stock.prices", ...

1305 sym R (3081 sym/18 pcs) 1 img

Apply 7

14.10.2024

# 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 symbol <- c("NVDA", "SIRI", "AAPL", "MCD") prices <- tq_get(x = symbol, get = "stock.prices", from = "2012-12...

718 sym R (1942 sym/12 pcs) 1 img

Code Along 7

14.10.2024

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

424 sym R (3955 sym/17 pcs) 3 img

Apply6

14.10.2024

Import data olympics <- read_excel("../00_data/myData_apply2.xlsx") olympics ## # A tibble: 271,116 × 16 ## Column1 id name sex age height weight team noc games year season ## <dbl> <dbl> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <dbl> <chr> ## 1 270479 135289 Zzim… M 20 NA NA Braz… BRA 1952…...

303 sym R (5058 sym/26 pcs) 12 img

Code along 7

14.10.2024

Tidy data Pivoting long to wide form table4a ## # A tibble: 3 × 3 ## country `1999` `2000` ## <chr> <dbl> <dbl> ## 1 Afghanistan 745 2666 ## 2 Brazil 37737 80488 ## 3 China 212258 213766 table4a_long <- table4a %>% pivot_longer(cols = c(`1999`, `2000`), names_to = "year", ...

170 sym Python (3959 sym/22 pcs)

Code along 7

14.10.2024

# Load packages # Core library(tidyverse) library(tidyquant) Goal Measure portfolio risk using skewness. Skewness is the extent to which returns are asymmetric around the mean. It is important because a positively skewed distribution means large positive returns are more likely while a negatively skewed distribution implies large negative returns...

608 sym R (4443 sym/17 pcs) 3 img

Codealong7

13.10.2024

# 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 = symb...

441 sym R (4750 sym/20 pcs) 3 img