Publications by Hailey Botelho
Quiz 2
In this exercise, use Chapter 4.2 Quantitative vs. Quantitative Data Visualization with R. # Load packages library(tidyquant) library(tidyverse) # Import stock prices stock_prices <- tq_get(c("AAPL", "MSFT", "AMZN"), get = "stock.prices", from = "2021-01-01") # Calculate daily returns stock_returns <- stock_prices %>% group_by(symbol) ...
2425 sym R (2767 sym/8 pcs) 2 img
Quiz 3
# Load packages library(tidyquant) library(tidyverse) Q1 dividends Import dividends of General Motors and Ford since 2010. mult_stocks <- tq_get(c("GM", "F"), get = "dividends", from = "2010-01-01") mult_stocks ## # A tibble: 58 x 3 ## symbol date value ## <chr> <date> <dbl> ## 1 G...
1496 sym R (5040 sym/17 pcs)
Quiz 5
# Load packages library(tidyquant) library(tidyverse) # Import stock prices and calculate returns returns_yearly <- c("^DJI", "^GSPC", "^IXIC") %>% tq_get(get = "stock.prices", from = "1990-01-01", to = "2020-11-01") %>% group_by(symbol) %>% tq_transmute(select = adjusted, mutate_fun = ye...
2183 sym R (5541 sym/19 pcs) 1 img
Quiz 6
Q1 Get monthly returns of Tesla, Amazon, and Netflix for the last 5 years. Asset Period Returns # Load packages library(tidyquant) library(tidyverse) from <- today() - years(5) stock_returns_monthly <- c("AMZN", "NFLX", "TSLA") %>% tq_get(get = "stock.prices", from = from) %>% group_by(symbol) %>% tq_transmute(select ...
1987 sym R (12323 sym/24 pcs)
Term Paper
Finance students in the past have participated in national student competitions. They are a great opportunity to practice and further your knowledge and skills you learned in the finance program at PSU. Because not all of you are finance major, grading will be generous as long as you follow the instructions (e.g., number counts for answers). In a...
6943 sym
Quiz 5 Make Up
# Load packages library(tidyquant) library(tidyverse) # Import stock prices and calculate returns returns_monthly <- c("AMZN", "AAPL", "MSFT") %>% tq_get(get = "stock.prices", from = "1990-01-01", to = "2020-11-01") %>% group_by(symbol) %>% tq_transmute(select = adjusted, mutate_fun = mon...
3647 sym R (5225 sym/20 pcs) 1 img