Publications by Justin Shokal
Apply 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("TSLA", "GOOG", "XOM", "NFLX", "META") prices <- tq_get(x = symbols, ...
822 sym R (2801 sym/14 pcs) 1 img
Code Along 8
# 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,...
429 sym R (3888 sym/16 pcs) 3 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("TSLA", "GOOG", "XOM", "NFLX", "META") prices <- tq_get(x = symbols, get = "stock.prices", ...
985 sym R (2837 sym/16 pcs) 1 img
Code Along 7
# 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,...
432 sym R (4875 sym/20 pcs) 3 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 symbols <- c("AMZN", "HD", "TSLA", "NFLX", "GOOG") prices <- tq_get(x = symbols, ...
1371 sym R (3498 sym/18 pcs) 1 img
Code Along 6
# 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,...
402 sym R (4251 sym/21 pcs) 2 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", "HD", "TSLA", "NFLX", "GOOG") prices <- tq_get(x = symbols, get = "stock.prices", ...
507 sym R (2435 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,...
352 sym R (2698 sym/14 pcs) 3 img
Apply 4
1 Import stock prices of your choice 2 Convert prices to returns by quarterly 3 Make plot 4 Interpret the plot As you can see from looking at the three plots, Apple and Microsoft have a higher expected quarterly return than Google. Apple’s most frequent quarterly returns are .17 and -.04. Google’s most frequent quarterly return is -.01. ...
728 sym 1 img
Code Along 4
# Load packages # Core library(tidyverse) ## Warning: package 'tidyverse' was built under R version 4.2.2 ## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ── ## ✔ ggplot2 3.3.6 ✔ purrr 0.3.4 ## ✔ tibble 3.1.8 ...
218 sym R (2649 sym/9 pcs) 1 img