1 ln( ti )], (5.50)1 + exp[γ0 + γ1 ln( ti )]
where ∼ means “is distributed as,” and g(λ) denotes a geometric distribution withparameter λ, which is in the interval (0, 1).The model for direction Di isDi | (Ni , ti , Fi−1 ) = sign(µi + σi ),where is a N (0, 1) random variable, and
(5.51)
210
HIGH - FREQUENCY DATA
µi = ω0 + ω1 Di−1 + ω2 ln( ti ) 4ln(σi ) = β Di− j  = β| Di−1 + Di−2 + Di−3 + Di−4 |. j=1In other words, Di is governed by the sign of a normal random variable with mean µiand variance σi2 . A special characteristic of the prior model is the function for ln(σi ).For intraday transactions, a key feature is the price reversal between consecutiveprice changes. This feature is modeled by the dependence of Di on Di−1 in themean equation with a negative ω1 parameter. However, there exists occasional localtrend in the price movement. The previous variance equation allows for such a localtrend by increasing the uncertainty in the direction of price movement when the pastdata showed evidence of a local trend. For a normal distribution with a fixed mean,increasing its variance makes a random draw have the same chance to be positiveand negative. This in turn increases the chance for a sequence of all positive or allnegative draws. Such a sequence produces a local trend in price movement.To allow for different dynamics between positive and negative price movements,we use different models for the size of a price change. Specifically, we haveSi | (Di = −1, Ni , ti , Fi−1 ) ∼ p(λd,i ) + 1,
with
(5.52)
ln(λd,i ) = ηd,0 + ηd,1 Ni + ηd,2 ln( ti ) + ηd,3 Si−1Si | (Di = 1, Ni , ti , Fi−1 ) ∼ p(λu,i ) + 1,
with
(5.53)
ln(λu,i ) = ηu,0 + ηu,1 Ni + ηu,2 ln( ti ) + ηu,3 Si−1 ,where p(λ) denotes a Poisson distribution with parameter λ, and 1 is added to thesize because the minimum size is 1 tick when there is a price change.The specified models in Eqs. (5.48)–(5.53) can be estimated jointly by either themaximum likelihood method or the Markov Chain Monte Carlo methods. Basedon Eq. (5.47), the models consist of six conditional models that can be estimatedseparately.Example 5.5. Consider the intraday transactions of IBM stock on November21, 1990. There are 194 price changes within the normal trading hours. Figure 5.15shows the histograms of ln( ti ), Ni , Di , and Si . The data for Di are about equallydistributed between “upward” and “downward” movements. Only a few transactionsresulted in a price change of more than 1 tick; as a matter of fact, there were sevenchanges with two ticks and one change with three ticks. Using Markov Chain MonteCarlo (MCMC) methods (see Chapter 10), we obtained the following models for thedata. The reported estimates and their standard deviations are the posterior meansand standard deviations of MCMC draws with 9500 iterations. The model for thetime duration between price changes isln( ti ) = 4.023 + 0.032 ln( ti−1 ) − 0.025Si−1 + 1.403 i ,
211
0
50
100 150
0 10 20 30 40 50
THE PCD MODEL
2
4log(duration)
-1.0
-0.5
0.0direction
6
1.0
1.5
0
5
2.02.5size, in ticks
3.0
0
0 20 40 60 80
120
20 40 60 80 100
0
0.5
1.0
1015number of trades
20
Figure 5.15. Histograms of intraday transactions data for IBM stock on November 21, 1990:(a) log durations between price changes, (b) direction of price movement, (c) size of pricechange measured in ticks, and (d) number of trades without a price change.
where standard deviations of the coefficients are 0.415, 0.073, 0.384, and 0.073,respectively. The fitted model indicates that there was no dynamic dependence in thetime duration. For the Ni variable, we havePr (Ni > 0 |
ti , Fi−1 ) = logit[−0.637 + 1.740 ln( ti )],
where standard deviations of the estimates are 0.238 and 0.248, respectively. Thus,as expected, the number of trades with no price change in the time interval (ti−1 , ti )depends positively on the length of the interval. The magnitude of Ni when it ispositive isNi | (Ni > 0, ti , Fi−1 ) ∼ 1 + g(λi ),
λi =
exp[0.178 − 0.910 ln( ti )],1 + exp[0.178 − 0.910 ln( ti )]
where standard deviations of the estimates are 0.246 and 0.138, respectively. Thenegative and significant coefficient of ln( ti ) means that Ni is positively related tothe length of the duration ti because a large ln( ti ) implies a small λi , whichin turn implies higher probabilities for larger Ni ; see the geometric distribution inEq. (5.27).
212
HIGH - FREQUENCY DATA
The fitted model for Di isµi = 0.049 − 0.840Di−1 − 0.004 ln( ti )ln(σi ) = 0.244| Di−1 + Di−2 + Di−3 + Di−4 |,where standard deviations of the parameters in the mean equation are 0.129, 0.132,and 0.082, respectively, whereas that for the parameter in the variance equation is0.182. The price reversal is clearly shown by the highly significant negative coefficient of Di−1 . The marginally significant parameter in the variance equation isexactly as expected. Finally, the fitted models for the size of a price change areln(λd,i ) = 1.024 − 0.327Ni + 0.412 ln( ti ) − 4.474Si−1ln(λu,i ) = −3.683 − 1.542Ni + 0.419 ln( ti ) + 0.921Si−1 ,where standard deviations of the parameters for the “down size” are 3.350, 0.319,0.599, and 3.188, respectively, whereas those for the “up size” are 1.734, 0.976,0.453, and 1.459. The interesting estimates of the prior two equations are the negativeestimates of the coefficient of Ni . A large Ni means there were more transactions inthe time interval (ti−1 , ti ) with no price change. This can be taken as evidence of nonew information available in the time interval (ti−1 , ti ). Consequently, the size forthe price change at ti should be small. A small λu,i or λd,i for a Poisson distributiongives precisely that.In summary, granted that a sample of 194 observations in a given day may notcontain sufficient information about the trading dynamic of IBM stock, but the fittedmodels appear to provide some sensible results. McCulloch and Tsay (2000) extendthe PCD model to a hierarchical framework to handle all the data of the 63 trading days between November 1, 1990 and January 31, 1991. Many of the parameterestimates become significant in this extended sample, which has more than 19,000observations. For example, the overall estimate of the coefficient of ln( ti−1 ) in themodel for time duration ranges from 0.04 to 0.1, which is small, but significant.Finally, using transactions data to test microstructure theory often requires a careful specification of the variables used. It also requires a deep understanding of theway by which the market operates and the data are collected. However, ideas of theeconometric models discussed in this chapter are useful and widely applicable inanalysis of high-frequency data.
APPENDIX A. REVIEW OF SOME PROBABILITY DISTRIBUTIONSExponential distributionA random variable X has an exponential distribution with parameter β > 0 if itsprobability density function (pdf) is given by
213
THE PCD MODEL
 1 e−x/βf (x | β) = β0
