Publications by Daniel Lee
code along 1
Welcome Ch1 Introduction The data science project workflow Prerequisites R RStudio r packages Install the tidyverse package Running R code 1+2 ## [1] 3 Getting help Google Stackoverflow Ch2 Introduction to Data Exploration Ch3 Data Visualization Set up library(tidyverse) data mpg ## # A tibble: 234 × 11 ## manufacturer model ...
1385 sym R (2204 sym/16 pcs) 11 img
1st application
Import stock prices stocks <- tq_get(c("TAL", "EDU"), get = "stock.prices", from = "2021-01-01", to = "2022-08-07") stocks ## # A tibble: 802 × 8 ## symbol date open high low close volume adjusted ## <chr> <date> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> ## 1 TAL 2021-01...
50 sym Python (1070 sym/3 pcs) 1 img
Code Along .2
Coding basics R as a calculator 1000/10 ## [1] 100 x <- 1000/10 # x assignment symbol What’s in a name? Calling functions Use of TAB seq(from = 1, to = 10) ## [1] 1 2 3 4 5 6 7 8 9 10 continuation character, + seq(from = 1, to = 10) ## [1] 1 2 3 4 5 6 7 8 9 10 Printing to screen y <- seq(from = 1, to = 10) ...
170 sym Python (178 sym/8 pcs)
Code Along 2.0
Import Data flights ## # A tibble: 336,776 × 19 ## year month day dep_time sched_de…¹ dep_d…² arr_t…³ sched…⁴ arr_d…⁵ carrier ## <int> <int> <int> <int> <int> <dbl> <int> <int> <dbl> <chr> ## 1 2013 1 1 517 515 2 830 819 11 UA ## 2 2013 1 1 5...
1114 sym Python (19845 sym/51 pcs) 2 img
Performance Analysis with tidyquant
# Load Packages library(tidyverse) ## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ── ## ✔ ggplot2 3.3.6 ✔ purrr 0.3.4 ## ✔ tibble 3.1.8 ✔ dplyr 1.0.10 ## ✔ tidyr 1.2.0 ✔ stringr 1.4.1 ## ✔ r...
131 sym R (4173 sym/12 pcs)
Week 2 Best Practice Econ
Chapter 1 It’s Not Just about Forecasting The following are the key points in the chapter. Elaborate on each point in at least 30 words. Understanding economics can help you to diagnose the causes of increases or decreases in sales volumes and costs. Understanding the principles of economics will help you decypher if the increase or decrease ...
1446 sym
Company Research
Company Blackberry Characteristics of the company Blackberry provides intelligent security software and services to enterprises and governments. They employ 3,325 employees, ranging from regular employees, to contract workers, to student workers across 20 countries. This led to a total company revenue of $174 million in the first quarter of 2022...
537 sym
Code Along 4
# Load packages # Core library(tidyverse) ## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ── ## ✔ ggplot2 3.3.6 ✔ purrr 0.3.4 ## ✔ tibble 3.1.8 ✔ dplyr 1.0.10 ## ✔ tidyr 1.2.0 ✔ stringr 1.4.1 ...
476 sym R (2347 sym/8 pcs)
APPLY 4
1 Import stock prices of your choice 2 Convert prices to returns by quarterly ## # A tibble: 69 × 3 ## asset date returns ## <chr> <date> <dbl> ## 1 BB 2012-03-30 -0.0536 ## 2 BB 2012-06-29 -0.688 ## 3 BB 2012-09-28 0.0148 ## 4 BB 2012-12-31 0.459 ## 5 BB 2013-03-28 0.197 ## 6 BB 2013-06-28 -0.323...
262 sym 1 img
Code Along 5
# 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, ...
357 sym R (2799 sym/18 pcs) 3 img