首页 > > 详细

代写MATH2070/2970: Optimisation and Financial Mathematics Semester 2, 2025代做留学生R程序

项目预算:   开发周期:  发布时间:   要求地区:

Assignment

MATH2070/2970: Optimisation and Financial Mathematics

Semester 2, 2025

Due on Thursday 30th October at 11:59pm via Canvas

MATH2070: Do all questions except Question 6.

MATH2970: Do all questions except Question 5.

• Please submit both

– a Jupyter notebook (.ipynb file) and

– a pdf file version of your Jupyter notebook (see instructions below). Make sure your pdf displays all your code and results properly (e.g. no lines of code going past the edge of the page).

• Your submission should contain all the code you used to produce your results, all your results (including plots), and any analysis/mathematical calculations you performed.

• Assessment will be based on correctness, programming and presentation.

• In the case of late submission, for each day late (up to a maximum of 10 days), you will be deducted 5% of the maximum marks. Make sure you submit in time; a submission at 11:59:01pm will incur an automatic deduction of 5%. It is your responsibility to check that your submission was successful.

• Academic dishonesty is taken very seriously. You may discuss the questions with your peers, however, you should write your solutions in your own words. Do not copy from each other.

Exporting Jupyter notebooks to pdf

In my experience, the best way to do this is: in Jupyter, go to File → Download as → HTML, and save this .html file to your computer. Then open the .html file in a web browser and print to PDF (e.g. in Chrome, the print menu has a ‘save as pdf’ option). Exporting Jupyter directly to PDF (via LaTeX) requires you to have LaTeX installed, and can have formatting errors.

Data provided

The file project_data.csv is a comma-separated text file containing the stock prices from 1 July 2022 to 30 June 2023 (inclusive) for the 5 companies listed on the Australian Stock Exchange (ASX) by market capitalisation (i.e. total value of stocks):

• BHP — BHP Group Ltd, a mining company (mostly coal, copper, iron ore and oil)

• CSL — CSL Ltd, a biotechnology company (manufactures vaccines, antivenoms, etc)

• NAB — National Australia Bank, a retail bank (manages savings, offers business loans, mortgages, credit cards, etc)

• TCL — Transurban Group, a road operator (manages toll roads, mostly in Sydney and Melbourne)

• TLS — Telstra Group Ltd, a telecommunications company (sells mobile phone plans, home/business internet, etc)

The stock prices are the end-of-day prices, adjusted to exclude the impact of corporate events (like payments of dividends) which affect the stated share price but do not reflect trading activity.

Questions

1. For each of the 10 stocks, compute their simple returns  where St is the stock price on day t. Calculate the mean and covariance matrix for the returns to 6 decimal places, and confirm they are

and

Use the above rounded values of r and C for the remainder of the project.

2. Find the optimal portfolio x(t) for investors with risk tolerance parameter t (i.e. your answer should be a function of t).

Which assets will never be short-sold by risk-averse investors?

3. Consider a specific investor with risk tolerance parameter t = 0.08 who wants to invest $1,000,000 in these assets.

What is their optimal investment allocation, mean return and risk (standard deviation) of their investment? Give all answers in $.

4. Illustrate this problem graphically: in the (σ, µ) plane, show (on the same graph):

(i) The 10 assets

(ii) The optimal (unrestricted) portfolio for the investor from Question 3

(iii) The minimum risk portfolio

(iv) The efficient frontier and minimum variance frontier

You should format the plot with appropriate labels, etc. I recommend using the axis ranges σ ∈ [0.005, 0.02] and µ ∈ [−0.0005, 0.0015], but you may choose other values if you prefer.

5. (MATH2070 only:) Suppose now the investor does not want to short sell any asset.

(a) Use SciPy minimize (with a tolerance tol = 1e-15) to find their optimal portfolio, mean return and risk (standard deviation). Again, give all answers in $.

(b) Show that the portfolio obtained using SciPy is the optimal portfolio (possibly up to a small error) by verifying that it is a KKT point of the log-utility optimisation problem. Be aware: there will be a small numerical error that you must allow for in checking, e.g., that quantities equal zero, are non-negative, etc.

(c) Explain whether you necessarily expect the constrained portfolio to have a lower or higher risk versus the unrestricted portfolio, and similarly a lower or higher expected return. Add the portfolio to the same plot as Question 4 to check this.

6. (MATH2970 only:) Suppose now the investor does not want to short sell any asset.

(a) Use SciPy minimize (with a tolerance tol = 1e-15) to create a function minvar that inputs a number µ and returns the minimum risk (variance) for a portfolio having expected return equal to µ. As a check, you should find

(b) Your function minvar should return an error for, say µ = 1, as it is impossible to create a portfolio with this mean return without short-selling. Execute minvar(1) and show this is the case.

(c) Explain why the natural domain of minvar is [0.00013, 0.000989].

(d) Plot the whole minimum variance frontier on the same plot as in Question 4.

7. Suppose now that the market also has a risk-free cash asset with return 0.00015 (which works out to around 3.8% annually, close to the Australian bond rate at the time).

(a) What is the new optimal portfolio for the investor from Question 3 (with short selling allowed)? Is this a borrowing or lending portfolio?

(b) In a new plot, show in the (σ, µ) plane:

(i) The items from Question 4

(ii) The optimal unrestricted portfolio for the investor with a risk-free asset (Question 7a)

(iii) The market portfolio inferred from the covariances above1

(iv) The capital market line

I recommend you use axis range σ ∈ [0, 0.02] for this plot, but you may choose other values if you prefer.




软件开发、广告设计客服
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 9951568
© 2021 www.rj363.com
软件定制开发网!