Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due
FE5214 Final Assignment, Due: Monday, 22 April 2024
Submit your answers to Canvas. Word and PDF files are acceptable. Please include your name (family name first) at the beginning of the filename.
Part A
You will construct two alpha factors: V and M for the US market.
V is based on the prior 5-day returns and M is the MAX factor discussed in the lecture. The steps to construct factor V are the same as in Assignment 2. For simplicity, ranking is not used to construct V and M.
1. Consider the US market and the years 2004 to 2023 (you will also
need some data in 2003 to calculate the alpha factor). The universe used for each year will be based on the universe from the start of the year (defined in the univ_h.csv file).
2. To construct factor V
a) calculate the daily volatility σi (t) using the prior 21 days of daily returns (use the log return ri(t') = In , t ′ = t − 20, … , t , the return is set to 0 if there is an “NA” in the adjusted prices). If σi (t) obtained is less than 0.005, set it to 0.005.
b) calculate the prior 5-day return; you can use the log-return vi(t) = In (again, the return is set to 0 if the prices are not available)
c) normalize the variable by dividing the volatility σi (t) obtained in step a), vi (t) ← vi (t)/σi (t)
d) subtract out the industry component, vi (t) ← vi (t) − vI (t) , where vI (t) is the average of vi (t) (after step c) over all the stocks in the industry (and in the universe of time t) that the stock i belongs to
3. To construct factor M
a) Use the daily returns for the past 21 trading days, ri (t′) = In , t ′ = t − 20, … , t , calculated in Step 2a).
b) subtract out the corresponding industry component (calculated using a simple average): Ri (t′) = ri (t′) − rI (t′), t ′ = t − 20, … , t
c) get the maximum value, mi (t) , of the magnitudes of the prior 21 values, |Ri (t′)|, t ′ = t − 20, … , t. The normalization by the volatility is not applied to this factor.
d) subtract out the industry component, mi (t) ← mi (t) − mI (t) , where mI (t) is the average of mi (t) over all the stocks in the industry (and in the universe of time t) that the stock i belongs to.
4. Do a cross-sectional regression of the next day's return Ri (t + 1) ≡ Ri (t, t + 1)
Ri (t + 1) = βv (t)vi (t) + βm (t)mi (t) + Ei, i = 1, … , N
on day t and get the time series of βv (t) and βm (t) . Here Ri (t + 1) is defined as Ri (t + 1) = ri (t + 1) − rI (t + 1) ,
where ri (t + 1) = In ) and the industry return rI (t + 1) is the simple average of ri (t + 1) over all the stocks in the industry (and in the universe of time t) that stock i belongs to.
5. From the years 2005 to 2023, calculate the 2-year averages of
βu (t) and βv (t) , and the t-stat, and , where T is the number of trading days in the year and the year before (for example, the average obtained for the year 2005 is over the years 2004 and 2005) and σβv and σβm are the standard deviation of
βu (t) and βv (t) calculated using βu (t), βv (t) obtained in these two-year periods. List the two-year average betas and the t-stat obtained in a table.
Part B
From the years 2006 to 2023, use the two-year averages βv, βm calculated (in Part A) from the previous two years (for example, for the year 2006, use the 2-year average of years 2004 and 2005 obtained in Part A) and evaluate the expected returns for all trading days of the year,
REi (t, t + 1) = βvvi (t) +β(m mi (t)
Construct and evaluate the portfolio as follows,
1. On each day t, rank the stocks according to the expected returns, and long (with equal weights) the top 20% of the stocks with the largest values of REi (t, t + 1) and short the bottom 20% of the stocks with the smallest values (most negative values) of REi (t, t + 1)
2. Get the portfolio return at each time step t. The return is on the long market value of the portfolio, so it is the sum of the returns on individual positions divided by the number of long positions in the portfolio,
where Nl and Ns are the number of long and short positions (both are equal to 0.2 × N , N is the number of stocks in the universe for that year). L(j) is the stock index of the long position j. S(j) is the stock index of the short position j. Note that when calculating the portfolio return, the full return ri (t + 1) ≡ ri (t, t + 1) without subtracting the market return is used.
3. For each year calculate the annual return (assuming the cost of trading is 0, and for simplicity simply add up all daily portfolio returns to get the annual return) and the annualized return volatility of the portfolio. List your results in a table. Which are the best and the worst years for the strategy?
Part C
Assume that the percentage trading cost is 5 bps and calculate the portfolio returns, taking into account the cost. Compare the results to the case when the costs are not taken into account. For simplicity, we assume the LMV (the long market value) of the portfolio is kept the same and we ignore the cost of maintaining the constant LMV.