Publications by Yuri McClure

Quiz1

09.09.2020

# 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...

1107 sym R (1736 sym/4 pcs)

Quiz3

07.10.2020

# 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> ...

1386 sym R (4962 sym/15 pcs)

Quiz2

23.09.2020

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(...

2010 sym R (2774 sym/8 pcs) 2 img

Quiz4

24.10.2020

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...

2820 sym R (68 sym/1 pcs) 1 img

Term Paper

21.11.2020

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...

6356 sym

Quiz 6

20.11.2020

Q1 Get monthly returns of Facebook, Amazon, and Netflix for the last 5 years. library(tidyquant) library(tidyverse) 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, ...

1833 sym R (8190 sym/18 pcs)

Quiz5

06.11.2020

# 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...

3382 sym R (8051 sym/19 pcs) 1 img