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
User-Defined Functions which return a Single Value: We have seen the use of many functions in the MATLAB. We have used many built-in functions like fix, sin, abs, double, and

Write a function called threshold2 (in a file called 'threshold2.m'). The function takes an arbitrary number of input variables. The first input variable, t, is required and is the

Need help with creating functions in matlab.

Consider the function: f(x) = 7 - 28x + 42x 2 - 28x 3 + 7x 4 : Write a script findPolyRoot.m to nd, as accurately as you can, the root of f(x) near x = 2. Your script mu

a. Develop and submit the simulation described above. b. Provide a screen shot of the outputs of the DispConfig and MCResults functions. c. Notes: • Include the PPConfig f

The pressure radiated by a column of in-phase monopole sources may be expressed as: Create a model (spreadsheet / MATLAB etc) for a 6 element column, where d=0.2m . Figure

The MATLAB system having of five main parts: * Handle Graphics. * The MATLAB working environment. * The MATLAB language. * The MATLAB mathematical function library.

Illustration of script: For illustration, we will now generate a script known as script1.m which calculates area of the circle. It assigns a value for the radius, and then com

Illustration of Modifying Elements: Illustration, the fifth element in the vector newvec is 9 >> newvec(5) ans = 9 The subset of a vector, that would be a vector it

The characteristic properties of an aquifer can be used to calculate groundwater velocities, v groundwater (L/T), according to: where KH (L/T) is the hydraulic conductivit