程序代写 STAD70 Statistics & Finance II

STAD70 Statistics & Finance II
Assignment 2
Due date: March 9, 2021 (by 11:59pm). Late submissions will be penalized.
Include your codes in your submission.

Copyright By PowCoder代写 加微信 powcoder

(Open ended question) On Feb 3, 2022, the stock price of Meta Platforms Inc (symbol FB) dropped by more than 25%.
(a) Given reason(s) to explain the price drop. (no less than 150 words)
(b) Discuss the event in relation to the efficient market hypothesis. Does it support or oppose the EMH? (no less than 200 words)
In both parts, cite all references (news articles, research papers, price charts, etc) that you use.
Consider a stationary AR(1) process
rt = φrt−1 + εt,
where |φ| < 1 and (εt) is an i.i.d. white noise process. Show that the theoretical variace ratio is equal to VR(q)=1+2 φ −2φ(1−φq), q=1,2,.... 1−φ q (1−φ)2 (b) In Theorem 5.5 of the lecture notes we cited a result about the variance ratio: suppose rt are i.i.d. (and satisfy suitable technical conditions). Then, as T → ∞, 1) converges in distribution to N(0, 2(q−1)). [In the earlier version, the p there should be a q, where q is the lag.] In this problem, we consider a simulation study to observe this convergence. i.i.d. i.i.d. Consider two cases: (i) rt ∼ N (0, 1) and (ii) rt ∼ Laplace(0, 1). that the Laplace distribution Laplace(μ, b) has density 1 􏰅 |x−μ|􏰆 Here we recall f(x)=2bexp − b , x∈R. Consider q = 1,2,3,4,5 and T = 10,100,1000,10000. For each case and each q-T pair, simulate N = 5000 batches of data points. The N batches provide an empirical √ distribution for the distribution of T(VR(q) − 1). Plot a density estimate and compare with that of the asymptotic distribution. Your final output should contain 20 = 5 × 4 graphs (arrange them in a matrix of graphs). Comment on the results. 3. (Quadratic programming) (a) Prove Proposition 6.10 of the lecture notes (shape of the unconstrained efficient fron- tier). (b) A quadratic programming problem is an optimization problem of the form min 1b⊤Db − d⊤b subject to A⊤b ≥ b0. In R, this can be implemented numerically using the package quadprog. Consider a collection of risky assets (with given mean vector μ and covariance matrix Σ). Using the quadprog package, write a single function that plots that produces the efficient frontier under the constraint that no short selling is allowed (i.e., w ≥ 0 where w is the vector of portfolio weights. Your function should be of the form plotEF <- function(mu, Sigma) { # implementation (it can call other functions) # at some point you need to plot the frontier # e.g. plot(...) Note that your function can call other auxiliary functions. The main point is that you must wrap the call to plot() (or similar functions such as ggplot()) in plotEF(), and cannot do so in the main script. (c) Plot the frontier in (b) for the following μ and Σ: set.seed(15) # for reproducibility n_assets <- 10 # number of assets mu <- rnorm(n = n_assets, mean = 0.1, sd = 0.1) A <- matrix(rnorm(n_assets*n_assets, mean = 0, sd = 0.2), nrow = n_assets) Sigma <- diag(rep(0.1, n_assets)) + (5/n_assets)*(A %*% t(A)) 4. Consider the following stocks (in the Dow Jone index): symbol_seq <- c("MMM", "AXP", "AMGN", "AAPL", "BA", "CAT", "CVX", "CSCO", "KO", "DIS", "GS", "HD", "HON", "IBM", "INTC", "JNJ", "JPM", "MCD", "MRK", "MSFT", "NKE", "PG", "CRM", "TRV", "UNH", "VZ", "V", "WBA", "WMT") Consider daily (arithmetic) return of these stocks from 2017-01-01 to 2022-1-31. We use the data from 2017-01-01 to 2019-12-31 for fitting, and the data from 2020-01-01-2022- 01-31 for testing. For the purposes of this problem, we ignore the time dependency of the returns. In this problem, we are interested in finding the global minimum variance portfolio. (a) Randomly assign the fitting data into two parts. The first part (70%) will be used as training data, and the rest (30%) will be use for validation. When missing data exists, use the maximal subset of dates such that the return exists for all stocks. (b) For α ∈ {0, 0.05, 0.1, . . . , 0.95, 1}, consider the shrinkage estimator Σ ̃ = (1 − α)Σˆ + αDˆ , where Σˆ is the sample covariance matrix, and Dˆ is the diagonal matrix of Σˆ. For each α, estimate Σ ̃ using the training data. Compute the global minimum variance portfolio under the no short selling constraint (see Problem 3). (c) Using the validation data, pick the α∗ which minimizes the standard deviation of the portfolio. (d) Using the α∗ from (c) and the corresponding portfolio, compute the realized standard deviation of the returns in the testing period. Comment on the performance of your estimator. [This last part is non-trivial and a good answer can grant you extra credits (at most 5%, and your total for this assignment cannot exceed 100%).] 程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com