Infering model parameters in markets with collars

Robert W. Chen Burton J. Rosenberg University of Miami

Yi-Tsung Lee National Chung Cheng University

1 Introduction

Accurate estimation of price volatility is very important to mathematical models of financial assets. Methods for estimation are straightforward when the underlying asset’s returns are observable. However, in markets with daily price limits then the underlying asset’s returns are not always observable and consequently the common methods of estimating volatility cannot be applied. Naive approches which ignore price limits or delete price information on limit days will lead to perceptible underestimates of the volatility which are particularly severe in cases where price limits are rigid and true volatility is not negligible.

In this paper we propose three approaches to estimating volatility:

1. a method based on the measure of waiting times,

2. a method based on the estimate of the likelihood of an at-market day being followed by an at-limit day (definitions follow),

3. the generalized moment method.

The generalized moment method was introduced by Chiang and Wei [1] along with certain model assumptions. However, their proof of strong consistency lacked mathematical rigor. In this paper we use the Wald equation to prove rigorously that the estimators are strongly consistent.

We will compare the approaches using numerical simulations and compare the results to the actual mean and variance of the observed, market limited price walk.

2 The model

Following [2], we assume that the logarithm of stock prices follow a Wiener process. Furthermore, we discretize the process as a sequence S_{0}, S_{1}, … of observations made at equally spaced times — for instance, the closing day on the i-th trading day or the price exactly at noon of each trading day. (For volatility over the weekends, see ???). In summary, we assume

ln(S_{j}/S_{i}) ∼ N (μ(j − i), σ^{2}(j − i))

for t = 0, 1, 2, …, where N (m, s) is a Gaussian normal distribution with mean m and variance s.

The markets we are concerned with have daily price limits: whatever the price of a stock may be, it is not allowed to trade outside of collars determined by, say, the closing price of the previous day. Given upper and lower collars,

κ_{u} > 1 > κ_{l},

we define a new random walk S_{i}^{∗}, i = 0, 1, 2, … according to,

