Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Financial Econometrics Expert

The first question concerns the computation in S-Plus of the square root of a symmetric nonnegative-definite square matrix.

1. Write an S-function, call it msqrt, with argument A which:

  • checks that A is a square matrix and exits if not;
  • checks that A is symmetric and exits if not;
  • diagonalizes the matrix by computing the eigenvalues and the matrix of eigenvectors
  • checks that all the eigenvalues are nonnegative and exits, if not;
  • returns a symmetric matrix of the same size as A, with the same eigenvectors, the eigenvalue corresponding to a given eigenvector being the square root of the corresponding eigenvalue of A

The matrix returned by such a function msqrt is called the square root of the matrix A and it will be denoted by A1/2.

The second question concerns the generation of normal random vectors in S-Plus. In other words, we write an S-Plus function to play the role of the function rnorm in the case of multidimensional random vectors. Such a function does exist in the S-Plus distribution. It is called mvrnorm. The goal of this second question is to understand how such a generation method works

2. Write an S-function, call it vnorm, with arguments Mu, Sigma and N which:

  • checks that Mu is a vector, exits if not, and otherwise reads its dimension, say L;
  • checks that Sigma is an LxL symmetric matrix with nonnegative eigenvalues and exits, if not;
  • creates a numeric array with N rows and L columns and fills it with independent random numbers with the standard normal distribution N(0, 1);
  • treats each row of this array as a vector, and multiplies it by the square root of the matrix Sigma (as computed in question I.1 above) and adds the vector Mu to the result;
  • returns the random array modified in this way. The array produced by the function vnorm is a sample of size N of L-dimensional random vectors (arranged as rows of the matrix outputted by vnorm) with the normal distribution with mean Mu and variance/covariance matrix Sigma. Indeed, this function implements the following simple fact reviewed during the lectures:

If X is an L-dimensional normal vector with mean 0 and covariance matrix given by the L×L identity matrix (i.e. if all the L entries of X are independent N(0, 1) random variables), then:

is an L-dimensional normal vector with mean µ and variance/covariance matrix Σ.

Financial Econometrics, Finance

  • Category:- Financial Econometrics
  • Reference No.:- M91987569

Have any Question?


Related Questions in Financial Econometrics

Questions -1 efficient government policy requires pollution

Questions - 1. Efficient government policy requires pollution reduction be made in a manner that _________________ for business. A. Ensure a suitable ROI B. Replaces regulation with litigation C. Is not cost prohibitive ...

Applied finance with e-views assignment -answer all

Applied Finance with E-views Assignment - Answer ALL sub-questions - Question 1 - The Excel workfile Resit Coursework contains weekly data on two time series, namely, the FTSE 100 stock Index, UKS, and FTSE 100 Index fut ...

Financial economics problems -1 explain intuitively the

Financial Economics Problems - 1. Explain intuitively the idea of an Arrow-Debreu security. These are not observed in "real" markets, so is the concept useful? What is the link between A-D securities and options? 2. Ther ...

Subject is foundation of information technologydiscussion

Subject is Foundation of Information Technology Discussion Questions To log on to a website such as G-mail or Yahoo!, you need to specify your login name and password. The site does not allow you to access your e-mail me ...

Economics of banking and finance assignment - competition

Economics of Banking and Finance Assignment - Competition and Stability in Banking You are required to undertake a literature review of around 2000 words in length on: The relationship between competition and financial s ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As