help xtgpsversion: 2.5
also see: xtscc

Title

xtgps - Estimation of Hoechle, Schmid, and Zimmermann's (2024) GPS-regression model for analyzing asset returns

Syntax

xtgps
depvar
subjectvar(s)
[if] [in]
[weight]
[, options]

Model
tsvars(varlist) varlist containing the market variables (i.e. the variables of the performance measurement model)

controlvars(varlist) varlist of control variables

lag(#) set maximum lag order of autocorrelation; default is H(T)=floor[4(T/100)^(2/9)]

noconstant suppress the regression constant

ase return (asymptotic) Driscoll-Kraay SE without small sample adjustment

fe Estimate the GPS-model by aid of the fixed effects (within) estimator;
the default is pooled OLS.

re Estimate the GPS-model by aid of the GLS random effects estimator;
the default is pooled OLS.

vcetype(vcetype) Define the covariance matrix estimator that has to be applied in the estimation. See below.

GPS-model specification test
spectest Perform the GPS-model specification test in Hoechle, Schmid, and Zimmermann (2024).

notable Display the results from the GPS-model specification test without showing the regression results underlying the Wald-test (requires option spectest).

Reporting
level(#) set confidence level; default is level(95)

alphaonly Do only display coefficient estimates for the regression constant (or, "alpha") rather than all regression coefficients.

You must xtset your data before using xtgps.

by and statsby may be used with xtgps; see prefix.

aweights are allowed unless option re is specified; see weight.

Description

xtgps estimates the GPS-regression model proposed by Hoechle, Schmid, and
Zimmermann (2024, henceforth abbreviated as HSZ) in their working paper
"Does Unobservable Heterogeneity Matter for Portfolio-Based Asset Pricing Tests?".
The GPS-regression model constitutes a regression-based methodology for analyzing
asset returns. The technique easily handles multiple dimensions and continuous
firm, fund, or investor characteristics. The method allows for investigating the
cross-section versus time-series predictability of stock returns, and it offers
a framework for formal tests of competing specifications. The GPS-model nests
conventional portfolio sorts (where assets are sorted into portfolios based on
one or more characteristics) as a special case. Estimation results therefore have
a straightforward economic interpretation.

Estimating the GPS-regression model with option vcetype being set to
vcetype(spatial) (the default value) yields standard error estimates which
are heteroscedasticity consistent and robust to general forms of cross-sectional
and temporal dependence. When the vcetype is differently specified, then the
standard error estimates tend to be overly optimistic - at least when cross-sectional
dependence is present in the data which is likely for microeconometric panels.

The GPS-model contains up to four types of explanatory variables:

1) The subjectvars contain subject (i.e. firm, fund, individual investor, etc.)
specific characteristics. These variables are allowed to vary across both the
cross-sectional dimension as well as over time. In the notation of HSZ,
the subject characteristics form the z-vector.

2) The tsvars change over time but do not vary across subjects. In HSZ's
notation, these market level variables (together with a constant that is
automatically added) form the x-vector.

3) A full set of interaction variables between the subjectvars and
the tsvars. The xtgps program automatically generates the interaction
terms.

4) Finally, one may also include controlvars in the regression. The
controlvars may vary over time and/or across subjects. This variable type
is not covered in HSZ's original research.

The xtgps program works for both balanced and unbalanced panels.
Furthermore, it is capable to handle missing values and gaps.

Options

Model

tsvars(varlist) contains the variables of the factor model. Popular choices
for these market level variables are the Fama and French (1993, 2015) or Carhart
(1997) factors. The tsvars(varlist) variables are constant across subjects;
they only vary over time. - If option tsvars is not provided, then the
x-vector just comprises a constant, and the GPS-regression model results in
analyzing (excess) returns rather than risk-adjusted performance.

controlvars(varlist) are explanatory variables which are not part of the
performance measurement model. For these variables, no interactions with the
tsvars are created. Typically, this option is used to perform robustness
checks.

