这个Assignment是用R语言预测股票走势

Assignment 1
1. Use the attached data of daily equity prices given by the Shanghai Composite Index,
a) Calculate the mean annualized return since 2000
b) Calculate the annualized volatility since 2000
c) Calculate the skewness and kurtosis over the same period. Is there evidence of fat tail?
d) Test the efficient market hypothesis by looking at the first 10 autocorrelations. What do you conclude?
e) Test for volatility clustering by looking at the first 10 autocorrelations of squared returns.
2. Calculate annualized historical volatilities for each day over the whole sample period. Do it once with monthly window and again with annual window.
a) Which has the greatest differences between high and low volatility?
b) Which has the biggest mean, standard deviation and kurtosis? (Use the common sample)
c) Draw the histograms of volatilities.
d) What events correspond to these volatilities?
3. Calculate the exponentially weighted annualized volatilities using .06 and .02 as weights.
a) Plot these series on the same graph and attach it.
b) What is the maximum volatility over this sample period and when does it occur?
4. If a tax were put on stock market transactions, it would probably substantially reduce trading. What do you expect it to do to volatility of individual stocks and stock indices? Explain.

 

作业 1
1、使用附上证指数给出的每日股票价格数据,
a) 计算自 2000 年以来的平均年化回报率
b) 计算自 2000 年以来的年化波动率
c) 计算同期的偏度和峰度。 有肥尾的证据吗?
d) 通过查看前 10 个自相关来检验有效市场假设。 你得出什么结论?
e) 通过查看平方回报的前 10 个自相关来测试波动率聚类。
2. 计算整个样本期间每一天的年化历史波动率。 对月度窗口进行一次,对年度窗口进行一次。
a) 高波动率和低波动率之间哪个差异最大?
b) 哪个具有最大的均值、标准差和峰度? (使用普通样本)
c) 绘制波动率直方图。
d) 哪些事件对应于这些波动性?
3. 使用 .06 和 .02 作为权重计算指数加权年化波动率。
a) 在同一张图上绘制这些系列并将其附上。
b) 这个样本期间的最大波动率是多少?它何时发生?
4. 如果对股票市场交易征税,可能会大大减少交易。 您预计它会对个股和股指的波动性产生什么影响? 解释。