当前位置:天才代写 > 作业代写,留学生作业代写-北美、澳洲、英国等靠谱代写 > 计算金融代写 Computational Finance代写

计算金融代写 Computational Finance代写

2021-07-05 17:09 星期一 所属: 作业代写,留学生作业代写-北美、澳洲、英国等靠谱代写 浏览:664

计算金融代写

Computational Finance – HW 3

计算金融代写 Complete the following problems in your homework groups. In this question, you will construct an investment strategy and assess its performance.

Complete the following problems in your homework groups. All calculations must be done in Matlab. When the question tells you to report or output an answer, your code must print it using the fprintf function. When the question tells you to plot something, you must copy and paste the plot into your Word file. When the question asks you to describe something or compare, you need to answer it in your own words. You may type your answer directly in the Word file that you will be submitting.

You may find it easiest to have a separate Matlab script file (ending in .m) for each question. But as I said in class, copy and paste both your code and your output from all questions into one Word file. See the Sample Homework on OneDrive as a template. I recommend starting each script file with commands to close all figures, clear the workspace, and clear the command window: close all; clc; clear;

1.  计算金融代写

In this question, you will construct an investment strategy and assess its performance. Begin by creating an API key with Alpha Vantage, if you have not already done so in class. Refer to the slides for instructions.

a.

Download monthly adjusted stock prices in CSV format from Alpha Vantage for the following 4 companies. Refer to the slides for instructions. I recommend you rename each company’s file as TICKER.csv, where TICKER is the company’s ticker as specified below.

i. Deutsche Bank (ticker: DB)

ii. Johnson & Johnson (ticker: JNJ)

iii. Occidental Petroleum (ticker: OXY)

iv. Walmart (ticker: WMT)

b.  计算金融代写

For each dataset, import into a MATLAB table, create a column of monthly log returns and name it to be the same as the ticker of the company. Inner-join your tables together using the timestamp as the key. Your final table should have one column of timestamps and then 4 columns of log returns for each company.

c.

Import the Fama-French factors data into MATLAB. Convert dates and returns like we did in class, and inner-join this table with the table of stock returns.

d.  计算金融代写

Calculate the beta of each company using only returns from December 2009 to December 2014. Use fprintf() to report your results in a table where the first column is the ticker and the second column is the beta. There should be 5 rows – a row of headings, and one row for each of the four firms.

We will now construct a portfolio, where we will go long (take positive positions in) the two lowest-beta stocks and we will go short (take negative positions in) the two highest-beta stocks.

计算金融代写
计算金融代写

The idea behind long-short portfolios is as follows. The portfolio manager goes long stocks that she believes will perform well and short similar stocks that she believes will perform less well (not necessarily poorly). The less-well performing stocks act as a hedge. For example, if the overall market goes down, the long leg of the portfolio will go down, but the short leg will go up. As a result, she expects to generate a high return with limited market exposure.

This is an investment strategy called “betting against beta” and was introduced by AQR, a large quantitative asset manager.

e.  计算金融代写

Add a column to your table containing the return on this long-short portfolio. It should be equally-weighted. In other words, you should have equal positive weights (summing to 1) in the two low-beta stocks and equal negative weights (summing to -1) in the two high beta stocks.

What is the average return on this portfolio starting in from January 2015 until now? What is the volatility?

f.  计算金融代写

When constructing long-short portfolios with high returns, we should make sure that these returns are not just compensation for high beta. Recall CAPM – you can always generate a high expected return by investing in a high-beta stock. But then you’re just taking on extra market risk. So let’s check to see if the betting-against-beta portfolio you constructed is a high-beta portfolio or if it indeed has high alpha– positive performance unrelated to its market exposure.

Compute the beta of the portfolio. Note: unlike for long-only portfolios, you do not need to subtract the risk-free rate. This is because a long-short portfolio is self-financing i.e. it finances investments in the long leg with funds raised by selling the short leg.

g.  计算金融代写

You now know the average return on the portfolio and its beta. You can also calculate the average market return in excess of the risk-free rate over the same period. Use these three variables to compute the alpha of the portfolio:

Report the alpha and beta of your portfolio. Over the past 5 years, has it been a good investment?

 

计算金融代写
计算金融代写

 

其他代写:homework代写 assignment代写  essay代写 app代写 algorithm代写 analysis代写  作业代写  作业加急 Exercise代写 英国代写 加拿大代写 北美代写  北美作业代写  澳大利亚代写 code代写 assembly代写 CS代写 Data Analysis代写 data代写 

合作平台:essay代写 论文代写 写手招聘 英国留学生代写

 

天才代写-代写联系方式