4.44444

4.4 | 9 ratings Rate this file 24 Downloads (last 30 days) File Size: 5.18 KB File ID: #4325
image thumbnail

Rescaled Range Analysis

by Alexandros Leontitsis

 

01 Jan 2004 (Updated 06 Jan 2004)

Calculates the rescaled range analysis.

| Watch this File

File Information
Description

Accorting to the references the Rescaled Range Analysis can reveal non-periodic cycles time series. It has found many applications on the financial time series, although the underlying theory is not convincing. This m-file contains the basic algorithm and 4 proposed variations. The estimation of the Hurst exponents is up to the user.

MATLAB release MATLAB 6.5 (R13)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (13)
26 Mar 2004 haoqm qm  
25 Aug 2004 wai wl  
08 Feb 2005 Vahidin Jeleskovic  
07 Dec 2005 Gabbar Singh  
14 Sep 2006 Thomas A. Thiele

The program calculates the rescaled range, the expected value, and the V-statistic. One just needs to determine the cycle length (if any) and set up the regression accordingly. The slope of the regression equation is the Hurst exponent.

With the expected value for R/S, one can easily test the significance of the results.

Overall a very good and handy routine.

Thomas

02 Dec 2006 ZC huang

nice

13 Dec 2006 Thomas A. Thiele

I forgot to mention one thing: If you wish to compute the log E(R/S) using the Anis and Lloyd (1976) formula, you may use the following code at line 190:

 logERS(i,1)=log10((gamma(0.5*(n(i)-1))/(sqrt(pi)*gamma(.5*n(i))))*s)

However, for n < 340 the gamma value become to large and might not give you an estimate. I therefore suggest to switch to Peters' formula for n<340.

Thomas

26 Oct 2007 Chris Axioglou

Very useful! Just a notice (at least for the Lo method): the variation seems to be the unbiased one (i.e. the cross-product sums are divided by the degrees of freedom, instead of the full period length).

15 Nov 2007 Matt Peloso

Needs some small fixes, I gave it simulated fBm time series and put them in the routine, but the slopes did not evaluate to the H exponent. I found that the routine is missing the first step taking log(Ni+1/Ni) of the time series. Also, autocorr(x,1) I replaced as xcorr(x)...maybe my version. Now it is giving meaningful data. Otherwise, a great reoutine and saves lots of time typing up the bulk of the code....THANKS!!!

01 Jan 2008 SUNGKONO HANANING

i'm studend in ITS (Institut teknologi sepuluh Nopember) Surabaya in Indonesia.
i'm interest to sdudied fractal (mono and multi) analysis for well-log analysis.

thank's for this source code.

14 Feb 2008 ali gezer  
17 Feb 2011 Joris

Thanks for the function.

The case when x(t)=0 for some period greater than the length of a block should be treat separately, if not it gives a 0/0 division.

How to compute the lag time vector to plot the pox plot of R/S ? I try lag(i)=log10(N/n(i)) but it gives strange result (decreasing function...)

Help !

And Thks !
Joris

29 Oct 2011 Lars

I'm having some issues producing an output. Am I supposed to remove some ; or something? My intentions are to make a log(RS) log(n) plot. The program only yields a single number which doesn't make any sense.

Any help much appreciated.

-Lars

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
finance Alexandros Leontitsis 22 Oct 2008 07:12:10
modeling Alexandros Leontitsis 22 Oct 2008 07:12:10
analysis Alexandros Leontitsis 22 Oct 2008 07:12:10
rescaled range analysis Alexandros Leontitsis 22 Oct 2008 07:12:10
hurst Alexandros Leontitsis 22 Oct 2008 07:12:10
rs Alexandros Leontitsis 22 Oct 2008 07:12:10
hurst alonola Portnoy 12 Oct 2010 12:09:52
hurst Hélio C. Soares 07 Dec 2010 08:08:57
rescaled range analysis Alex 04 Nov 2011 11:13:55

Contact us at files@mathworks.com