Publications by Daniel Lee

Apply 9

31.10.2024

Import your data nhl_rosters <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2024/2024-01-09/nhl_rosters.csv') ## Rows: 54883 Columns: 18 ## ── Column specification ─────────────────────────────────────────────...

112 sym

Apply 9

31.10.2024

# Load packages # Core library(tidyverse) library(tidyquant) Goal Visualize and examine changes in the underlying trend in the performance of your portfolio in terms of Sharpe Ratio. Choose your stocks. from 2012-12-31 to present 1 Import stock prices symbols <- c("JPM", "MS", "DNB.OL", "NDA-FI.HE") prices <- tq_get(x = symbols, ...

1455 sym R (4108 sym/17 pcs) 1 img

Apply 9 FA

30.10.2024

# Load packages # Core library(tidyverse) library(tidyquant) Goal Visualize and examine changes in the underlying trend in the performance of your portfolio in terms of Sharpe Ratio. Choose your stocks. from 2012-12-31 to present 1 Import stock prices symbols <- c("NKE", "AAPL", "NFLX", "MSFT", "WMT") prices <- tq_get(x = symbols, ...

1646 sym R (3188 sym/16 pcs) 1 img

Apply8

30.10.2024

# Load packages # Core library(tidyverse) library(tidyquant) Goal Visualize and examine changes in the underlying trend in the downside risk of your portfolio in terms of kurtosis. Choose your stocks. from 2012-12-31 to present 1 Import stock prices symbols <- c("SPY", "EFA", "IJS", "EEM", "AGG") prices <- tq_get(x= symbols, ...

1088 sym R (4045 sym/18 pcs) 3 img

Code Along 9 FA

30.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 = symbols, ...

448 sym R (4774 sym/18 pcs) 3 img

Apply it 9

30.10.2024

# Load packages # Core library(tidyverse) library(tidyquant) Goal Visualize and examine changes in the underlying trend in the performance of your portfolio in terms of Sharpe Ratio. Choose your stocks. from 2012-12-31 to present 1 Import stock prices symbols <- c("VOO", "NVDA", "GME", "GOOGL", "TSLA") prices <- tq_get(x = symbols, ...

1027 sym R (3491 sym/16 pcs) 1 img

Apply 9

30.10.2024

# Load packages # Core library(tidyverse) library(tidyquant) Goal Visualize and examine changes in the underlying trend in the performance of your portfolio in terms of Sharpe Ratio. Choose your stocks. from 2012-12-31 to present 1 Import stock prices symbol <- c("GME", "MSFT", "INTC", "XXII", "TSLA") prices <- tq_get(x = symbol, ...

853 sym R (2896 sym/13 pcs) 1 img

Code Along 9 DA

29.10.2024

# Load packages # Core library(tidyverse) library(nycflights13) Introduction String Basics chac_data <- "I'm 'very' hungry." stringr::str_length("I am hungry.") ## [1] 12 stringr::str_c(c("I", " am"), collapse = "") ## [1] "I am" stringr::str_c("I", " am", sep = " ;") ## [1] "I ; am" str_sort(c("John", "Mary", "Aaron")) ## [1] "Aaron" "John" "...

363 sym R (9189 sym/60 pcs)

Code Along 9

29.10.2024

# Load packages # Core library(tidyverse) library(tidyquant) 1 Import stock prices symbols <- c("SPY", "EFA", "IJS", "EEM", "AGG") prices <- tq_get(x = symbols, get = "stock.prices", from = "2012-12-31", to = "2017-12-31") 2 Convert prices to returns asset_returns_tbl <- prices...

268 sym R (5353 sym/18 pcs) 3 img

Code along 9 FA

28.10.2024

# Load packages # Core library(tidyverse) library(tidyquant) Goal Measure which portfolio is expected to yield a higher return adjusted for risk using the Sharpe Ratio. The Sharpe Ratio is the mean of the excess portfolio returns (returns - risk free rate) divided by the standard deviation of the excess returns. five stocks: “SPY”, “EFA”,...

600 sym R (5193 sym/18 pcs) 3 img