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
Example of Referring elements: the vector can also be extended. For illustration, the following generates a vector which has three elements. And then referring to the fourth e

This project carries 50% of your ?nal mark. Please hand in your work to the Mathematical and Physical Sciences School O?ce, no later than 4pm Monday 21st January 2013. Please ?l

To accept two numbers from the user; Display all prime numbers between these two numbers.

Q.1: Consider the transmission of a sinusoid x(t) = cos(2f0t) through a channel a ected by multipath and Doppler. Let there be two paths, and assume the sinusoid is being sent fro

Command Window: To the left of the Command Window, there are 2 tabs for the Current Directory Window and Workspace Window. If the Current Directory tab is selected, the files

Given the following image, 1 2 1 1 2 0 0 1 5 1 0 1


Input Function: The Input statements read in values from the default or standard input device. In most of the systems, the default input device is the keyboard; therefore the

conversion of decimal to binary

Problem 1.  Use Matlab to solve the following system of linear equations: 2x + y + 3z = 1 2x + 6y + 8z = 3 6x + 8y + 18z = 5 Capture Matlab code and the result in a text fi