if x ≥ 0otherwise.
Denoting such a distribution by X ∼ exp(β), we have E(X ) = β and Var(X ) = β 2 .The cumulative distribution function (CDF) of X is01 − e−x/β
F(x | β) =
if x < 0if x ≥ 0.
When β = 1, X is said to have a standard exponential distribution.Gamma functionFor κ > 0, the gamma function (κ) is defined by(κ) =
 ∞
x κ−1 e−x d x.
0
The most important properties of the gamma function are:1. For any κ > 1, (κ) = (κ − 1)(κ − 1).2. For any positive integer m, (m) = (m − 1)!.√3. ( 12 ) = π.The integration(y | κ) =
 y
x κ−1 e−x d x,
y>0
0
is an incomplete gamma function. Its values have been tabulated in the literature.Computer programs are now available to evaluate the incomplete gamma function.Gamma distributionA random variable X has a Gamma distribution with parameter κ and β (κ > 0,β > 0) if its pdf is given by
f (x | κ, β) =

1β κ (κ)
x κ−1 e−x/β
if x ≥ 0
0
otherwise.
By changing variable y = x/β, one can easily obtain the moments of X :E(X m ) =
 ∞0
x m f (x | κ, β)d x =
1β κ (κ)
 ∞0
x κ+m−1 e−x/β d x
214
HIGH - FREQUENCY DATA
βm=(κ)
 ∞
