Publications by Joaquin German
Quiz5
Description of the data, data_quiz5 country continent lifeExp life expectancy in year pop total population gdpPercap GDP per capita in U.S. dollar Q1 Import data Hint: The data is posted in Moodle. Look for data_quiz5.csv under the Data Files section. myClusterData <- read.csv("data_quiz5.csv") Q2 Review data Hint: Use head() to display the fi...
1487 sym R (2367 sym/5 pcs) 1 img
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...
1303 sym R (1736 sym/4 pcs)
Quiz2
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(...
1420 sym R (2879 sym/8 pcs) 2 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...
4776 sym
Quiz 5
# Load packages library(tidyquant) ## Warning: package 'tidyquant' was built under R version 4.0.3 library(tidyverse) ## Warning: package 'tidyverse' was built under R version 4.0.3 # Import stock prices and calculate returns returns_quarterly <- c("^DJI", "^GSPC", "^IXIC") %>% tq_get(get = "stock.prices", from = "1990-01-01",...
2801 sym R (8612 sym/23 pcs) 1 img
Quiz 6
Q1 Get monthly returns of Facebook, Amazon, and Netflix for the last 5 years. # Load packages library(tidyquant) ## Warning: package 'tidyquant' was built under R version 4.0.3 library(tidyverse) ## Warning: package 'tidyverse' was built under R version 4.0.3 from <- today() - years(5) stock_returns_monthly <- c("AMZN", "NFLX", "FB") %>% ...
1515 sym R (7521 sym/20 pcs)