[R-SIG-Finance] Number of data points required for Cointigration

John Frain frainj at tcd.ie
Tue Jan 27 14:50:24 CET 2015


On 23 January 2015 at 09:24, amol gupta <amolgupta87 at gmail.com> wrote:
> Hi
>
> I need help in figuring out the length of historical data that I should use.
> I took stock prices(daily close) for two tickers from yahoo(200 days).I
> tried finding regression coefficient using PCA and I use 150 points for PCA.
> I find a coefficient Beta.
>
> Now to see whether the spread is mean reverting or not I use ADF. If I use
> 150 point long spread, It comes out to be nonstationary. If I use 200 points
> data the outcome is stationary
>
> I again used 200 points to do the PCA and find regression. The spread comes
> out to be non stationary. From all these observation I think that this is
> not a stable relationship.
>
> So following are my questions
>
> Is there a way to decide length of historical data to use?

I don't think so. My involvement in cointegration was in the
macroeconometrics area. Here we liked to use at least 30 years of
data. For annual or quarterly data series such as spreads were
generally stationary about a constant level. The idea of a equilibrium
trend in a spread does not make sense to me. In such cases one would
draw a graph and look at the number of times the series crossed a
measure of the equilibrium spread. The more times the series crosses
the equilibrium the easier it is to assess stationarity. If there are
few crossings the either the series in non-stationary or you have not
got enough data.  You can also think about how long shocks will take
to work through the system. Your series should be a multiple of that
length. Increasing the periodicity of the data does not necessarily
may lengthen the series but it does not increase the time covered by
the series.

> Some relationship may be more stable than others. Is there away to quantify

Yes. If you fit an error correction mechanism by Engle-Granger or
Johannsen the coefficient on the error correction mechanism can be
used to get a half life for deviations from equilibrium. A small
coefficient means that the equilibrium is restored slowly.

> it?
>
> Any other insight in this regard will be appreciated(time frame, pairs vs
> basket). I have attached the plot and the script that was used to generate
> the plot.
>
>
> --
> Regards
> Amol
>
> If all the seas were ink,
> And all the reeds were pens,
> And all the skies were parchment,
> And all the men could write,
> These would not suffice
> To write down all the red tape
> Of this Government.
>
>
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.

John C Frain, Ph.D.

Economics Department             3 Aranleigh Park
Trinity College Dublin                 Rathfarnham
College Green                           Dublin 14
Dublin 2                                    Ireland
Ireland
www.tcd.ie/Economics/staff/frainj/home.htm
mailto:frainj at tcd.ie
mailto:frainj at gmail.com



More information about the R-SIG-Finance mailing list