As for the mean and variance estimator, the initialization of the recursion can be done using a burn-in
period. Finally, after time t, the best
estimate of β is β t = M – 1 t Vt. In the literature this method is also called recursive least squares with exponential
Online one-pass algorithms are instrumental in HFT, where they receive
large amounts of data every microsecond and must be able to act extremely
fast on the received data. This article
has addressed three problems that
HFT algorithms face: the estimation
of a running mean of liquidity, which
can be useful in determining the size
of an order that is likely to execute
successfully on a particular electronic
exchange; a running volatility estimation, which can help quantify the
short-term risk of a position; and a
running linear regression, which can
be used in trading pairs of related assets. Online one-pass algorithms can
help solve each of these problems.
1. albers, s. online algorithms: a survey. Mathematical
Programming 97, 1–2 (2003), 3–26.
2. astrom, a. and Wittenmark, b. Adaptive Control,
second edition. addison Wesley, 1994.
3. brown, r.g. Exponential Smoothing for Predicting
Demand. arthur D. little Inc., 1956, p. 15
4. Clark, C. Improving speed and transparency of
market data. Exchanges, 2011; https://exchanges.
Jacob Loveless is the Ceo of lucera and former head
of high Frequency trading for Cantor Fitzgerald. he has
worked for hFt groups and exchanges in nearly every
electronic asset. Previously, he was a special contractor
for the u.s. Department of Defense and Cto and a
founder of Data scientific.
Sasha Stoikov is a senior research associate at Cornell
Financial engineering manhattan (CFem) and a former VP
in the hFt group at Cantor Fitzgerald. he has worked as a
consultant at the galleon group and morgan stanley and
was an instructor at the Courant Institute of nyu and at
Columbia’s Ieor department.
Rolf Waeber is a Quantitative research associate at
lucera and previously served as a Quantitative researcher
at Cantor Fitzgerald's hFt group. he participated in
studies on liquidity risk adjustments within the basel II/
III regulation frameworks at the Deutsche bundesbank.
© 2013 aCm 0001-0782/13/10 $15.00
β is chosen such that it minimizes the
sum of squared residuals S tj=0(Yj – (β0 +
2. The solution to this minimization problem is β = (XTX)– 1 XTY.
As in mean and variance estimations,
more recent data points should be more
important for the estimation of the parameter β. Also a one-pass algorithm of
β is required for fast computation.
Next let’s consider a recursive method that updates β sequentially and
j = 0
α (t–j )(Yj – (β0 + β1Xj))
Again, the parameter α needs to be
in the range (0, 1) and is chosen by the
user. The parameters β0 and β1 of the
weighted least squares estimation
can be computed with an efficient
online one-pass algorithm. At each
step of the algorithm a 2 × 2 – matrix
Mt and a 2 × 1 – vector Vt need to be
saved in memory and updated with a
new data point according to the following recursion:
Mt = αMt– 1 + XT t Xt ,
Vt = αVt– 1 + XT t Yt ,
figure 8. scatter plot of factor and response for alpha of 0.985.
0 0.002 0.004 0.006 0.008 0.01 0.012
Online Volatility Estimation with alpha = 0.985
figure 9. scatter plot of factor and response for alpha of 0.996.
−0.04 −0.03 −0.02 −0.01 0 0.01 0.02 0.03 0.04
Online Mispricing with alpha = 0.996