y κ+m−1 e−y dy =
0
β m (κ + m).(κ)
In particular, the mean and variance of X are E(X ) = κβ and Var(X ) = κβ 2 . Whenβ = 1, the distribution is called a standard Gamma distribution with parameter κ.We use the notation G ∼ Gamma(κ) to denote that G follows a standard Gammadistribution with parameter κ. The moments of G areE(G m ) =
(κ + m),(κ)
m > 0.
(5.54)
Weibull distributionA random variable X has a Weibull distribution with parameters α and β (α > 0,β > 0) if its pdf is given byf (x | α, β) =
α α−1 −(x/β)αeβα x
0
if x ≥ 0if x < 0,
where β and α are the scale and shape parameters of the distribution. The mean andvariance of X are    121 22E(X ) = β 1 +, Var(X ) = β  1 +−  1+αααand the CDF of X isF(x | α, β) =
0α1 − e−(x/β)
if x < 0if x ≥ 0.
When α = 1, the Weibull distribution reduces to an exponential distribution.Define Y = X/[β(1 + α1 )]. We have E(Y ) = 1 and the pdf of Y is    α 1 α α−11α  1+yexp −  1 +if y ≥ 0yf (y | α) =αα0otherwise,(5.55)where the scale parameter β disappears due to standardization. The CDF of the standardized Weibull distribution is 0 α  if y < 01F(y | α) =yif y > 0,1 − exp −  1 +αand we have E(Y ) = 1 and Var(Y ) = (1 + α2 )/[(1 + α1 )]2 − 1. For a durationmodel with Weibull innovations, the prior pdf is used in the maximum likelihoodestimation.
215
THE PCD MODEL
Generalized Gamma distributionA random variable X has a generalized Gamma distribution with parameter α, β, κ(α > 0, β > 0, and κ > 0) if its pdf is given by  α κα−1x αxexp −if x ≥ 0καβf (x | α, β, κ) = β (κ)0otherwise,where β is a scale parameter, and α and κ are shape parameters. This distributioncan be written as αXG=,βwhere G is a standard Gamma random variable with parameter κ. The pdf of X canbe obtained from that of G by the technique of changing variables. Similarly, themoments of X can be obtained from that of G in Eq. (5.54) byE(X m ) = E[(βG 1/α )m ] = β m E(G m/α ) = β m
(κ + mα )β m (κ + mα )=.(κ)(κ)
When κ = 1, the generalized Gamma distribution reduces to that of a Weibulldistribution. Thus, the exponential and Weibull distributions are special cases of thegeneralized Gamma distribution.The expectation of a generalized Gamma distribution is E(X ) = β(κ +1)/(κ). In duration models, we need a distribution with unit expectation. Thereαfore, defining a random variable Y = λX/β, where λ = (κ)/ (κ + α1 ), we haveE(Y ) = 1 and the pdf of Y is κα−1  y α  αyexp−if y > 0λf (y | α, κ) = λκα (κ)(5.56)0otherwise,where again the scale parameter β disappears and λ = (κ)/ (κ + α1 ).APPENDIX B.
HAZARD FUNCTION
A useful concept in modeling duration is the Hazard function implied by a distribution function. For a random variable X , the survival function is defined asS(x) ≡ P(X > x) = 1 − P(X ≤ x) = 1 − CDF(x),
x > 0,
which gives the probability that a subject, which follows the distribution of X , survives at the time x. The hazard function (or intensity function) of X is then defined
216
HIGH - FREQUENCY DATA
byh(x) =
f (x)S(x)
(5.57)
where f (.) and S(.) are the pdf and survival function of X , respectively.Example 5.6. For the Weibull distribution with parameters α and β, the survival function and hazard function are:  α xαS(x | α, β) = exp −, h(x | α, β) = α x α−1 , x > 0.ββIn particular, when α = 1, we have h(x | β) = 1/β. Therefore, for an exponentialdistribution, the hazard function is constant. For a Weibull distribution, the hazard isa monotone function. If α > 1, then the hazard function is monotonously increasing. If α < 1, the hazard function is monotonously decreasing. For the generalizedGamma distribution, the survival function and hence, the hazard function involve theincomplete Gamma function. Yet the hazard function may exhibit various patterns,including U shape or inverted U shape. Thus, the generalized Gamma distributionprovides a flexible approach to modeling the duration of stock transactions.For the standardized Weibull distribution, the survival and hazard functions are  α 1S(y | α) = exp −  1 +y,α 1 α α−1y, y > 0.h(y | α) = α  1 +αAPPENDIX C. SOME RATS PROGRAMS FOR DURATION MODELSThe data used are adjusted time durations of intraday transactions of IBM stock fromNovember 1 to November 9, 1990. The file name is “ibm1to5.dat” and it has 3534observations.A. Program for Estimating a WACD(1, 1) Modelall 0 3534:1open data ibm1to5.datdata(org=obs) / x r1set psi = 1.0nonlin a0 a1 b1 alfrml gvar = a0+a1*x(t-1)+b1*psi(t-1)frml gma = %LNGAMMA(1.0+1.0/al)frml gln =al*gma(t)+log(al)-log(x(t)) $+al*log(x(t)/(psi(t)=gvar(t)))-(exp(gma(t))*x(t)/psi(t))**al
THE PCD MODEL
217
smpl 2 3534compute a0 = 0.2, a1 = 0.1, b1 = 0.1, al = 0.8maximize(method=bhhh,recursive,iterations=150) glnset fv = gvar(t)set resid = x(t)/fv(t)set residsq = resid(t)*resid(t)cor(qstats,number=20,span=10) residcor(qstats,number=20,span=10) residsq
B.
Program for Estimating a GACD(1, 1) Models
all 0 3534:1open data ibm1to5.datdata(org=obs) / x r1set psi = 1.0nonlin a0 a1 b1 al kafrml cv = a0+a1*x(t-1)+b1*psi(t-1)frml gma = %LNGAMMA(ka)frml lam = exp(gma(t))/exp(%LNGAMMA(ka+(1.0/al)))frml xlam = x(t)/(lam(t)*(psi(t)=cv(t)))frml gln =-gma(t)+log(al/x(t))+ka*al*log(xlam(t))-(xlam(t))**alsmpl 2 3534compute a0 = 0.238, a1 = 0.075, b1 = 0.857, al = 0.5, ka = 4.0nlpar(criterion=value,cvcrit=0.00001)maximize(method=bhhh,recursive,iterations=150) glnset fv = cv(t)set resid = x(t)/fv(t)set residsq = resid(t)*resid(t)cor(qstats,number=20,span=10) residcor(qstats,number=20,span=10) residsq
C. A program for estimating a Tar-WACD(1, 1) model. The threshold 3.79 isprespecified.all 0 3534:1open data ibm1to5.datdata(org=obs) / x rtset psi = 1.0nonlin a1 a2 al b0 b2 blfrml u = ((x(t-1)-3.79)/abs(x(t-1)-3.79)+1.0)/2.0frml cp1 = a1*x(t-1)+a2*psi(t-1)frml gma1 = %LNGAMMA(1.0+1.0/al)frml cp2 = b0+b2*psi(t-1)frml gma2 = %LNGAMMA(1.0+1.0/bl)frml cp = cp1(t)*(1-u(t))+cp2(t)*u(t)frml gln1 =al*gma1(t)+log(al)-log(x(t)) $+al*log(x(t)/(psi(t)=cp(t)))-(exp(gma1(t))*x(t)/psi(t))**alfrml gln2 =bl*gma2(t)+log(bl)-log(x(t)) $+bl*log(x(t)/(psi(t)=cp(t)))-(exp(gma2(t))*x(t)/psi(t))**blfrml gln = gln1(t)*(1-u(t))+gln2(t)*u(t)smpl 2 3534compute a1 = 0.2, a2 = 0.85, al = 0.9
218
HIGH - FREQUENCY DATA
compute b0 = 1.8, b2 = 0.5, bl = 0.8maximize(method=bhhh,recursive,iterations=150) glnset fv = cp(t)set resid = x(t)/fv(t)set residsq = resid(t)*resid(t)cor(qstats,number=20,span=10) residcor(qstats,number=20,span=10) residsq
EXERCISES1. Let rt be the log return of an asset at time t. Assume that {rt } is a Gaussian whitenoise series with mean 0.05 and variance 1.5. Suppose that the probability of atrade at each time point is 40% and is independent of rt . Denote the observedreturn by rto . Is rto serially correlated? If yes, calculate the first three lags of autocorrelations of rto .2. Let Pt be the observed market price of an asset, which is related to the fundamen∗ formstal value of the asset Pt∗ via Eq. (5.9). Assume that Pt∗ = Pt∗ − Pt−1a Gaussian white noise series with mean zero and variance 1.0. Suppose that thebid-ask spread is two ticks. What is the lag-1 autocorrelation of the price changeseries Pt = Pt − Pt−1 when the tick size is $1/8? What is the lag-1 autocorrelation of the price change when the tick size is $1/16?3. The file “ibm-d2-dur.dat” contains the adjusted durations between trades of IBMstock on November 2, 1990. The file has three columns consisting of day, time oftrade measured in seconds from midnight, and adjusted durations.(a) Build an EACD model for the adjusted duration and check the fitted model.(b) Build a WACD model for the adjusted duration and check the fitted model.(c) Build a GACD model for the adjusted duration and check the fitted model.(d) Compare the prior three duration models.4. The file “mmm9912-dtp.dat” contains the transactions data of the stock of 3MCompany in December 1999. There are three columns: day of the month, timeof transaction in seconds from midnight, and transaction price. Transactions thatoccurred after 4:00 pm Eastern time are excluded.(a) Is there a diurnal pattern in 3M stock trading? You may construct a time seriesn t , which denotes the number of trades in 5-minute time interval to answerthis question.(b) Use the price series to confirm the existence of bid-ask bounce in intradaytrading of 3M stock.(c) Tabulate the frequencies of price change in multiples of tick size $1/16. Youmay combine changes with 5 ticks or more into a category and those with −5ticks or beyond into another category.5. Consider again the transactions data of 3M stock in December 1999.
REFERENCES
219
(a) Use the data to construct an intraday 5-minute log return series. Use the simple average of all transaction prices within a 5-minute interval as the stockprice for the interval. Is the series serially correlated? You may use Ljung–Box statistics to test the hypothesis with the first 10 lags of sample autocorrelation function.(b) There are seventy-seven 5-minute returns in a normal trading day. Someresearchers suggest that the sum of squares of the intraday 5-minute returnscan be used as a measure of daily volatility. Apply this approach and calculatethe daily volatility of the log return of 3M stock in December 1999. Discussthe validity of such a procedure to estimate daily volatility.6. The file “mmm9912-adur.dat” contains an adjusted intraday trading duration of3M stock in December 1999. There are thirty-nine 10-minute time intervals ina trading day. Let di be the average of all log durations for the ith 10-minuteinterval across all trading days in December 1999. Define an adjusted duration ast j / exp(di ), where j is in the ith 10-minute interval. Note that more sophisticatedmethods can be used to adjust the diurnal pattern of trading duration. Here wesimply use a local average.(a) Is there a diurnal pattern in the adjusted duration series? Why?(b) Build a duration model for the adjusted series using exponential innovations.Check the fitted model.(c) Build a duration model for the adjusted series using Weibull innovations.Check the fitted model.(d) Build a duration model for the adjusted series using generalized Gammainnovations. Check the fitted model.(e) Compare and comment on the three duration models built before.
REFERENCESCampbell, J. Y., Lo, A. W., and MacKinlay, A. C. (1997), The Econometrics of FinancialMarkets, Princeton University Press: New Jersey.Cho, D., Russell, J. R., Tiao, G. C., and Tsay, R. S. (2000), “The magnet effect of price limits:Evidence from high frequency data on Taiwan stock exchange,” Working paper, GraduateSchool of Business, University of Chicago.Engle, R. F., and Russell, J. R. (1998), “Autoregressive conditional duration: A new model forirregularly spaced transaction data,” Econometrica, 66, 1127–1162.Ghysels, E. (2000), “Some econometric recipes for high-frequency data cooking,” Journal ofBusiness and Economic Statistics, 18, 154–163.Hasbrouck, J. (1992), Using the TORQ database, Stern School of Business, New York University.Hasbrouck, J. (1999), “The dynamics of discrete bid and ask quotes,” Journal of Finance, 54,2109–2142.Hauseman, J., Lo, A., and MacKinlay, C. (1992), “An ordered probit analysis of transactionstock prices,” Journal of Financial Economics, 31, 319–379.
220
HIGH - FREQUENCY DATA
Lo, A., and MacKinlay, A. C. (1990), “An econometric analysis of nonsynchronous trading,”Journal of Econometrics, 45, 181–212.McCulloch, R. E., and Tsay, R. S. (2000), “Nonlinearity in high frequency data and hierarchical models,” Working paper, Graduate School of Business, University of Chicago.Roll, R. (1984), “A simple implicit measure of the effective bid-ask spread in an efficientmarket,” Journal of Finance, 39, 1127–1140.Rydberg, T. H., and Shephard, N. (1998), “Dynamics of trade-by-trade price movements:decomposition and models,” Working paper, Nuffield College, Oxford University.Stoll, H., and Whaley, R. (1990), “Stock market structure and volatility,” Review of FinancialStudies, 3, 37–71.Wood, R. A. (2000), “Market microstructure research databases: History and projections,”Journal of Business & Economic Statistics, 18, 140–145.Zhang, M. Y., Russell, J. R., and Tsay, R. S. (2001), “A nonlinear autoregressive conditionalduration model with applications to financial transaction data,” Journal of Econometrics(to appear).Zhang, M. Y., Russell, J. R., and Tsay, R. S. (2001b), “Determinants of bid and ask quotesand implications for the cost of trading,” Working paper, Graduate School of Business,University of Chicago.
6
Switching Regime Volatility:An Empirical EvaluationBRUNO B. ROCHE AND MICHAEL ROCKINGER
ABSTRACTMarkov switching models are one possible method to account for volatility clustering.This chapter aims at describing, in a pedagogical fashion, how to estimate a univariateswitching model for daily foreign exchange returns which are assumed to be drawnin a Markovian way from alternative Gaussian distributions with different means andvariances. An application shows that the US dollar/Deutsche Mark exchange rate can bemodelled as a mixture of normal distributions with changes in volatility, but not in mean,where regimes with high and low volatility alternate. The usefulness of this methodologyis demonstrated in a real life application, i.e. through the performance comparison ofsimple hedging strategies.
6.1 INTRODUCTIONVolatility clustering is a well known and well documented feature of ﬁnancial marketsrates of return. The seminal approach proposed by Engle (1982), with the ARCH model,followed several years later by Bollerslev (1986), with the GARCH models, led to a hugeliterature on this subject in the last decade. This very successful approach assumes thatvolatility changes over time in an autoregressive fashion. There are several excellent booksand surveys dealing with this subject. To quote a few, Bollerslev et al. (1992, 1993), Beraand Higgins (1993), Engle (1995) and Gouriéroux (1997) provide a large overview of thetheoretical developments, the generalisation of the models and the application to speciﬁcmarkets. ARCH models provide a parsimonious description for volatility clustering wherevolatility is assumed to be a deterministic function of past observations.However, ARCH models struggle to account for the stylised fact that volatility canexhibit discrete, abrupt and somehow fairly persistent changes. In the late 1980s, Hamilton (1989) proposed