| To: | "Yingfu Xie" <Yingfu.Xie@sekon.slu.se>, s-news@lists.biostat.wustl.edu |
|---|---|
| Subject: | Re: Comparing volatility |
| From: | "Samir Saadi" <Saadi@management.uottawa.ca> |
| Date: | Tue, 07 Jun 2005 10:03:41 -0400 |
| In-reply-to: | <CA871298CD1882459F7859BD08DC06E4C530A3@slumail.ad.slu.se> |
| Organization: | School of Management |
|
Thank you Mark and Yingfu for your help:
Here what I am trying to do 1- Run the returns series as a random walk with drift : rt = constant + error 2- take the error series and model it with a GARCH type model while introducing the option dummy variables in the conditional variance equation) 3- The sign of the dummy vairables will show whether volatility is lower when a stock has an option How can I make S-Plus introduce the second column as a dummy variable in the
conditon variance equation?
By the way my file has two colums:
Column 1: Monday returns of thousands of different stocks
Column 2: Dummy variable: 0 for stocks with option and 1 for stocks without option
Thanks everyone for your time
Samir
> Hello, Samir,
> The S-plus module finmetrics has a built-in function called mgarch, which suits your purpose,
I believe.
>
> HTH,
> Yingfu
>
> Ps. The help file:
> Fit Multivariate GARCH Model
> DESCRIPTION:
> Fits one of a wide variety of multivariate GARCH models, including not only the basic
diagonal vec models of Bollerslev, Engle, and Nelson (1994), but also the complete set of models given in Ding (1994).
> USAGE:
> mgarch(formula.mean=~arma(0,0), formula.var=~garch(0,0),
> series=NULL, series.start=1, x=NULL, x.start=1,
> xlag=0, z=NULL, z.start=1, model=NULL, leverage=F,
> n.predict=1, trace=T, cond.dist="gaussian",
> dist.par=NULL, dist.est=T, cccor.choice=1,
> cccor.value=NULL, armaType="diag",
control=NULL,
> algorithm="bhhh", ...)
>
> REQUIRED ARGUMENTS:
> formula.mean
> a formula specifying the conditional mean equation structure of ARMA form. Can have the
form y~arma(p,q), where y is a matrix of time series observations. In the formula, arma(p,q) can be replaced by ar(p), ma(q). If a mean term is to be removed, -1+arma(p,q) must
be used. Also in the formula.mean, y can be present or absent. In the case y does not appear, it must be specified by the series argument. Exogenous variables are also allowed.
> formula.var
> a formula specifying a GARCH model to fit, namely one of the following:
>
> ~dvec(p,q), the basic diagonal vec model that does not force positive definiteness of
the conditional covariance matrices.
>
> ~dvec.x.y(p,q), with x and y being either mat, vec, or scalar. For example, the matrix
diagonal model can be specified by ~dvec.mat.mat(1,1).
>
> ~dvecac.x.y(p,q), with x and y being either mat, vec, or scalar. There is a correspondence
between models in the group dvec and those in the group dvecac. The difference is that a model in the group dvecac replaces the constant matrix C by its asymptotically estimated
form.
>
> ~ewma1, exponentially weighted model of type 1.
>
> ~ewma2, exponentially weighted model of type 2.
>
> ~bekk(p,q), the BEKK model.
>
> ~diag.g(p,q), a collection of uncorrelated univariate GARCH models, with g being a name
of one of the univariate models, e.g., ~diag.egarch(2,2).
>
> ~ccc.g(p,q), the conditional constant correlation model, with g being a name of one of
the univariate models, e.g., ~ccc.tgarch(2,2).
>
> ~prcomp.g(p,q), the principal components model, with g being a name of one of the univariate
models, e.g., ~prcomp.pgarch(2,2).
>
> In the three models above, if the univariate garch(p,q) is used, there is no need to specify
g, e.g., diag(p,q) uses a garch(p,q) model. Exogenous variables are also allowed in the formula.
> series
> a matrix of time series observations. The number of columns of the matrix series is the
number of time series to be modeled and the number of rows of the series is the length of the time series observations. If y is a vector, a univariate model is fitted.
> model
> a list specifying the model as returned by mgarch.model. The required arguments are formula.mean
and formula.var, or model. If both formula.mean and formula.var are specified by the user, mgarch will call mgarch.model to generate a model list specification. If one but not
both of formula.mean or formula.var is missing, the missing equation will be specified as the default: arma(0,0) for the mean equation, and garch(0,0) for the variance equation.
If neither formula.mean nor formula.var is specified by the
user, then a model list with the components specified as in the object created by mgarch.model must be supplied through the model argument, which has the default NULL. If the
matrix of time series y in formula.mean is not specified, then it must be supplied in the argument series, which also has the default value NULL.
> OPTIONAL ARGUMENTS:
> series.start
> the element of series to begin with. For example, if series.start=10, the observations
of series will start from the tenth row of series.
> x
> a vector or matrix of exogenous variables in the mean equation. The default is NULL. Preferably
this should be specified in formula.mean.
> x.start
> the element of x to begin with. For example, if x.start=10, the observations of x will
start from the tenth row of x.
> xlag
> maximum number of lags in exogenous variables x.
> z
> a vector or matrix of exogenous variables in the variance equation. Preferably this should
be specified in formula.var.
> z.start
> the element of z to begin with. For example, if z.start=10, the observations of z will
start from the tenth row of z.
> leverage
> logical flag: if TRUE, a leverage term is included for models DIAG.g, CCC.g, or PRCOMP.g.
> n.predict
> the number of steps ahead predicted from the current time.
> cccor.choice
> for ccc type models only, an integer specifying the correlation estimation:
>
> 0 - use sample correlation matrix and perform no further MLE estimation of the correlation
matrix;
>
> 1 - use sample correlation matrix as the initial values and estimate the correlation matrix
via MLE;
>
> 2 - use user supplied correlation matrix as the initial values and estimate the correlation
matrix via MLE.
> cccor.value
> specifies the correlation matrix supplied by the user for cccor.choice=2.
> cond.dist
> conditional distribution given the past. The default is "gaussian" for multivariate
Gaussian. An alternative is "t" for the multivariate t-distribution.
> dist.par
> the parameter for the conditional distribution.
> dist.est
> logical flag: if TRUE, the parameters of the conditional distribution will be estimated.
The default is FALSE.
> trace
> logical flag: if TRUE, step-by-step optimization results will be printed on the screen,
otherwise see opt.index for convergence information. The default is TRUE.
> armaType
> parameter that determines the type of ARMA coefficient matrix. Valid choices are "diag"
for diagonal matrix, "full" for a full matrix, and "lower" for a lower triangular matrix.
> control
> a list of control parameters to be used in the numerical algorithms. See bhhh.control
for the possible control parameters and their default settings.
> algorithm
> parameter that determines the algorithm used for maximum likelihood estimation. Currently
only "bhhh" is available.
> VALUE:
> an S version 3 object of class "mgarch", including the following components:
> coef
> the estimated coefficients in the model.
> likelihood
> the log-likelihood value at the optimum.
> residuals
> a numeric matrix, or a "timeSeries" object, which represents residuals from
the fitted multivariate model.
> R.t
> an array of dimension (n, m, m), with m being the dimension of the model and n being the
length of the series. This represents the estimated sequence of conditional correlation matrix.
> S.t
> an array of dimension (n, m, m), with m being the dimension of the model and n being the
length of the series. This represents the estimated sequence of conditional covariance matrix.
> sigma.t
> a numeric matrix, or a "timeSeries" object, which represents the estimated conditional
standard deviation sequence.
> series
> a numeric matrix, or a "timeSeries" object, which represents the original multivariate
time series.
> model
> the model list of the fitted model.
> opt.index
> convergence indicator:
>
> 1 indicating BHHH convergence has been reached.
>
> 2 indicating the likelihood value has converged.
>
> 3 indicating a local maximum has been reached.
>
> 4 indicating the maximum number of iterations has been reached.
> REFERENCES:
> Bollerslev, T., Engle, R. F., and Nelson, D. B. (1994). ARCH models. In Handbook of Econometrics,
Vol. IV, Engle and McFadden, eds., Elsevces Science B.V. pp. 2959-3038,
>
> Ding, Z. (1994). Time Series Analysis of Speculative Returns. Ph.D. dissertation, Dept.
of Economics, University of California, San Diego.
>
>
> -----Original Message-----
> From: s-news-owner@lists.biostat.wustl.edu [mailto:s-news-owner@lists.biostat.wustl.edu]
On Behalf Of Samir Saadi
> Sent: den 7 juni 2005 00:32
> To: s-news@lists.biostat.wustl.edu
> Subject: [S] Comparing volatility
>
> Hi S-Plus users !
> I have a data file (of 850 000 observations) which has two colums:
> - Colum 1: Monday returns of thousands of different stocks
> - Colum 2: Dummy variable: 0 for stocks with option and 1 for stocks without option
>
> I would like to see whether Options have any effect on Monday returns' volatility.
> My question is: Using S-PLUS, how can I test which stocks have a higher volatility ?
> I thought about Multivariate GARCH, but I don't know how to program it on S-Plus :(
>
> I would really appreciate your help.
>
>
>
> Samir
>
>
>
> On 5 Jun 2005 at 8:01, riadh alaoui wrote:
>
> > how to perform pseudo maximum likelihood method to estimate garch model?
> >
> > _________________________________________________________________
> > MSN Hotmail : antivirus et antispam intégrés
> > http://www.msn.fr/newhotmail/Default.asp?Ath=f
> >
> > --------------------------------------------------------------------
> > This message was distributed by s-news@lists.biostat.wustl.edu. To
> > unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> > the BODY of the message: unsubscribe s-news
>
> Saadi@management.uottawa.ca
>
> --------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu. To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message: unsubscribe s-news
> ###########################################
>
> This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
> For more information, connect to http://www.f-secure.com/
Saadi@management.uottawa.ca
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Using apply for functions with more than one argument, Sarah Goslee |
|---|---|
| Next by Date: | Re: Using apply for functions with more than one argument, Rich |
| Previous by Thread: | Re: Using apply for functions with more, Richard M. Heiberger |
| Next by Thread: | Re: Comparing volatility, Yingfu Xie |
| Indexes: | [Date] [Thread] [Top] [All Lists] |