Publications by Yuxia Wu
Term Project
Q1 What is the title of the finance student competition you may consider competing? Hint: You may Google search something like “student competitions in finance”. The Finance club’s trading game. http://www.jeuboursier.ch Q2 Describe the eligibility requirements, if any (e.g., undergraduate college student). The game takes place over 4 weeks...
6299 sym
Quiz 6
This note came from Matt Dancho’s webpage. Factor models are used in many financial appplications, suhc as: identifying the determinants of a security’s return cost of capital (rate of return required by an investor to hold the share) calculations Capital Asset Pricing Model (CAPM) is the most popular factor model. Although CAPM does not pe...
2074 sym R (5720 sym/10 pcs)
Bollinger Bands Analysis
## # A tibble: 129 x 8 ## symbol date open high low close volume adjusted ## <chr> <date> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> ## 1 ^GSPC 2019-05-01 2952. 2954. 2923. 2924. 3645850000 2924. ## 2 ^GSPC 2019-05-02 2922. 2932. 2900. 2918. 3778890000 2918. ## 3 ^GSPC 2019-05-03 2929. 2948. 2929. 2946. 33381...
2563 sym R (7732 sym/10 pcs) 2 img
Moving Average Analysis
The code for the moving average analysis below is taken from: https://www.r-bloggers.com/tidyquant-bringing-quantitative-financial-analysis-to-the-tidyverse/. ## # A tibble: 252 x 8 ## symbol date open high low close volume adjusted ## <chr> <date> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> ## 1 AMZN 2019-04-29 1949 1956. ...
1428 sym R (7487 sym/9 pcs) 3 img
Does stock market lead the economy?"
stock.prices ## # A tibble: 2,848 x 8 ## symbol date open high low close volume adjusted ## <chr> <date> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> ## 1 ^IXIC 2009-01-02 1579. 1636. 1572. 1632. 1438410000 1632. ## 2 ^IXIC 2009-01-05 1621. 1640. 1605. 1628. 1816580000 1628. ## 3 ^IXIC 2009-01-06 1642. 1666. 16...
1335 sym R (4906 sym/8 pcs) 2 img
Quiz 5
Q1 Import stock prices of NASDAQ Compsite Index, Microsoft and Walmart for the last 30 years. Hint: Add group_by(symbol) at the end of the code so that calculations below will be done per stock. ## # A tibble: 22,677 x 8 ## # Groups: symbol [3] ## symbol date open high low close volume adjusted ## <chr> <date> <dbl> <dbl...
2481 sym R (3458 sym/8 pcs)
Quiz 4
Q1 Import Tesla for the last ten months. Hint: Revise the given code below. ## # A tibble: 209 x 8 ## symbol date open high low close volume adjusted ## <chr> <date> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> ## 1 TSLA 2019-06-14 211. 217. 210. 215. 7433400 215. ## 2 TSLA 2019-06-17 215. 227 214. 225. 123...
1774 sym R (3802 sym/5 pcs) 2 img
Quiz 3
# Load packages library(tidyquant) library(tidyverse) library(dplyr) Q1 economic data Import the U.S. Industrial Production Index since 2010. Hint: Find the symbol in FRED. Production <- tq_get("INDPRO", get = "economic.data", from = "2010-01-01") Production ## # A tibble: 122 x 2 ## date price ## <date> <dbl> ## 1 2010-01-01 ...
1380 sym R (4087 sym/14 pcs) 1 img
Does stock market lead the economy?"
stock.prices economic.data Merge Plot Q1. stock.prices Import S&P500 since 1999. Hint: Google tidyquant::tq_get() to find example codes. Q2. Prepare the imported stock prices for merge. Hint: Calculate yearly returns; create a new variable, year; and drop date. Q3 economic.data Import real U.S. GDP growth since 2000. Hint: Find the symbol in ...
1162 sym 2 img
Importing Financial Data
Q1. dividends Import dividends of Apple and Microsoft since 2010. library(tidyquant) tq_get(c("WMT"), get = "stock.prices", from = "2010-01-01") ## # A tibble: 2,559 x 7 ## date open high low close volume adjusted ## <date> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> ## 1 2010-01-04 53.7 54.7 53.7 54.2 2075...
1142 sym R (3080 sym/12 pcs) 3 img