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

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.

Posted Date: 4/2/2013 2:18:03 AM | Location : United States







Related Discussions:- Write m-function that computes simple returns as formula, Assignment Help, Ask Question on Write m-function that computes simple returns as formula, Get Answer, Expert's Help, Write m-function that computes simple returns as formula Discussions

Write discussion on Write m-function that computes simple returns as formula
Your posts are moderated
Related Questions
People arrive at a microscope exhibit at a rate of one every 8+/- 2 minutes. Only one person can see the exhibit at a time. It takes 5 +/- 2 minutes to see the exhibit. A person

256789;267825;625892;982895;598289

Write a script to determine the volume of a pyramid, which is 1/3 * base * height, where the base is length * width. On time the user to enter values for the length, width, and th

Generate a script: To generate a script, click File, then New, and then M-file. The new window will appear known as the Editor. To generate a new script, simply type the serie

i need someone to write a matlab code to solve a model.

Simple Related Plot Functions: The other functions which are useful in customizing plots are the figure, clf, hold, leg-end, and grid. The short description of such functions

You are a quant analyst reporting directly to a portfolio manager. Your manager requires you to generate a simple code to compute several statistics for the following potential por

Use an expression for the far-field radiation from a plane circular piston to create a more accurate model of a column loudspeaker system - you will need to calculate individual so

For a statistically stationary environment it would be advantageous to use gear shifting, that is to reduce the adaptation gain with time. To illustrate this, try using a varying a

Need help with creating functions in matlab.