Publications by Daniel Lee
Apply 4 DA
Import data # excel file data <- read_excel("../00_data/Salaries.xlsx") data ## # A tibble: 397 × 6 ## rank discipline yrs.since.phd yrs.service sex salary ## <chr> <chr> <dbl> <dbl> <chr> <dbl> ## 1 Prof B 19 18 Male 139750 ## 2 Prof B 20 ...
332 sym 1 img
Apply 4 FA
1 Import stock prices of your choice 2 Convert prices to returns by quarterly ## # A tibble: 80 × 3 ## asset date `quarterly returns` ## <chr> <date> <dbl> ## 1 NKE 2020-03-31 -0.208 ## 2 NKE 2020-06-30 0.172 ## 3 NKE 2020-09-30 0.249 ## 4 NKE 2020-12-31 ...
731 sym 1 img
Document
#Load Packages library(tidyverse) library(tidyquant) 1 Get stock prices and convert to returns Ra <- c("AAPL", "GOOG", "NFLX") %>% tq_get(get = "stock.prices", from = "2010-01-01", to = "2015-12-31") %>% group_by(symbol) %>% tq_transmute(select = adjusted, mutate_fun = periodReturn,...
141 sym R (3142 sym/10 pcs)
Apply3
#Load Packages library(tidyverse) library(tidyquant) 1 Get stock prices and convert to returns Ra <- c("AAPL", "GOOG", "NFLX") %>% tq_get(get = "stock.prices", from = "2010-01-01", to = "2015-12-31") %>% group_by(symbol) %>% tq_transmute(select = adjusted, mutate_fun = periodReturn,...
172 sym R (3185 sym/11 pcs)
CodeAlong4
# Load packages # Core 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 ## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1 ## ✔ lubridate 1.9...
218 sym R (2746 sym/9 pcs) 1 img
Code Along 4 FA
# Load packages # Core 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 ## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1 ## ✔ lubridate 1.9.3 ...
216 sym R (3058 sym/8 pcs) 1 img
Apply it 4
# Load packages library(tidyverse) library(tidyquant) 1 Import stock prices of your choice symbols <- c("AAPL", "BBWI", "CCEP", "DKS", "DLTR") prices <- tq_get(x = symbols, get = "stock.prices", from = "2012-01-01", to = "2017-01-01") 2 Convert prices to returns by quarterly asset_r...
729 sym R (1272 sym/5 pcs) 1 img
Real World Applications 4
What is happening to your client business’s profit margin? Make your argument based on your analysis of the given charts. My answer is… GDS Link outputPrice = Producer Price Index by Commodity: Software Publishing inputPrice = Producer Price Index by Commodity: Professional Services (Partial): Engineering Services Comptus outputPrice = Produ...
527 sym
Real World Applications 4
What is happening to your client business’s profit margin? Make your argument based on your analysis of the given charts. My answer is… GDS Link outputPrice = Producer Price Index by Commodity: Software Publishing inputPrice = Producer Price Index by Commodity: Professional Services (Partial): Engineering Services Comptus outputPrice = Produ...
527 sym
Code Along 4
# Load packages # Core 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 ## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1 ## ✔ lubridate 1.9...
216 sym R (2725 sym/7 pcs) 1 img