Publications by Jackson Curtis
Apply 2
Import stock prices stocks <- tq_get(c("AMZN", "TSLA", "TM"), get = "stock.prices", from = "2016-01-01") stocks ## # A tibble: 5,910 × 8 ## symbol date open high low close volume adjusted ## <chr> <date> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> ## 1 AMZN 2016-01-04 32.8 32.9 31.4 3...
219 sym Python (9420 sym/30 pcs) 2 img
Apply 3
# Load packages library(tidyverse) library(tidyquant) 1 Get stock prices and convert to returns Ra <- c("AMZN", "TSLA", "TM") %>% tq_get(get = "stock.prices", from = "2022-01-01") %>% group_by(symbol) %>% tq_transmute(select = adjusted, mutate_fun = periodReturn, period = "monthly...
204 sym R (3096 sym/11 pcs)
Apply 6
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 2 Convert prices to returns 3 Assign a weight to each asset 4 Build a portfolio ## # A tibble: 60 × 2 ## date returns ## <date> <dbl...
1435 sym 1 img
Code Along 6
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 2 Convert prices to returns 3 Assign a weight to each asset 4 Build a portfolio ## # A tibble: 60 × 2 ## date returns ## <date> ...
320 sym 2 img
Code Along 7
Goal Measure portfolio risk using skewness. Skewness is the extent to which returns are asymmetric around the mean. It is important because a positively skewed distribution means large positive returns are more likely while a negatively skewed distribution implies large negative returns are more likely. five stocks: “SPY”, “EFA”, “IJS”,...
596 sym 3 img
Code Along 8
Goal Measure portfolio risk using kurtosis. It describes the fatness of the tails in probability distributions. In other words, it measures whether a distribution has more or less returns in its tails than the normal distribution. It matters to investors because a distribution with excess kurtosis (kurtosis > 3) means our portfolio might be at risk...
798 sym 3 img
Code Along 7
Goal Measure portfolio risk using skewness. Skewness is the extent to which returns are asymmetric around the mean. It is important because a positively skewed distribution means large positive returns are more likely while a negatively skewed distribution implies large negative returns are more likely. five stocks: “SPY”, “EFA”, “IJS”,...
596 sym 3 img
Apply 5
# Load packages # Core library(tidyverse) library(tidyquant) Goal Collect individual returns into a portfolio by assigning a weight to each stock Choose your stocks. from 2012-12-31 to 2017-12-31 1 Import stock prices symbols <- c("AMZN", "TSLA", "TM") prices <- tq_get(x = symbols, get = "stock.prices", from =...
803 sym R (2282 sym/12 pcs) 1 img
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, ...
338 sym R (2613 sym/14 pcs) 3 img
Apply 4
1 Import stock prices of your choice 2 Convert prices to returns by quarterly ## # A tibble: 60 × 3 ## asset date returns ## <chr> <date> <dbl> ## 1 AMZN 2012-03-30 0.123 ## 2 AMZN 2012-06-29 0.120 ## 3 AMZN 2012-09-28 0.108 ## 4 AMZN 2012-12-31 -0.0137 ## 5 AMZN 2013-03-28 0.0604 ## 6 AMZN 2013-06-28 0.0412 ...
670 sym 1 img