Many thanks, Bernhard! What do you think about the suggestion, made by another
list member,
that I can just compute the correlation for the differentiated data between the two stock market index series, with no control for autocorrelation, etc, since according to the effective market hypothesis stock market index series don't show autocorrelation at all?
well, here you are superimposing the validity of a hypothesis, that should be checked first. By using differenced data you are almost always on the *safe side*, but again you are giving up the information content of the series in levels. This can be circumvented by specifying an ECM. Furthermore, you might want to use log data, i.e. a transformation that stabilises the variance. As a side effect the lm() estimated coefficients can be interpreted as elasticities, i.e. the responsiveness of your lhs-variable to a unit change of your rhs-variable (in levels).
I think, I will just check, if there isn't an autocorrelation, checking acf and pacf, as you suggested. Thanks a lot.
yes, and this tells you the order to specify for arma(), given a stationary series: ar(p): slowly decaying acf (or dampening alternating in case of negative ar coeffcient) and a spike at p in the pacf. ma(q): just like ar(p), but the shape of acf and pacf are reversed, i.e. single peak in the acf and slowly decaying pacf (or dampening alternating in case of negative ma coeffcient). HTH, Bernhard
Cheers Christoph Pfaff, Bernhard wrote:
Dear finance professionals As I was asked by a friend, whether we can compute the
correlation
between two stock market indices (e.g. NASDAQ index and Dow Jones index), and I am unfortunately NOT an expert in finance:
Hello Christoph, you can almost always compute correlations, if these
calculations make sense
and are meaningful is a different matter :-)
(1) What model would you recommend for this kind of question? something like: library(ts) arima(x, order=???, xreg=y)
sure, you can do this and choose the appropriate order as
it is outlined by
Box-Jenkins (i.e. check the acf and pacf of the residuals
combined with
diagnostic tests for serial uncorrelatedness). Most likely
you want/have to
work with differenced data, due to the *trending* character
of the ts in
question. The snag is that level information is lost.
Hence, you might want
to specify an ECM / VECM and prior to this check the order
of integration of
the series involved. Relevant packages to accomplish this
would be ts,
tseries, dse and urca; to my knowledge (check http://www.mayin.org/ajayshah/KB/R/R_for_economists.html
for an overview).
library(nlme) gls(x~y,correlation=corARMA(p=?,q=?)) what would you recommend, and what about the "?" :)
this would apply if the *error term* is not nicely behaved
and would follow
as a second step, hence after checking the residuals from a
simple lm() or
arima(), as is described from ?gls
Description:
This function fits a linear model using generalized
least squares.
The errors are allowed to be correlated and/or have unequal
variances.
As a side note, in econometrics it is common notation that
the response is
named 'y' and the predictor 'x' and not vice versa.
(2) Furthermore, searching the web, I found, that (sorry,
you experts
certainly know this, but I have no experience with
financial data),
usually the time series are uncorrelated, but show strong "ARCH effects", ie., are not independent.
ARCH refers to the behaviour of the variance of the error term (autoregressive conditional heteroskedasticity). Again,
check the residuals
first, if ARCH is prevailent and only then estimate an
ARCH, GARCH etc. type
of model. Note, uncorrelatedness and independence are only
equivalent in
case of normality. The former does not imply the latter,
only if the the
series are normally distributed. But if two series are
independent then
these series are also uncorrelated. A last side note, ask yourself what the model's aim is.
What should the
model explain? What's it purpose? After having answered
these questions, you
can pick one of methods and not blindly apply either one of them. HTH, Bernhard
Does this mean, that any kind of correlation analysis with stock market indices is senseless, since maybe we don't get a sign. correlation, but this doesn't mean that the series are independent? Many thanks for your help Chris
_______________________________________________ R-sig-finance@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-------------------------------------------------------------- ------------------
The information contained herein is confidential and is
intended solely for the
addressee. Access by any other party is unauthorised
without the express
written permission of the sender. If you are not the
intended recipient, please
contact the sender either via the company switchboard on
+44 (0)20 7623 8000, or
via e-mail return. If you have received this e-mail in
error or wish to read our
e-mail disclaimer statement and monitoring policy, please
refer to
http://www.drkw.com/disc/email/ or contact the sender. 3167
-------------------------------------------------------------- ------------------
--------------------------------------------------------------------------------
The information contained herein is confidential and is inte...{{dropped}}