Publications by Daniel Lee

Document

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

441 sym R (3915 sym/21 pcs) 2 img

Document

01.06.2023

# Load packages library(tidyverse) library(tidyquant) 1 Import stock prices of your choice # Choose stocks symbols <- c("MSFT", "COKE", "GOOG", "A", "F") prices <- tq_get(x = symbols, get = "stock.prices", from = "2022-01-01", to = "2022-12-31") 2 Convert prices to returns by quarterly asset_returns_tbl<- pric...

205 sym R (1568 sym/7 pcs) 1 img

Document

31.05.2023

# Load packages # Core library(tidyverse) ## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ── ## ✔ ggplot2 3.4.0 ✔ purrr 1.0.0 ## ✔ tibble 3.1.8 ✔ dplyr 1.0.10 ## ✔ tidyr 1.2.1 ✔ stringr 1.5.0 ##...

218 sym R (2969 sym/10 pcs) 1 img

Publish Document

25.05.2023

Import stock prices stocks <- tq_get(c("GOOGL", "MSFT", "COKE"), get = "stock.prices", from = "2018-01-01", to = "2023-05-01") stocks ## # A tibble: 4,020 × 8 ## symbol date open high low close volume adjusted ## <chr> <date> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> ## 1 G...

185 sym Python (5479 sym/13 pcs) 1 img

Document

23.05.2023

Import stock prices stocks <- tq_get(c("GOOGL", "MSFT", "COKE"), get = "stock.prices", from = "2018-01-01", to = "2023-05-01") stocks ## # A tibble: 4,020 × 8 ## symbol date open high low close volume adjusted ## <chr> <date> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> ## 1 G...

50 sym Python (1097 sym/3 pcs) 1 img

Document

23.05.2023

Welcome Ch1 Introduction The data science project workflow Prerequisites R RStudio r packages Install the tidyverse package Running R code Getting help Google Stackoverflow Ch2 Introduction to Data Exploration Ch3 Data Visualization Set up library(tidyverse) ## ── Attaching packages ─────────────────...

1378 sym R (2295 sym/13 pcs) 7 img

Apply 10: Topic modeling for #TidyTuesday Bigfoot sightings

28.04.2023

Our modeling goal is to “discover” topics in the lyrics of Spice Girls songs. Instead of a supervised or predictive model where our observations have labels, this is an unsupervised approach. https://juliasilge.com/blog/spice-girls/ equivalent terms between bigfoot and spice girls data song_name = observations topic = classification librar...

2492 sym R (9720 sym/36 pcs) 2 img

Intermediate DA: Apply9 Stocks

22.04.2023

Explore Data library(tidyverse) ## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ── ## ✔ ggplot2 3.4.0 ✔ purrr 1.0.1 ## ✔ tibble 3.1.8 ✔ dplyr 1.0.10 ## ✔ tidyr 1.3.0 ✔ stringr 1.5.0 ## ✔ re...

1425 sym R (11433 sym/32 pcs) 2 img

Apply 10: Powerlifting

19.04.2023

Import your data The data came from here ipf_lifts <- readr::read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-10-08/ipf_lifts.csv") ## Rows: 41152 Columns: 16 ## ── Column specification ──────────────────────────────────────...

380 sym 2 img

How to navigate economic cycles

16.04.2023

U.S Economy: market indicators U.S Economy: economic indicators National Cycles of the Industry How is the economy in New Hampshire? What you should be doing to prepare...

183 sym