首页 > > 详细

辅导MATH2070/2970Matlab编程、Matlab语言讲解留学生、讲解Matlab程序、Matlab程序讲解

The University of Sydney
School of Mathematics and Statistics
Computer Project
MATH2070/2970: Optimisation and Financial Mathematics Semester 2, 2018
Web Page: http://www.maths.usyd.edu.au/u/IM/MATH2070/
Lecturer: Anna Aksamit and Georg Gottwald
Due on 5.00pm Thursday 1st November via TurnItIn
Late assignments are not accepted without prior arrangement well before the deadline!
You must attach a scanned copy of the signed cover-sheet to the front of your assignment (see
over)!
This is mostly a computational project so you must submit all computer programs with your
project formulations, descriptions and outputs. Assessment will be based on: accuracy,
programming and presentation.
MATH2070: Do all questions except Questions x for x 7.
MATH2970: Do all questions.
In this assignment you will be analyzing real stock market data downloaded from Yahoo!Finance.
The file DowPricing_2004_2010.csv which you can download from Ed, contains the daily closing prices
of the 30 stocks which make up the Dow Jones Industrial Average Index. Prices are recorded on a
(business)-daily basis between 31/12/2003 and 29/12/2010. This includes the Global Financial Crisis
(GFC) which we locate here in time from very roughly from 03/01/2007 – 31/05/2010. We define the
peak of the GFC as the period 02/09/08–01/06/09, and define a pre-GFC and post-GFC period from
03/01/07 – 29/08/2008 and from 01/06/09 – 31/12/10, respectively. Recall that Lehman Brothers
filed bankrupt protection on September 15, 2008.
There are two particularities with this time series:
(1) Visa’s share price starts at 19/3/2008 on Yahoo!Finance.
(2) Dow and DuPont have recently merged and are now trading as a new entity (DWDP) with a short
trading history.
Therefore only consider the 28 stocks without Visa and Dow DuPont.
All prices are here in US dollars.
Correlations and the covariance matrix
1. Export the data into Matlab using csvread and/or readtable. This question investigates the
correlations of the return rates. When analyzing return rate data one has several choices. A
commonly used variable is the logarithmic change of price or the so called log return rate: Let Yi
be the price at time i, then consider i = logYi logYi 1 (wrt the natural base). An advantage
of this variable to quantify the return rate is that it insensitive to (constant!) deflation factors
(why?).
(i) Calculate the maximal correlation between the i, and plot the two stock prices associated
with the highest correlation as a function of time (excluding Visa and/or Dow DuPont
(see above))
(ii) Calculate the minimal correlation between the i, and plot the two stock prices associated
with the smallest correlation as a function of time (excluding Visa and/or Dow DuPont
(see above))
Copyright c 2018 The University of Sydney 1
(iii) Visualize the correlation matrices for the period before and during the GFC (separating
into pre/peak/post periods). (You may use Matlab’s command imagesc). Can you spot
differences?
(iv) Plot the histogram of the correlation coefficients ij for the four periods. Comment on your
result.
(v) Play with the data and try to identify interesting particularities. This sub-question will
not be marked - just an encouragement to have some fun.
PortfolioTheoryConsiderforthisquestionandtherequiredplotsonlytheGFCperiod03/01/2007
– 31/12/2010. However, you might need to investigate the “normal” non-GFC period as well to justify
any claims/interpretations you want to draw form. your results.
2. Determine which investors short sell in this market consisting of the stocks used to calculate the
Dow Jones Index and which stocks they short sell. Are there any stocks which no-one will short
sell or which everyone will short sell?
3. Carry out the following computational tasks for an optimal portfolio P consisting of the 28
stocks included in the Dow Jones for an agent who wants to invest $200,000 and has a risk
factor of t = 0:15 (excluding Visa and Dow Du Pont).
(i) Obtain the dollar investment in each of the stocks and obtain the corresponding expected
return and risk of P .
(ii) Obtain the -plane graphical representation and include (all on the same graph):
(a) The stocks of the Dow Jones
(b) The minimum variance and efficient frontiers. Use a t-rangejtj 0:35 for your display.
(c) A plot of 1000 random feasible portfolios satisfyingjxij 20 (for each of the 28 stocks)
and i 0:05 for i = 1;:::;1000.
You might notice that the random points occupy some region well-separated from the
minimum variance frontier (MVF) - comment on this and explain why (This is a/the
major part of the question).
(d) The indifference curve of an investor with t = 0:15 and their optimal portfolio P .
4. Adding a Riskless Cash Fund: Suppose now that a riskless cash fund P0 is also available to
invest in. The risk free rate was r0 = 0:05 before the GFC and was lowered to r0 = 0:0025 in
December 2008, for both lending and borrowing.
(i) Obtain the investor’s new allocation of their investment to the (now) 29 funds. State clearly
investment in the riskless cash fund.
(ii) Describe in detail the Capital Market Line and the tangency portfolio. What can you say
about the tangency portfolio; explain your result.
(iii) Assuming that the world only existed out of the 30/28 stocks traded in the Dow Jones
contingent. What data would you like to have to determine the market portfolio and how
would you then compute it? Unfortunately I was not able to get the data to approximate
the market portfolio.
Captial Market Theory
5. The Capital Market Line: Make a new -plane graph showing the riskless cash fund,
tangency portfolio, and the Capital Market Line relative to the risky efficient frontier. Calculate
the investor’s new optimal portfolio. If the original stocks have a net worth of $100 million,
estimate (to the nearest $0.1 million) the total value of each stock.
6. The Security Market Line: Compute the ’s of all relevant stocks and assets in this project
and clearly display them on the Security Market Line. Comment on the result and decsribe
what portfolio theory would recommend an investor to do.
Empirical Orthogonal Eigenfunctions
Scientists are often faced with the challenge of extracting useful information from large data sets. In
this assignment the data set is a time series of the stock return rates of the 30 stocks which make
up the Dow Jones index (well, only 28 are actual occurring time series). An example from a very
different context could be observational data of the sea surface temperature in the Pacific ocean over
time. We might ask the question: are there any underlying structures which dominate in some sense
the system? Or phrased differently, rather than using the full data set and all available observations
to describe the phenomenon, can we describe the system at each time instance by just a few structures
or factors the coefficients of which then vary in time? In the context of the sea surface patterns, these
structures would be large scale regimes such as El-Niño patterns which dominate the ocean dynamics
in the Pacific (on a certain time scale). It turns out that this can be posed as an optimization problem.
7. Mathematically, we seek an approximation of a time series ut for u2Rd. Here t = 1; ;N
denotes the discrete times and typically d N. In the context of the stocks price data of the
Dow Jones Index we have u2R30 (or rather here u2R28). Given an orthonormal basis’j 2Rd
with ’Ti ’j = ij, at each time instance t we can decompose
and is found by solving the following constrained optimization problem
minimize 2(p)
subject to ’Ti ’j = ij :
(i) Solve the constrained optimization problem and show that solutions are given as eigenvec-
tors of the matrix AAT 2Rd d where Ait = uit.
3
(ii) Show that for the optimal basis 2(p) = Pdj=p+1 j.
(iii) It is said that the optimal basis vectors explain most of the variance of the data. Explain.
(iv) It is pertinent to note that EOFs are not capable of detecting any temporal correlations, i.e.
picking up that, for example, an increase of the stock return rate of Goldman Sachs on
average lags behind a decrease of the stock return rate of of Walt Disney. Show analytically
why this is so.
8. Apply the framework from Question 7 to the Dow Jones stock data.
(i) Plot the ordered spectrum i fori = 1; ;28 (again excluding Visa and Dow Du Pont).
Why is it tempting to say that by only using a few modes we are capable of explaining
most of the stock market data? Plot the spectrum for the non-GFC period and for the
three periods of the GFC (pre/peak/post).
(ii) Plot the first two empirical orthogonal eigenfunctions for the whole data set, the time
periods before the GFC and for the pre/peak/post periods of the GFC.
(iii) Investigate quantitatively how well the first three EOFs describe the data by projecting the
data onto the first three EOFs. Do this for the 5 sets of EOFs. In which projection can
you detect the GFC best? Comment on the result.
(iv) Can you find any economic interpretation of the EOFs; I couldn’t (this question does not
earn marks, but it is fun to think about this).
The University of Sydney
School of Mathematics and Statistics
Assignment Cover Sheet
MATH2070/2970: Optimisation and Financial Mathematics Semester 2, 2018
Web Page: http://www.maths.usyd.edu.au/u/IM/MATH2070/
Lecturer: Anna Aksamit and Georg Gottwald
Family Name ....................................................................................
Given Names ...................................... SID ......................................
Legitimate cooperation between students on assignments is encouraged, since it can be a real aid to
understanding. It is legitimate for students to discuss assignment questions at a general level, provided
everybody involved makes some contribution. However, students must produce their own individual
written solutions. Copying someone else’s work is plagiarism, and is unacceptable.
I certify that:
I have read and understood the University of Sydney Student Plagiarism: Coursework Policy
and Procedure at
http://sydney.edu.au/policies/showdoc.aspx?recnum=PDOC2012/254RendNum=0.
this assignment is all my own work, and that no part of this assignment has been copied from
another person.
I have not allowed my work to be copied by another person.
Signature ........................................ Date ........................................
The University may impose severe penalties for plagiarism
This part to be completed by the marker:
Grand total out of 40 ...................................

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!