Publications by Daniel Lee
Apply 9
# 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("AMZN", "AAPL", "NFLX", "BA", "DELL") prices <- tq_get(x = symbols, ...
774 sym R (3758 sym/16 pcs) 1 img
Code Along 10
# Load packages # Core library(tidyverse) library(tidyquant) Goal Measure the portfolio’s beta coefficient, which can be thought of as the portfolio’s sensitivity to the market or its riskiness relative to the market. five stocks: “SPY”, “EFA”, “IJS”, “EEM”, “AGG” market: “SPY” from 2012-12-31 to 2017-12-31 1 Import s...
538 sym R (3514 sym/17 pcs) 2 img
Apply 10
# 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", "EFA", "IJS", "EEM", "AGG") prices <- tq_get(x = symbols, get = "stock.prices", ...
647 sym R (3008 sym/16 pcs) 1 img
Apply 7
# 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("AMZN", "AAPL", "NFLX", "BA", "DELL") prices <- tq_get(x = symbols, get = "stock.prices", ...
680 sym R (3172 sym/15 pcs) 2 img
Apply 6
# 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 # Choose stocks symbols <- c("AMZN", "AAPL", "TSLA", "SPY", "EFA") # Using tq_get() ---- pr...
384 sym R (3257 sym/14 pcs) 1 img
Apply8
# 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("AMZN", "AAPL", "NFLX", "BA", "DELL") prices <- tq_get(x = symbols, ...
644 sym R (2728 sym/12 pcs) 1 img
Apply 7
# 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("AMZN", "AAPL", "NFLX", "BA", "DELL") prices <- tq_get(x = symbols, get = "stock.prices", ...
680 sym R (3172 sym/15 pcs) 2 img
Apply 9
library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.3 ✔ readr 2.1.4 ## ✔ forcats 1.0.0 ✔ stringr 1.5.0 ## ✔ ggplot2 3.4.3 ✔ tibble 3.2.1 ## ✔ lubridate 1.9.2 ✔ tidyr 1.3.0 ## ...
1022 sym R (5085 sym/24 pcs) 2 img
Topic Modeling: CEO Departures
CEO Departures: The dataset documents the reasons for CEO departure in S&P 1500 firms from 2000 through 2018. Build a topic (clustering) model to discover major reasons (topics) for CEO departure (ceo_dismissal). Use the departures dataset. Approach In Julia’s screencast, her goal was to discover topics in in the lyrics of Spice Girls songs...
859 sym R (5158 sym/18 pcs) 2 img 4 tbl
Apply10
# 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 # Choose stocks symbols <- c("AAPL", "DIS", "NKE", "GE", "SBUX") prices <- tq_get(x = symbols, get = "stock.prices", ...
730 sym R (2925 sym/16 pcs) 1 img