RATS 11
RATS 11

Procedures /

BDSTEST Procedure

Home Page

← Previous Next →

@BDSTest performs the Brock, Dechert, Scheinkman test for i.i.d. The series being tested should be something that reasonably could be thought to be i.i.d. (such as residuals or market returns). Note that there are relatively few theories that would predict i.i.d. (as opposed to weaker criteria like lack of serial correlation) and rejecting i.i.d. will not necessarily help to determine how i.i.d. fails.

 

@BDSTest( options )   series  start end

Parameters

series

series to analyze

start, end

range of series to use. By default, the defined range of series.

Options

P  =multiple of standard error (or sample range) to use for the closeness threshold [1.0]

DIM=embedding dimension [depends upon number of data points]

RANGE/[NORANGE]

If RANGE, the threshold is the multiple P of the observed range (max-min) of the series. In that case, P should be less than 1.

 

[PRINT]/NOPRINT

Variables Defined

%CDSTAT

BDS test statistic (asymptotically N(0,1)) (REAL)

%SIGNIF

Asymptotic p-value (REAL)

Example

This does several several BDS tests with different closeness thresholds and embedding dimensions on the residuals from an AR(1) on log stock returns.
 

linreg ibmlog

# constant ibmlog{1}

*

dofor [real] p = 1.5 1.0

   do dim=2,5

      @bdstest(p=p,dim=dim) %resids

   end do dim

end dofor

Output

This is the output from the last combination above (DIM=5 and P=1.0). The test very strongly rejects i.i.d.


 

       ************************************

           BDS Test for %RESIDS

       ************************************

               P =       1.00000

             eps =       0.06615

               m =      5

            C_mT =       0.07026

             C_T =       0.55966

               K =       0.35133

          sigma2 =       0.00581

            BDS  =       5.91786

          signif =   3.26162e-09

     ************************************


 


Copyright © 2025 Thomas A. Doan