Publications by Daniel Lee

Document

11.11.2022

# Load packages # Core library(tidyverse) library(tidyquant) Goal Calculate and visualize your portfolio’s beta. Choose your stocks and the baseline market. from 2012-12-31 to present 1 Import stock prices symbols <- c("SPY", "TSLA", "VZ") prices <- tq_get(x = symbols, get = "stock.prices", from =...

734 sym R (2883 sym/16 pcs) 1 img

Document

17.11.2022

# Load packages # Core library(tidyverse) library(tidyquant) library(broom) functions when should you write a function? # For reproducible work set.seed(1234) # Create a data frame df <- tibble::tibble( a = rnorm(10), b = rnorm(10), c = rnorm(10), d = rnorm(10) ) # Rescale each column df$a <- (df$a - min(df$a, na.rm = TR...

164 sym R (2550 sym/23 pcs)

Document

14.12.2022

# 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("SPY", "VZ", "TSLA") prices <- tq_get(x = symbols, ge...

678 sym R (3512 sym/16 pcs) 1 img