Write m-function that computes simple returns as formula, MATLAB Programming

Assignment Help:

Your Task: Write an M-function that computes simple returns as formula (1). Use this function to calculate the daily returns for each index. Using MATLAB build-in functions estimate the sample mean, standard deviation, skewness and kurtosis for each index. Your report should include:

1. M-function that computes simple returns as formula (1).

2. Plot of the price levels of the two indices vs the date in one figure. It should include the title, labels and legend (Hint: you might need to use build-in functions such as datetick).

3. Plots of the returns of two indices in one window (including titles, labels and legends). You should use subplot.

4. The proportion of days in which the returns were positive and in which the returns were negative for the two indices. In you MATLAB function for computing the proportion, the input is a vector of returns and the output is the proportion of positive and negative returns.

5. The date and value of: a) Greatest loss , b) Greatest gain, c) Highest price, and d) Lowest price for each index (Hint: you may need to use datestr ).

6. The number of days when the daily returns positive and smaller than 1% for each index?

7. The skewness and kurtosis of daily returns for each index.

8. The proportion of days in which the daily returns were higher/lower than +2:33 σ for each index.


Related Discussions:- Write m-function that computes simple returns as formula

Population pyramid, I want to write a function in matlab which gives me a p...

I want to write a function in matlab which gives me a population pyramid bar chart. could you please help me do this.

Example of variables and assignment statements, Example of Variables and as...

Example of Variables and assignment statements: The expression is computed and then that value is stored in the variable. For illustration, this is the way it would appear in

Load from file and plot data, Example: Load from File and Plot Data: A...

Example: Load from File and Plot Data: As illustration, a file known as timetemp.dat stores two lines of data. The first line is the time of the day, and the next line is the

Develop matlab monte carlo queuing simulator, Answers should be submitted i...

Answers should be submitted in an MS Word document. Simulations should accompany answers in a separate MATLAB file. 1)  Queuing Simulator: Consider a communications router that

Function to threshold images - peakiness detection algorithm, 1. Write a fu...

1. Write a function to threshold your images separating the background from the foreground: Implement the "peakiness" detection algorithm described in class. The output of your

Mass and stiffness matrices, Model the three degree of freedom system shown...

Model the three degree of freedom system shown in Figure Q5 and solve for the displacements of the three masses due to a force of 10 N applied to the bottom mass at a frequency of

Variables and assignment statements, Variables and Assignment Statements: ...

Variables and Assignment Statements: A variable is used in order to store a value in a MATLAB session, or in a program. The Workspace Window represents variables which have be

Write a Matlab function, Write a Matlab function that computes y1= tan(x) a...

Write a Matlab function that computes y1= tan(x) and y2= sin(x)/cos(x), returns the difference |y1-y2| and prints a message whether the two are equal or not. Test your function for

Find the dft frequency resolution, (a) Using Matlab, find and plot the magn...

(a) Using Matlab, find and plot the magnitude of the DTFT of 10 samples of x(n) for n=[0:1:9] of x(n) = cos(2*pi*f1*n) + cos(2*pi*f2*n)  for f1=0.22 and f2=0.24 and pad zeros to ge

Write Your Message!

Captcha
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