Question
Use R (R studio) to solve the following Empirical Data exercise. 1) Pick a data set consisting of FIVE stocks or indices or FX from
Use R (R studio) to solve the following Empirical Data exercise.
1) Pick a data set consisting of FIVE stocks or indices or FX from Yahoo Finance or other sources at a daily level. Time periods: from Jan. 01, 2010, to Dec. 31, 2020. Use all five-time series to do the following. (As a note: you are going to use this dataset for all assignments throughout the whole term for this course.)
(i) Histogram the distributions of the prices for each. Calculate the mean, variance, skewness, and kurtosis of your price series. Plot the ACF for each series.
(ii) Histogram the distribution of the returns (use the following formula). Calculate the mean, variance, skewness, and kurtosis of your return series. Plot the ACF for each series. Do you think they are normally distributed? rt = 100[log(pt) log(pt1)]
(iii) Histogram the distribution of the squared returns. Plot the ACF for each squared return series.
(iv) Calculate the correlation between the return and trading volume for each.
(v) Write a code for computing the following conditional probabilities for each data series:
(a) Prob (stock price increases at t | stock price increases at t 1)
(b) Prob (stock price increases at t | stock price decreases at t 1)
(c) Prob (stock price decreases at t | stock price increases at t 1)
(d) Prob (stock price decreases at t | stock price decreases at t 1)
(vii) Write a code for computing the following conditional probabilities for each data series:
(a) Prob (stock price increases at t | trading volume increases at t 1)
(b) Prob (stock price increases at t | trading volume decrease at t 1)
(c) Prob (stock price decreases at t | trading volume increases at t 1)
(d) Prob (stock price decreases at t | trading volume decreases at t 1)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started