Publications by Daniel Lee
Document
1 Import stock prices of your choice 2 Convert prices to returns by quarterly ## # A tibble: 100 × 3 ## asset date returns ## <chr> <date> <dbl> ## 1 SPY 2012-03-30 0.104 ## 2 SPY 2012-06-29 -0.0289 ## 3 SPY 2012-09-28 0.0615 ## 4 SPY 2012-12-31 -0.00383 ## 5 SPY 2013-03-28 0.0999 ## 6 SPY ...
256 sym 1 img
Document
# 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 = sym...
291 sym R (672 sym/4 pcs)
Document
# 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 = sym...
354 sym R (4417 sym/23 pcs) 2 img
Document
# Load packages # Core library(tidyverse) library(tidyquant) Goal Visualize expected returns and risk to make it easier to compare the performance of multiple assets and portfolios. Choose your stocks. from 2012-12-31 to 2017-12-31 1 Import stock prices symbols <- c("SPY", "TSLA", "VZ") prices <- tq_get(x = symbols, ...
928 sym R (2012 sym/13 pcs)
Document
# 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 = sym...
419 sym R (4542 sym/20 pcs) 3 img
Document
# Load packages # Core library(tidyverse) library(tidyquant) Goal Visualize and compare skewness of your portfolio and its assets. Choose your stocks. from 2012-12-31 to 2017-12-31 1 Import stock prices symbols <- c("SPY", "TSLA", "VZ") prices <- tq_get(x = symbols, get = "stock.prices", from = "201...
701 sym R (3100 sym/16 pcs) 1 img
Document
# 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 = sym...
429 sym R (3990 sym/16 pcs) 3 img
Apply Your Data 8
# 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", "TSLA", "VZ") prices <- tq_get(x = symbols, get ...
771 sym R (3319 sym/11 pcs) 1 img
Document
# 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 = sym...
449 sym R (4941 sym/18 pcs) 3 img
Document
# 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 = sym...
477 sym R (3604 sym/17 pcs) 2 img