lag(#) specifies the maximum number of lags to be considered in the
autocorrelation structure. If you do not specify this option, a lag length of
H(T)=floor[4(T/100)^(2/9)] is chosen. Here, T denotes the number of distinct
time periods.

noconstant; see [R] estimation options. If this
option is set, then the z-vector just comprises the subjectvar(s) without
a constant. Option noconstant is useful for estimating with the
GPS-regression model (a set of) portfolio sorts. In this case, the subjectvars
should be dummy variables defining the (e.g. quintile or decile) portfolios or
subject group portfolios.

ase returns asymptotic Driscoll-Kraay standard errors (i.e. Driscoll-Kraay
standard errors without a small sample adjustment).

fe estimates the GPS-model by aid of the fixed effects (within) estimator
rather than with pooled OLS/WLS. If fe is chosen, then it is impossible to
estimate the regression without a constant (i.e. option noconstant is not
allowed together with option fe).

re estimates the GPS-model by aid of the GLS random effects estimator
rather than with pooled OLS/WLS. If re is chosen, then it is impossible to
estimate the regression without a constant (i.e. option noconstant is not
allowed together with option re). Moreover, weights are not allowed with
re estimation.

vcetype(vcetype) specifies how to compute the standard errors for the
coefficient estimates. The following vcetypes are allowed: model
applies the covariance matrix estimator derived from the regression model.
Choosing robust computes heteroscedasticity consistent or so-called White
standard errors. Specifying cluster yields panel robust or clustered
standard errors. These standard errors are sometimes also referred to as Arellano
standard errors. If cluster is chosen, then the xtgps program
automatically selects the cross-sectional identifier specified in xtset
to be the cluster variable. bootstrap provides bootstrapped standard
errors and jacknife computes jacknifed standard errors. Finally, choosing
spatial or ommitting option vcetype yields Driscoll and Kraay (1998)
standard errors. These standard errors are heteroscedasticity consistent and
robust to very general forms of cross-sectional and temporal dependence.
HSZ show that the (two-stage) portfolio sorts approach essentially replicates
Driscoll and Kraay (1998) standard errors.

GPS-model specification test

spectest performs the GPS-model specification test proposed in HSZ).
The test can also be used to test for the validity of portfolio sorts comparing
the performance of two portfolios such as the top and bottom portfolio of stocks
sorted w.r.t. a firm characteristic.

The GPS-model specification test implements a Hausman (1978)-type test by aid of
the auxiliary regression procedure in Wooldridge (2010, Section 10.7.3). The
specification test thereby proceeds along the following steps:

1. For each explanatory variable in the GPS-model, it is checked whether the
variable varies over both time and the cross-section. For all variables for which
this is the case, an additional variable containing subject-specific time averages
is constructed.

2. Estimation of the GPS-model including the variables generated in step 1 before.
Thereby, the time-averages are added to the model as controlvars. By default,
the extended GPS-model is estimated with pooled OLS/WLS. However, if option
re is chosen, then the extended GPS-model is estimated with the FGLS
RE estimator.

3. Validity of the random effects (RE) assumption is finally tested by performing
a (robust) Wald test on the null hypothesis that all the coefficient
estimates on the time average variables (from step 2 above) are equal to zero.

notable only displays the result from the Wald-test of the GPS-model
specification test (i.e. the regression results on which the Wald-test is based
are not displayed). Note that option notable requires option
spectest to be set.

Reporting

level(#); see estimation options.

alphaonly only displays the subjectvars and the controlvars.
By default, the xtgps program lists all regression coefficients, i.e. also
the coefficient estimates for the tsvars and those for the
interaction terms.

Examples

For meaningful examples on how to apply program xtgps, see the tutorial
contained in do-file "GPS-Model Tutorial.do". The respective do-file comes along
with xtgps as an ancillary file.

. webuse grunfeld

. by year, sort: egen tvar = mean(invest - kstock + mvalue/10)

. xtgps invest mvalue kstock, tsvar(tvar) lag(2)

. xtgps invest mvalue kstock, tsvar(tvar) vcetype(cluster) re alphaonly

. xtgps invest mvalue kstock, tsvar(tvar) spec

References

- Carhart, M., 1997, On Persistence in Mutual Fund Performance,
Journal of Finance 52, 57-82.

- Driscoll, J. and A. Kraay, 1998, Consistent Covariance Matrix
Estimation with Spatially Dependent Panel Data, Review of Economics and Statistics
80, 549-560.

- Fama, E. and K. French, 1993, Common Risk Factors in the Returns of Bonds
and Stocks, Journal of Financial Economics 33, 3-56.

- Fama, E. and K. French, 2015, A five-factor asset pricing model,
Journal of Financial Economics 116, 1-22.

- Hoechle, D., M. Schmid, and H. Zimmermann, 2024, Does Unobservable Heterogeneity Matter for
Portfolio-Based Asset Pricing Tests?, Working Paper (dx.doi.org/10.2139/ssrn.3190310).

Notes

- For xtgps to work, my xtscc program and Ben Jann's estout package need to be installed.

Author

Daniel Hoechle, FHNW Business School, daniel.hoechle@fhnw.ch

Also see

Manual: [R] regress, [XT] xtreg

Online: xtscc, xtscc postestimation;

xtset, regress, xtreg, _robust