Publications by Bella Kalinyak
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...
451 sym R (15511 sym/50 pcs) 5 img
Document
# Load packages # Core library(tidyverse) library(tidyquant) library(nycflights13) Functions When should you write a function # For reproducible work set.seed(1234) # Create a data frame df <- tibble::tibble( a = rnorm(10), b = rnorm(10), c = rnorm(10), d = rnorm(10) ) # Rescale each column df$a <- (df$a - m...
270 sym R (2633 sym/26 pcs)
Document
Set up library(tidyverse) library(tidyquant) # for financial analysis library(broom) # for tidy model results library(umap) # for dimension reduction library(plotly) # for interactive visualization Data # Get info on companies listed in S&P500 sp500_index_tbl <- tq_index("SP500") # Get individual stocks from S&P500 sp500_symbols <- sp500_...
1936 sym R (10885 sym/28 pcs) 4 img
Document
# 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 2017-12-31 1 Import stock prices symbols <- c("TM", "SBUX", "AEO", "BBW") prices <- tq_get(x = symbols, get = "stock.prices", f...
1081 sym R (2953 sym/16 pcs) 1 img
Document
Set up library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.4 ✔ readr 2.1.5 ## ✔ forcats 1.0.0 ✔ stringr 1.5.1 ## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1 ## ✔ lubridate 1.9.3 ✔ tidyr ...
287 sym R (12105 sym/38 pcs) 4 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 = symbols,...
477 sym R (3618 sym/17 pcs) 2 img
Document
Import Data library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.4 ✔ readr 2.1.5 ## ✔ forcats 1.0.0 ✔ stringr 1.5.1 ## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1 ## ✔ lubridate 1.9.3 ✔ tid...
697 sym R (39195 sym/45 pcs) 7 img 4 tbl
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("TM", "SBUX", "AEO", "BBW") prices <- tq_get(x = symbols, get = "stock.prices", from = "2...
1457 sym R (3250 sym/14 pcs) 1 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("TM", "SBUX", "AEO", "BBW") prices <- tq_get(x = symbols, get = "stock.prices", from = "2...
748 sym R (3692 sym/16 pcs) 1 img
Publish 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("TM", "SBUX", "AEO", "BBW") prices <- tq_get(x = symbols, get = "stock.prices", from = "2...
1294 sym R (4638 sym/18 pcs) 3 img