Publications by Jack Tortolani
Code Along 4
# Load packages # Core 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...
217 sym R (3123 sym/8 pcs) 1 img
Apply it to your own data 3
# Load packages library(tidyverse) library(tidyquant) Get stock prices and convert to returns Ra <- c("XOM", "NVDA", "SNAP","TSLA","WIX") %>% tq_get(get = "stock.prices", from = "2022-01-01") %>% group_by(symbol) %>% tq_transmute(select = adjusted, mutate_fun = periodReturn, p...
190 sym R (3392 sym/11 pcs)
CodeAlong 3 Performance Analysis
# Load packages 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 �...
139 sym R (4432 sym/12 pcs)
Code Along 3 Td_Get
#load Packages 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 ✔...
117 sym R (2305 sym/13 pcs)
Code Along 3 Charting TdGet
#load packages library(tidyverse) # core functions ## ── 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 ## ✔ lubrid...
59 sym R (2303 sym/8 pcs) 3 img
Reproduce Finance with r
Provide Major Takeaways from Ch1 in 50 words In reproducible finance goal is to replicate data and code in a way that can replicated and understood efficiently. There are 3 Universes xts, tidyverse, and tidyquant which each is the structure to our code. The amount of Packages R has makes it so powerful as it’s built on work of thousands of ind...
361 sym
Apply it to your data 2
Import stock prices stocks <- tq_get(c("BALY", "GE", "NVDA", "SNAP", "CRON", "XOM"), get = "stock.prices", from = "2018-01-01", to = "2024-06-01") stocks ## # A tibble: 9,335 × 8 ## symbol date open high low close volume adjusted ## <chr> <date> <dbl> <dbl> <dbl> <dbl> ...
200 sym Python (5070 sym/17 pcs) 1 img
Code Along 2 Chapter5
#Import Data flights ## # A tibble: 336,776 × 19 ## year month day dep_time sched_dep_time dep_delay arr_time sched_arr_time ## <int> <int> <int> <int> <int> <dbl> <int> <int> ## 1 2013 1 1 517 515 2 830 819 ## 2 2013 1 1 533 529 ...
569 sym Python (20211 sym/51 pcs) 1 img
Code Along 2 Chapter4
Coding basics R as a calculator 69^2 ## [1] 4761 x<- 69/420 # x assignment symbol What’s in a name? Calling functions Use of TAB seq(from = 1, to = 10, by = 1) ## [1] 1 2 3 4 5 6 7 8 9 10 continuation character, + seq(from = 1, to = 10) ## [1] 1 2 3 4 5 6 7 8 9 10 Printing to screen y <- seq(from = 1, to = 10)...
170 sym Python (186 sym/8 pcs)
Apply it to your data 1
Import stock prices stocks <- tq_get(c("BALY", "GE", "NVDA", "SNAP", "CRON", "XOM"), get = "stock.prices", from = "2018-01-01", to = "2024-06-01") stocks ## # A tibble: 9,335 × 8 ## symbol date open high low close volume adjusted ## <chr> <date> <dbl> <dbl> <dbl> <dbl> ...
50 sym Python (1108 sym/3 pcs) 1 img