Plot the histogram of the correlation coefficients

Assignment Help Other Engineering
Reference no: EM132155400

Computer Project - Optimisation and Financial Mathematics

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 = log Yi -log Yi-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)).

(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.

Portfolio Theory -

Consider for this question and the required plots only the GFC period 03/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-range |t| ≤ 0.35 for your display.

(c) A plot of 1000 random feasible portfolios satisfying |xi| ≤ 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 describe 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 u ∈ Rd. 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 u ∈ R30 (or rather here u ∈ R28). Given an orthonormal basis φj ∈ Rd with φiTφj = δij, at each time instance t we can decompose

ut = j=1Σdctjφj,

for some real coefficients cij. Here we order the basis according to descending eigenvalues λj. All the time dependency is now in the time-varying coefficients atj ∈ R. We now seek an orthonormal basis φi such that if we truncate using only p < d modes to express u, i.e. if we approximate ut by

u~t(p) = j=1Σpctjφj,

we make the least error. This definition obviously depends on the definition of "error". An optimal basis called empirical orthogonal eigenfunctions or Karhunen-Loeve modes or principal components, is found by minimizing the l2-error

ε2(p) = t=1ΣN||ut - u~t(p)||2,

and is found by solving the following constrained optimization problem

minimize ε2(p)

subject to φiTφj = δij

(i) Solve the constrained optimization problem and show that solutions are given as eigenvectors of the matrix AAT ∈ Rdxd where Ait = uit.

(ii) Show that for the optimal basis ε2(p) = j=p+1Σdλ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 for i = 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).

Note - Need the assignment completed via Matlab software.

Attachment:- Assignment Files.rar

Reference no: EM132155400

Questions Cloud

Weaknesses with measurement technique : Explain how the CPI is constructed and discuss any weaknesses with this measurement technique.
Compare various roles and responsibilities of case mananger : Compare the various roles and responsibilities of a case manager. Describe case management responsibilities in the correctional system.
What market or internal circumstances : What market or internal circumstances should most concern CEO Bernard Arnault and his company’s senior leadership team?
Monopolistically competitive model : The monopolistically competitive model also predicts that while firms can earn positive economic profits in the short run, entry of new firms will shift
Plot the histogram of the correlation coefficients : MATH2070/2970 Computer Project - Optimisation and Financial Mathematics, The University of Sydney, Australia. Plot the histogram of the correlation coefficients
Calculate that while companies can earn positive : The monopolistic competitive model can also calculate that while companies can earn positive economic profits in the short run
Company integrates environmentally friendly hr practices : First google information on Green HR initiatives and then research for information on how a company integrates environmentally friendly HR practices
Compute price elasticity of demand using midpoint formula : Compute price elasticity of demand using midpoint formula and these data. What are the implications for revenue based on the calculation of elasticity and why.
Gold mining industry is perfectly competitive : Assume the gold mining industry is perfectly competitive. Suppose the increase in jewelry demand induces a surge in the demand for gold

Reviews

len2155400

10/31/2018 1:39:01 AM

I need the following assignment completed via Matlab software. 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.

Write a Review

Other Engineering Questions & Answers

  Abou cis

Work on your proposal for the new system.Identify a specific system that would help improve Riordan's business. Define the system's business requirements.

  What are the special requirements of a patent drawing

What are the special requirements of a patent drawing? What kinds of information are included in an assembly drawing? Describe the drawing revision process.

  Calculate the formation factor for both cores and the model

Calculate the formation factor (F) for both cores and the model (using both values of mf) and plot all your results on a standard log-log cross-plot of F vs. porosity.

  What is the mechanical advantage of a

What is the mechanical advantage of a 1/4-20 UNC x 2" bolt?

  Sum of products and canonical product of sums

A given system has 3 sensors that can produce an output of 0 or 1. The system operates properly when exactly one of the sensors has its output equal to 1. An alarm must be raised when two or more sensors have the output of 1.

  Calculate the reliability of the overall system

ME503 - Telecommunication System Engineering - Calculate the reliability of the overall system RS as a function of Ri and Calculate the failure rate

  Develop design briefs for electrotechnology projects

Develop Design Briefs for Electrotechnology projects - Establishing the scope and parameters of the project - Determining the impact of other related works.

  Determine the percentage increase due to skin effect

Assuming an increase in resistance of 2% for spiraling, calculate and verify the dc resistance - Then calculate the dc resistance at 50°C, and determine the percentage increase due to skin effect.

  Design a small-signal midband common-emitter

Design a small-signal midband common-emitter (CE) amplifier with a BJT transistor having β of 160 and VBE of 0.7V. The dc bias is provided by the voltage-divider configuration

  Acceleration due to gravity

(c) His weight in Newton's. If the man is on the moon, where the acceleration due to gravity is gm = 5.30 ft/s2, determine

  What is communication overhead in networking

what is communication overhead in networking?what are the types of overhead?How to reduce communication overhead in broadcasting?

  Temperature of the balls

If the temperature of the balls after quenching is 74°C, determine the rate at which heat needs to be removed from the water in order to keep its temperature constant at 50°C.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd