Publications by Vince Ubaike
Quiz 1
# Load packages library(tidyquant) library(tidyverse) # for count() function # Import S&P500 Stock Index SP500 <- tq_index("SP500") SP500 ## # A tibble: 505 x 8 ## symbol company identifier sedol weight sector shares_held local_currency ## <chr> <chr> <chr> <chr> <dbl> <chr> <dbl> <chr> ## 1 AAP...
844 sym R (1735 sym/4 pcs)
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 = "2020-01-01") # Calculate daily returns stock_returns <- stock_prices %>% group_by(...
1738 sym R (3015 sym/8 pcs) 2 img
Quiz 3
# Load packages library(tidyquant) library(tidyverse) Q1 dividends Import dividends of Costco and Target since 2000. mult_stocks <- tq_get(c("COST", "TGT"), get = "dividends", from = "2000-01-01") mult_stocks ## # A tibble: 152 x 3 ## symbol date value ## <chr> <date> <dbl> ...
1330 sym R (4918 sym/15 pcs)
Quiz 4
Witht the given stock, conduct the Bollinger Bands analysis by answering the questions below. Q1 Calculate 20-day moving averages and 20-day running standard deviation. Save the result under stock and print it. Hint: Take stock, pipe it to tidyquant::tq_mutate to calculate 20-day moving averages, pipe it to tidyquant::tq_mutate to calculate 20-d...
2834 sym R (68 sym/1 pcs) 1 img
Quiz 6
Q1 Get monthly returns of Facebook, Amazon, and Netflix for the last 5 years. # Load packages library(tidyverse) library(tidyquant) from <- today() - years(5) stock_returns_monthly <- c("FB", "AMZN", "NFLX") %>% tq_get(get = "stock.prices", from = from) %>% group_by(symbol) %>% tq_transmute(select = adjusted...
1515 sym R (8274 sym/18 pcs)
Quiz 5
# Load packages library(tidyquant) library(tidyverse) # Import stock prices and calculate returns returns_quarterly <- c("^DJI", "^GSPC", "^IXIC") %>% tq_get(get = "stock.prices", from = "1990-01-01", to = "2020-11-01") %>% group_by(symbol) %>% tq_transmute(select = adjusted, mu...
3370 sym R (8297 sym/19 pcs) 1 img
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...
4216 sym