Publications by Daniel Lee
Apply11
Import your data data(flights) flights %>% skimr::skim() Data summary Name Piped data Number of rows 336776 Number of columns 19 _______________________ Column type frequency: character 4 numeric 14 POSIXct 1 ________________________ Group variables None Variable type: character skim_variable n_missing complete_rate min max empty n_un...
527 sym 4 tbl
Code Along 5
# 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, ...
288 sym R (258 sym/2 pcs)
WATVA Survey Analysis
Table of contents 1.0 Clean Data 1.1 Rename and convert variables 1.2 Remove unusable responses 1.3 Clean up reporting errors 1.4 Remove outliers 2.0 Estimate Spending 2.1 Estimate number of trips 2.2 spending while on trip 2.3 Spending on equipment 2.4 Spending on ATV_UTVs and towing trucks 2.5 Usage of ATV_UTVs and towing trucks 3.0 Rider Ch...
8884 sym Python (31520 sym/52 pcs) 18 img 6 tbl
CodeAlong13
# Load packages # Core library(tidyverse) library(tidyquant) # time series library(timetk) Goal Simulate future portfolio returns five stocks: “SPY”, “EFA”, “IJS”, “EEM”, “AGG” market: “SPY” from 2012-12-31 to 2017-12-31 1 Import stock prices symbols <- c("SPY", "EFA", "IJS", "EEM", "AGG") prices <- tq_get(x = symbol...
415 sym R (8149 sym/36 pcs) 2 img
CodeAlong13
# Load packages # Core library(tidyverse) library(tidyquant) # time series library(timetk) Goal Simulate future portfolio returns five stocks: “SPY”, “EFA”, “IJS”, “EEM”, “AGG” market: “SPY” from 2012-12-31 to 2017-12-31 1 Import stock prices symbols <- c("SPY", "EFA", "IJS", "EEM", "AGG") prices <- tq_get(x = symbol...
450 sym R (8842 sym/35 pcs) 2 img
CodeAlong_12
# Load packages # Core library(tidyverse) library(tidyquant) library(readr) # Time series library(lubridate) library(tibbletime) # modeling library(broom) Goal Examine how each asset contributes to portfolio standard deviation. This is to ensure that our risk is not concentrated in any one asset. five stocks: “SPY”, “EFA”, “IJS”, �...
607 sym R (14258 sym/30 pcs) 4 img
Apply 12
# Load packages # Core library(tidyverse) library(tidyquant) Goal Examine how each asset contributes to portfolio standard deviation. This is to ensure that our risk is not concentrated in any one asset. 1 Import stock prices symbols <- c("AMZN", "AAPL", "NFLX", "BA", "DELL") prices <- tq_get(x = symbols, get = "stock.price...
883 sym R (19883 sym/30 pcs) 4 img
codeapply12
knitr::opts_chunk$set(echo = TRUE) # Load package 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 ...
370 sym R (8995 sym/36 pcs) 2 img
Apply12
# Load packages # Core library(tidyverse) library(tidyquant) Goal Examine how each asset contributes to portfolio standard deviation. This is to ensure that our risk is not concentrated in any one asset. 1 Import stock prices symbols <- c("DIS", "AAPL", "NKE", "SBUX", "GE") prices <- tq_get(x = symbols, get = "stock.prices"...
896 sym R (15228 sym/23 pcs) 2 img
Document
library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union library(ggplot2) library(lubridate) ## ## Attaching package: 'lubridate' ## The following objects are masked from '...
430 sym R (9966 sym/60 pcs) 5 img