R语言代写|R语言代做|R语言代考
当前位置:以往案例 > >案例R之Strategy Design Back of America (BAC) from Aug
2019-05-28

PART II – Strategy Design(60 points)

Problem Description: Consider the daily stock price for Back of America (BAC) from August 21, 2009 to August 20, 2010 in the file sp500hst.txt. In this problem, you are given $100,000 capital to invest. Your goal is to max- imize your client’s profitability. But at the same time, you need to measure your investment risk based on your client’s risk utility. Here we assume that your client is risk averse, but she is willing to adjust her risk position, if she can be convinced. You are considering design a trading strategy for BAC stock based on this one year historical data. You need to write a proposal to your client about your strategy, performance and describe your back testing procedure.


image.png




Year

S&P 500 Index Annual Return (Wikipedia)

2007

5.49%

2008

-37.00%

2009

26.46%

2010

15.06%

2011

2.05%







Note: You will use S&P 500 Index Annual Return as the benchmark rf .

You are to use relative return to calculate ri for each of your trades as:


r = Ending price − Beginning price

i Ending price


project: You will need to do the following for this project:

(1) Assume that you are considering many strategies, but particularly you are testing Moving Average Convergence/Divergence (MACD) at this point. Create a momentum trading strategy based on MACD method to invest $100,000 client’s money. Note that you need to use the fast EMA (12 days) and the slow EMA (26 days), and 9 days for the signalline = ema(M ACDt; 9) for this project. Please provide the average return and variance of return for the entire period. (30 points)

(2) To simplify the problem, hedging is not part of your project. How- ever, you do need to measure your risk. Suppose you can use S&P 500 Index return during the same period as your risk free rate (annual return rates of S&P 500 Index of the last five years are provided in the table above). Measure your risk adjusted performance using Sharpe ratio:

RSharpe = E[ri − rf ]/.V ar(ri − rf )




where rf is the risk-free asset return, ri is return at time i, and V ar(ri − rf ) is the standard deviation of the asset’s excess return at time i. Assume you choose parameter m for the signalline = ema(M ACDt; m) to op- timize your strategy. You need to evaluate the options of m = 7, 9, 11.

Please calculate Sharpe ratios for the three options and choose one best strategy for your client. (30 points) [Hint: calculate exces- sive return for each of your returns (ri − rf ) to the Sharpe ratio, and rf is only different for different years.]



在线提交订单