S_{i}^{∗} = \{ \begin{matrix}S_{0} & if i = 0, \\ κ_{u}S_{i−1}^{∗} & if S_{i} > κ_{u}S_{i−1}^{∗}, \\ κ_{l}S_{i−1}^{∗} & if S_{i} < κ_{l}S_{i−1}^{∗}, \\ S_{i} & otherwise. \end{matrix}

The actual prices S_{i} are not always observable. Our goal is to determine its μ and σ given only the observable, marketable price stream S_{i}^{∗}.

We classify each observation S_{i}^{∗} as either at-market or at-limit. Since we cannot always observe S_{i}, an observation S_{i}^{∗} will be considered at-market only if it is strictly within that observation’s collar. Else we must conclude that the observation is atlimit. Formally, the set of market observations is,

T = {i > 0 | (κ_{l}S_{i−1}^{∗}) < S_{i}^{∗} < (κ_{u}S_{i−1}^{∗})} ∪ {0}

and the set of limit observations is the complement,

L = {i > 0 | S_{i}^{∗} = (κ_{l}S_{i−1}^{∗}) or S_{i}^{∗} = (κ_{u}S_{i−1}^{∗})}

3 The waiting time method

Refering to the definition of the set T from the previous section, we enumerate the elements of T as T_{0}, T_{1}, …, such that T_{i} < T_{j} for i < j. Note that by construction T_{0} = 0. For i = 1, 2, …, let,

Z_{i} = ln (S_{i}/S_{i−1}) ∼ N (μ, σ^{2}),

and,

X_{i} = ln (S_{T_{i}}/S_{T_{i−1}}) = ∑_{j=T_{i−1}+1}^{T_{i}} Z_{j}.

Since Z_{i} and Z_{j} are independent for i ≠ j, the X_{i} are independent identically distributed random variables. By the choice of T_{i} they are observable.

By the Wald Equation (see [reference]),

E(X_{1}) = E(Z_{1})E(T_{1}) = μE(T_{1}).

Making use of sample expectations,

μ = E(X_{1})/E(T_{1})
≈ (1/n) ∑_{i=1}^{n} X_{i}/(T_{n}/n)
= (ln S_{T_{n}} − ln S_{T_{0}})/T_{n}

where n = |T | is the number of days observed at market in our sample.

In order to estimate the variance, we look at the waiting times for the first limit observation after the first return to a non-limit observation. Intuitively, we are flipping a biased coin, which may or may not turn up “limit”. We would like to estimate the bias of the coin. We know that in such a situation, the waiting time is the reciprocal of the probability. From this we can infer the appropriate σ that gives the proper weight under the normal distribution, integrated between the limits given by the collars, to achieve this waiting time.

Define,

V = {i | (i − 1 ∈ T ∧ i ∈ L) ∨ (i − 1 ∈ L ∧ i ∈ T)} ∪ {0}

and enumerate these events as V_{1}, V_{2}, …, where V_{i} < V_{j} if i < j. This sequence of observations has the property,

• the observation V_{2i} is at limit,

• the observations V_{2i−1}, …, V_{2i} − 1 are at market,

• either V_{2i−1} = 1 or the observation V_{2i−1} − 1 is at limit.

This motivates the following definition of waiting times,

W_{i} = V_{2i} − V_{2i−1}

for i = 1, 2, . . .. It may be that this sequence is empty, in which case our method fails. (In practice, replace the empty sequence with a single waiting time of length one more than the number of observations.) Else, the W_{i} are independent identically distributed random variables of geometric distribution with E(W_{i}) = 1/p. The parameter p is the probability that in the next step, an at market observation will hit the limit, that is,

1 − p = Prob {ln κ_{l} < Z_{i} < ln κ_{u}}
= \frac{1}{\sqrt{2πσ^{2}}} ∫_{ln κ_{l}}^{ln κ_{u}} e^{− \frac{(x−μ)^{2}}{2σ^{2}}} dx.

Given a sample sequence W_{1}, W_{2}, …, W_{m}, m = ⌊|V |/2⌋, we estimate p,

p̂ = \frac{m}{∑_{i=1}^{m} W_{i}} .

Therefore an estimate for σ is the solution σ̂ to the following equation:

1 − \frac{m}{∑_{i=1}^{m} W_{i}} = \frac{1}{\sqrt{2πσ̂^{2}}} ∫_{ln κ_{l}}^{ln κ_{u}} e^{− \frac{(x−μ̂)^{2}}{2σ̂^{2}}} dx.

We find this solution numerically.

4 The transition counting method

As refered to in the previous section, we can view the outcome of what follows an at-market day as the flip of a biased coin. The bias on this coin relates to the area under the gaussian distribution which might put the next market step into the limit region — and this is related monotonically to the variance. By observing the ratio of at-market days followed by at-market days versus by at-limit days, this bias can be estimated.

Define R to be the set of indices such that two consecutive days are at market and S to be the set of indices such that the first day is at market and the next is at limit,

R = {i | (i ∈ T) ∧ (i + 1 ∈ T)},
S = {i | (i ∈ T) ∧ (i + 1 ∈ L)}.

We are flipping a coin which comes up “limit” with probability |S|/(|S| + |R|). Therefore,

E(W_{1}) = 1 + (|R|/|S|).

For the case where the trial of the previous section ends during on a limit day, there will be exactly m events in S, because each stretch of market days ends in a limit day exactly once, and ∑ W_{i} = |S| + |R| since we are simply counting the event where we are at market today and either at market or at limit tomorrow. Hence E(W_{1}) will be given by the formula found in the previous section.

If the trial ends on a market day, then our estimate will be somewhat different, since we will have additional events in R. A random trial will either end on a market day or not, so on average this method will predict a slightly lower limit probability, a longer waiting time, and therefore a smaller σ.

5 The generalized moment method

Both expection and variance are linear when sums are taken of independent random variables. Therefore there is hope that we could distribute over the at-limit days which intervene between two at-market days the volatility observed between these two market days.

Intuitively, if S_{i} and S_{j} are two at-market observations, then the common variance of Z_{i+1}, Z_{i+2}, …, Z_{j} is summed to achieve the variance of S_{j} − S_{j}. If we measure the variance of S_{j} − S_{i} and divide by j − i, then we have the variance of each Z_{·}. To form the sample variance over the entire suite Z_{0}, …, Z_{n} we shall again multiply by j − i. This motivates the formula:

σ^{2} = (1/T_{k}) ∑_{i=1}^{k}(S_{T_{k}} − S_{T_{k−1}} − μ(T_{k} − T_{k−1}))^{2}

where the T_{i} are the indices of the at-market observations in ascending order.

The difficulty for proving this formula were not well handled in the original paper.

Appendix: Simulation in Mathematica

(*
   Burton Rosenberg
   6:43 PM 10/5/00
   version 4
*)
(* include packages *)
<< Statistics`ContinuousDistributions`
<< Statistics`DescriptiveStatistics`
(* trace generation routines *)
weinerWalk[ n_, m_, sd_] :=
    Module [
        { s = 0,
            sl = {0}
        },
        Do [
            s = s + Random[NormalDistribution[m, sd]] ;
            sl = Append[sl, s]
            , {n}
        ] ;
        sl
    ]

collarX[x_, s_, l_, u_] :=
If[ ( x > (s+u) ), (s+u) ,
If[ (x < (s-l) ),  (s-l), x
]
]
applyCollar[ walk_, l_, u_] :=
Module [
{ walkL = {},
  x = walk[[1]]
},
Do [
    x = collarX[ walk[[i]], x, l, u ] ;
    walkL = Append[ walkL, x ]
    , {i, 1, Length[walk]}
] ;
walkL
]
classifyDays[ a_, b_] :=
Module [
{ c = {} },
Do [
    If [ ( a[[i]]==b[[i]] ),
        c = Append[ c, 0 ],
        c = Append[ c, 1 ]
    ]
    , {i, 1, Length[a]}
] ;
c
]
generateTrace[ n_, mean_, sd_, lower_, upper_] :=
Module [
{ rw, cw, cd },
rw =  weinerWalk[ n, mean, sd ] ;
cw = applyCollar[ rw, lower, upper ] ;
cd = classifyDay[ rw, cw ] ;
{ rw, cw, cd }
]

(* end trace generation routines *)

(* helper functions to estimation routines *)
countTransitions[ daysClassified_] :=
Module [
{ result = { 0, 0, 0, 0 },
  index
},
Do [
  If[ ( daysClassified[[i]]==0 ),
      index = 1, index = 3 ] ;
  If[ ( daysClassified[[i+1]]==0 ),
      index = index, index = index+1 ] ;
  result[[index]]++
  , {i, 1, Length[daysClassified]-1}
] ;
(* { marketMarket, marketLimit,
     limitLimit, limitMarket } *)
result
]
waitingTimes[ daysClassified_] :=
Module [
{ waitT = {},
 classOfPreviousDay,
 currentWait = 0
},
(* assert: daysClassified[[1]]==0 *)
Do [
   If[ (daysClassified[[i]]==0),
       currentWait++ ;
       , (* else *)
       If [ (classOfPreviousDay==0),
           waitT = Append[ waitT, currentWait ] ;
           currentWait = 0
       ]
   ] ;
   classOfPreviousDay = daysClassified[[i]]
   , {i, 1, Length[daysClassified]}
] ;
waitT
]
lastMarketDay[ daysClassified_] :=
Module [ { lmd },

(* assert: daysClassified[[1]]==0 *)
Do [
    If [ (daysClassified[[i]]==0),
        lmd = i
    ]
    , {i, 1, Length[daysClassified] }
] ;
lmd
]

f[ mu_, sigma_, ll_, ul_] :=
1 - Integrate[
   ( 1 / (sigma Sqrt[ 2 Pi ]) ) Exp[ - (t-mu)^2 / ( 2 sigma^2 ) ],
   { t, ll, ul }
]
(* estimation routines *)
estimateMean[ aTrace_] :=
Module[ { lmd = lastMarketDay[ aTrace[[3]] ] },
(aTrace[[1]])[[lmd]]/(lmd-1) (*note: arrays count from 1, differs from text *)
]
waitingTimeMethod[ aTrace_, lowerCollar_, upperCollar_] :=
Module[ { wt, p },
wt = waitingTimes[ aTrace[[3]] ] ;
(* if no limit days, create one waiting time, with value beyound maximum *)
If [ (Length[wt]==0),
Print["waitingTimeMethod: no limit days - append maximum possible wait time"] ;
   wt = { Length[aTrace[[1]]] } ] ;
p = 1 / Mean[ wt ] ;
FindRoot[ f[estimateMean[ aTrace ], x,
   -lowerCollar, upperCollar]==p, {x,1},
   MaxIterations->100, AccuracyGoal->15 ]//N
]
transitionCountingMethod[ aTrace_, lowerCollar_, upperCollar_] :=
Module[ { cx, p },
cx = countTransitions[ aTrace[[3]] ] ;
p = cx[[2]]/(cx[[1]]+cx[[2]]) ;
If[ (p==0), Print["transitionCountingMethod: no limit days"] ] ;
FindRoot[ f[estimateMean[ aTrace ], x,
    -lowerCollar, upperCollar]==p, {x,1},

    MaxIterations->100, AccuracyGoal->15 ]//N
]
generalizedMomentsMethod[ aTrace_] :=
Module [
{   data = aTrace[[1]],
    dayType = aTrace[[3]],
    mu = estimateMean[ aTrace ],
    listLength = Length[ aTrace[[1]] ],
    sum, i, j
} ,
(* loop invariant, sum contains all data up to day i;
   day i is a market day *)
sum = 0 ;
i = 1 ;
While [ (True),
   j = i+1 ;
   While [ (j<=listLength && dayType[[j]]==1), j++ ] ;
   If [ (j>listLength), Break[] ] ;
   sum += ((data[[j]]-data[[i]])-(j-i)*mu)^2 ;
   i = j ;
] ;
Sqrt[sum/listLength]
]
observedMoments[ aTrace_] :=
Module [
{  data = aTrace[[2]],
   mu, sum
},
sum = 0 ;
mu = data[[Length[data]]]/(Length[data]-1) ;
Do [
    sum += ( data[[i+1]]-data[[i]]-mu )^2 ;
    ,{ i, 1, Length[data]-1 }
] ;
{ mu, Sqrt[sum/(Length[data]-2)] }
]

(* sample runs *)
runAll[ n_, m_, sd_, lc_, uc_] :=
Module[ { theTrace },

theTrace = generateTrace[ n, m, sd, lc, uc ] ;
{ estimateMean[ theTrace],
waitingTimeMethod[ theTrace, lc, uc ],
transitionCountingMethod[ theTrace, lc, uc ],
generalizedMomentsMethod[ theTrace ],
observedMoments[ theTrace ]
}
]

References

[1] R. Chiang, K. Wei, GMM and MLE approaches for estimation of volatility and regression models when daily prices are subject to price limits, manuscript.

[2] John C. Hall, Options, Futures, and Other Derivatives, Prentice-Hall, 1997.