notes-TQR

Notes for /Trades, Quotes, and Prices/

git clone git://git.shimmy1996.com/notes-TQR.git

notes.org (19219B)

    1 #+Title: Trades, Quotes and Prices: Financial Markets Under the Microscope
    2 #+Subtitle: Notes
    3 #+Author: Shimmy Xu
    4 #+LaTeX_CLASS: article
    5 #+LaTeX_HEADER: \usepackage{amsmath,amssymb,amsthm,placeins,esint,bm}
    6 #+LaTeX_HEADER: \usepackage[margin=1in]{geometry}
    7 #+INCLUDE: "~/.emacs.d/static/math_macros.sty" src latex-macros
    8 #+Options: toc:nil num:t
    9 
   10 * The Ecology of Financial Markets
   11 Walrasian auction: traders express commitment to trade at certain prices (liquidity provision) to auctioneer and auctioneer periodically clears market at intersection of supply and demand curve.
   12 
   13 Priority rules is needed when price is not continuous and Walrasian auction \(p^{*}\) cannot not be achieved, as some people won't get to trade.
   14 
   15 Continuous-time double auction: use a public limit order book (LOB) and a designated market-makers are no longer necessary.
   16 
   17 Empirically, dispersion of future price changes is much larger than the mean predicted price change, which means informed trades are either very rare and very successful or more common but with low degree of individual success due to weak information content.
   18 
   19 Price changes are close to being martingales. This implies that the real information contained in the signals used by traders or investors is extremely weak. The overall nagging feeling is that speculative traders trade too much, probably as a result of overestimating the predictive power of their signals and underestimating the costs of doing.
   20 
   21 In LOB modern markets, a simple separation of market participants could be: speculators (or liquidity takers), who typically trade at medium-to-low frequencies, and market-makers (general concept, non-privileged), who typically trade at high frequencies.
   22 
   23 Speculators faces risk from inaccurate predictions and market-maker faces adverse selection risk. market-maker adjust quotes to mitigate adverse selection costs and thus causing trades to have price impact. market-maker then need a spread twice as wide as price impact to profit.
   24 
   25 Simple model for market maker shows return variance decreases with informed trade probability, but skewness increases in magnitude.
   26 Break even spread is given by (assume uninformed flow has equal chance of being from either direction)
   27 \begin{align*}
   28   0
   29   &= \frac{1}{2}(1 - \phi)s - \phi J,\\
   30   s
   31   &= 2\phi J.
   32 \end{align*}
   33 
   34 Market operates in a regime of small revealed liquidity but large latent liquidity as market makers face adverse selection.
   35 
   36 Scarcity of revealed liquidity forces large trades to be fragmented, which means prices cannot be in equilibrium in the traditional sense: since trades are fragmented, at any instant, the traded volume is much smaller than the latent supply and demand; at larger time scales, information start to display it's long term effects, causing price to change.
   37 
   38 * The Statistics of Price Changes: An Informal Primer
   39 ** The Random Walk Model
   40 Bachelier argues future price changes are unpredictable and considers price series as Gaussian random walks. So Bachelier framework is basically a fancy name for Brownian motion model.
   41 
   42 Since price changes are typically proportional to stock price (multiplicative), geometric Brownian motion makes more sense for the price changes. On shorter time scales, however, additive price changes is closer to empirical data due to restrictions on minimum allowable price change.
   43 
   44 Bachelier's first law: price variogram under i.i.d. price increments is linear in \(\tau\):
   45 \begin{align*}
   46   \fV(\tau)
   47   &= \ev((p_{t + \tau} - p_{t})^{2})\\
   48   &= D\tau.
   49 \end{align*}
   50 Definition of volatility follows that of multiplicative model (GBM) due to its popularity:
   51 \begin{align*}
   52   D
   53   &= \sigma_{r}^{2}\mean{p}^{2}.
   54 \end{align*}
   55 
   56 For \(\tau > 0\), a trending random walk has ACF \(C_{r}(\tau) > 0\) and a mean-reverting one has \(C_{r}(\tau) < 0\). This would cause observed volatility depend on sampling frequency \(\frac{1}{\tau}\) (we can view \(\tau\) as trade time, so \(\tau = 1\) recovers the original \(\sigma_{r}\)):
   57 \begin{align*}
   58   \sigma^{2}(\tau)
   59   &= \frac{\fV(\tau)}{\tau \mean{p}^{2}}\\
   60   &= \frac{1}{\tau \mean{p}^{2}}\ev((p_{t + \tau} - p_{t})^{2})\\
   61   &= \frac{1}{\tau \mean{p}^{2}}\ev((\sum_{u = 1}^{\tau}\mean{p} r_{t + u})^{2})\\
   62   &= \frac{\sigma_{r}^{2}}{\tau}(\sum_{u = 1}^{\tau}\sum_{k = 1}^{\tau}C_{r}(k - u))\\
   63   &= \frac{\sigma_{r}^{2}}{\tau}(\tau + 2\sum_{u = 1}^{\tau}(\tau - u)C_{r}(u))\\
   64   &= \sigma_{r}^{2}(1 + 2\sum_{u = 1}^{\tau}(1 - \frac{u}{\tau})C_{r}(u))).
   65 \end{align*}
   66 Plot of \(\sigma(\tau)\) vs. \(\tau\) is a volatility signature plot. Under exponentially decaying ACF \(C_{r}(u) = \rho^{u}\), positive correlation (\(\rho\)) leads to increasing \(\sigma(\rho)\) (in \(\tau\)) and negative correlation the opposite:
   67 \begin{align*}
   68   \lim_{\tau \to \infty}\frac{\sigma^{2}(\tau)}{\sigma^{2}(1)}
   69   &= \lim_{\tau \to \infty}\frac{\sigma_{r}^{2}(1 + 2\sum_{u = 1}^{\tau}(1 - \frac{u}{\tau})C_{r}(u)))}{\sigma_{r}^{2}}\\
   70   &= 1 + 2\lim_{\tau \to \infty}\sum_{u = 1}^{\tau}(1 - \frac{u}{\tau})\rho^{u}\\
   71   &= 1 + 2\lim_{\tau \to \infty}\sum_{u = 1}^{\tau}\rho^{u} - \frac{2}{\tau}\lim_{\tau \to \infty}\sum_{u = 1}^{\tau}u\rho^{u}\\
   72   &= 1 + 2\lim_{\tau \to \infty}\frac{\rho - \rho^{\tau + 1}}{1 - \rho} - \lim_{\tau \to \infty}\frac{2}{\tau}\frac{\rho - (\tau + 1)\rho^{\tau + 1} + \tau \rho^{\tau + 2}}{(1 - \rho)^{2}}\\
   73   &= 1 + 2\frac{\rho}{1 - \rho} - 0\\
   74   &= \frac{1 + \rho}{1 - \rho}.
   75 \end{align*}
   76 
   77 To account for microstructure noise caused by Bid-ask bounce and temporarily price deviations, we can include high frequency noise term \(\eta_{t}\), which is zero mean, independent from \(r_{t}\), and has ACF
   78 \begin{align*}
   79   C_{\eta}(\tau)
   80   &= \E^{-\tau / \tau_{\eta}},
   81 \end{align*}
   82 where \(\tau_{\eta}\) is the error correction time. \(\eta_{t}\) is often called an Ornstein-Uhlenbeck process. If we include this, then our measured volatility becomes
   83 \begin{align*}
   84   \sigma_{\eta}^{2}(\tau)
   85   &= \frac{1}{\tau \mean{p}^{2}}\ev((p_{t + \tau} - p_{t})^{2})\\
   86   &= \frac{1}{\tau \mean{p}^{2}}\ev(\mean{p}^{2}(\sum_{u = 1}^{\tau} r_{t + u} + \eta_{t + \tau} - \eta_{t})^{2})\\
   87   &= \sigma^{2}(\tau) + \frac{1}{\tau}\ev((\eta_{t + \tau} - \eta_{t})^{2})\\
   88   &= \sigma^{2}(\tau) + \frac{2\sigma_{\eta}^{2}}{\tau}(1 - \E^{-\tau / \tau_{\eta}}).
   89 \end{align*}
   90 The new term is similar to mean-reversion: creates a higher short-term volatility than long-term volatility.
   91 
   92 Empirically, volatility signature plots are mostly flat with a very weak mean reversion effect (decreasing) over a wide range of time scales, from seconds to months. This similarity between short term and long term volatility, while also displayed by simple random walks, can also be extremely unintuitive given rather large fundamental uncertainty about asset prices.
   93 
   94 ** Jumps and Intermittency in Financial Markets
   95 Unconditional distribution of returns has fat tails that decay as power law. On short time scales, Student's \(t\) distribution is a reasonable approximation:
   96 \begin{align*}
   97   f_{r}(r)
   98   &\propto \frac{1}{(r^{2} + a^{2})^{\frac{1 + \mu}{2}}} \to_{\abs{r} \ll a} \frac{1}{\abs{r}^{1 + \mu}},
   99 \end{align*}
  100 where \(\mu\) is the tail parameter (close to \(3\)) and \(a\) is related to variance through \(\sigma^{2} = a^{2} / (\mu - 2)\). For fixed variance \(\sigma^{2}\), Gaussian distribution is recovered through \(\mu \to \infty\).
  101 
  102 To account for volatility clustering, we decompose \(r_{t} = \sigma_{t}\xi_{t}\), where \(\xi_{t}\) is a unit variance IID random variable accounting for directional component and \(\sigma_{t}\) is a long memory positive random variable accounting for volatility component. A common form is
  103 \begin{align*}
  104   \sigma_{t}
  105   &= \sigma_{0}\E^{\omega_{t}},
  106 \end{align*}
  107 where \(\omega_{t}\) is approximately Gaussian with variogram
  108 \begin{align*}
  109   \fV_{\omega}(t)
  110   &= \ev((\omega_{t} - \omega_{t + \tau})^{2})\\
  111   &= \chi_{0}^{2}\ln(1 + \min(\tau, T)),
  112 \end{align*}
  113 where \(\chi_{0}\) is "vol of vol" and \(T\) is cut-off time of covariance. \(T\) is typically on order of years and \(\chi_{0}^{2} \approx 0.05\). This is similar but fundamentally different from an Ornstein-Uhlenbeck log-volatility process, where characteristic time scale is fixed: this means in reality, volatility fluctuations are multi-time scale.
  114 
  115 Empirically, \(\sigma\) and \(\xi\) are not independent: positive past returns tend to decrease future volatilities while negative ones tend to increase them. This is called the leverage effect. However, past volatility doesn't help much in prediction future returns.
  116 
  117 Why do returns remain substantially non-Gaussian on time scales up to weeks or even months? Because correlation between random variables causes convergence to CLT to be much slower than the IID case (IID \(\sim t^{-1}\) and long memory \(\sim t^{-0.2}\)).
  118 
  119 Market activity also clusters. Define average market activity \(\mean{\phi}\) as
  120 \begin{align*}
  121   \ev(\dd N_{t})
  122   &= \mean{\phi} \dd t,
  123 \end{align*}
  124 where \(\dd N_{t}\) is number of price changes occurred during \([t, t + \dd t]\). The covariance \(\cov(\der[N_{t}]{t}, \der[N_{t + \tau}]{t})\) describes the temporal structure of fluctuations in market activity, which displays long memory and periodicities (daily and weekly).
  125 
  126 Prices in financial markets tend to exhibit two types of volatilities: small frequent moves and rare extreme moves. Assuming returns follow \(t\) distribution, jumps defined as events greater than \(4\sigma\) contribute \(30\%\) of the total variance, a substantial component. More generally, some kind of self-excitation seems to be present in financial markets, i.e. increased volatility could trigger more activity in the future or in a different asset.
  127 
  128 ** Why Do Prices Move?
  129 Excessive volatility puzzle: the actual volatility of prices appears to be much higher than the one warranted by fluctuations of the underlying fundamental value, contrary to efficient-market theory. In reality, the number of large price jumps is much higher than the number of relevant news arrivals and occurs at a much higher frequency. This suggests that market activity is not only driven by news.
  130 
  131 Flat volatility puzzle: financial time series show very little under-reaction (which would create trend, a likely product of reaction to news arrivals) or over-reaction (which would lead to mean-reversion, a likely product of large latent supply and demand), leading to almost flat empirical signature plots. An explanation from microstructural view point is that,  higher-frequency strategies feed on the inefficiencies generated by slower strategies (trends and correlations), finally resulting in white-noise returns on all time scales.
  132 
  133 Are prices fundamentally efficient (in the sense that they are always close to some fundamental value) or merely statistically efficient (in the sense that all predictable patterns are exploited and removed by technical trading)?
  134 
  135 Black argues prices are correct to within a factor of \(2\). If this is the case, the anchor to fundamental values can only be felt on a time scale \(T\) such that purely random fluctuations \(\sigma\sqrt{T}\) become of the order of say \(50\%\) of the fundamental price, leading to \(T = 6\) years for the stock market with a typical annual volatility of \(\sigma = 20\%\). Such long time scales suggest that the notion of a fundamental price is secondary to understanding the dynamics of prices at the scale of a few seconds to a few days. So we can mostly focus on statistical efficiency.
  136 
  137 ** Summary and Outlook
  138 A lot of quantitative volatility/activity feedback models (like ARCH-type models and Hawkes processes) attribute the excess volatility to self-referential effects, i.e. from the past price movements. This adds credence to the idea that majority of the short- to medium-term activity of financial markets is unrelated to any fundamental information or economic effects, but rather, originates from the price changes themselves. Seeing how long term volatility doesn't differ too drastically to higher frequency ones, microstructure can indeed be relevant to lower frequency price dynamics.
  139 
  140 The decoupling between price and fundamental value allows a theory of price moves that is mostly based on the endogenous, self-exciting dynamics of markets and not on long-term fundamental effects which are hard to model. One particularly important question is to understand the origin and mechanisms leading to price jumps, which seem to have a similar structure on all liquid markets.
  141 
  142 Flat volatility signature plot is a sign of statistical efficiency.
  143 
  144 * Limit Order Books
  145 LOB is constrained to a predefined price and volume grid, resolutions of which are tick size and lot size. Orders in LOB are firm commitments organized in a queue (until canceled), and quantifies the visible liquidity.
  146 
  147 Each order is described by sign, price, volume, and submission time:
  148 \begin{align*}
  149   x
  150   &\defeq (\varepsilon_{x}, p_{x}, v_{x}, t_{x}).
  151 \end{align*}
  152 
  153 Evolution of orderbook is considered to be caglad (left continuous with right limits), so are new orders
  154 \begin{align*}
  155   x
  156   &\notin \cL(t_{x}),\\
  157   x
  158   &\in \overline{\cL}(t_{x}) = \lim_{t' \downarrow t_{x}}\cL(t'),
  159 \end{align*}
  160 and all relevant measures like bid \(b(t)\), ask \(a(t)\), mid \(m(t)\), and spread \(s(t)\).
  161 
  162 Think of market orders as orders that got matched upon submission, instead of orders with out a price specified (exchanges can fill in a price such that the entire order is matched), and those that don't match immediately are limit orders. Matching depends on the algorithm used.
  163 
  164 Limit orders in LOB is similar to an option contract written to the whole market, and are subject to the same adverse selection risk that market makers face. Limit orders typically earn profits when prices mean-revert but suffer losses when prices trend and drift beyond.
  165 
  166 When picking \(p_{x}\) and \(v_{x}\), we are limited to the LOB's predefined grid, which can be expressed as the resolution parameters lot size \(v_{0}\) and tick size \(\vartheta\).
  167 
  168 The tick size indicates how much more expensive it is for a trader to gain the priority associated with choosing a better price. Smaller tick sizes can lead to more volatile top layers of books. Relative tick size \(\vartheta_{r}\) also comes into play as asset prices differ.
  169 
  170 Most LOB studies aggregates orders using same-side quote-relative coordinates, which expresses prices relative to the best quote on the same side:
  171 \begin{align*}
  172   d(p_{x}, t)
  173   &= \begin{cases}
  174     b(t) - p_{x}, &\If x \text{ is a buy limit order},\\
  175     p_{x} - b(t), &\If x \text{ is a sell limit order}.
  176   \end{cases}
  177 \end{align*}
  178 Some times opposite-side quote-relative coordinates are used to avoid unwanted artifacts to appear (say division by 0):
  179 \begin{align*}
  180   d^{\dagger}(p_{x}, t)
  181   &= d(p_{x}, t) + s(t).
  182 \end{align*}
  183 
  184 Whenever such a matching occurs, it does so at the price of the limit orders, which can lead to price improvements.
  185 
  186 Most common priority rules include price-time and pro-rata. Priority rules do affect trader behaviors. Time priority rewards trades for displaying liquidity early, while pro-rata rewards traders for displaying more liquidity.
  187 
  188 The actions of traders in an LOB can be expressed solely in terms of the submission or cancellation of orders of lot size \(v_{0}\). Common order types include stop orders, iceberg orders, IOC/FOK orders, and market-on-close (MOC) orders. A MOC order is a market order that is submitted to execute as close to the closing price as possible, mostly to take advantage of the larger liquidity at close.
  189 
  190 For exchanges that are closed overnight, beginning and end of trading day may see so much volume that LOB trading would be prone to instabilities, so exchanges prefer to use auctions at those times. Auction clearing price is visible throughout, and traders can use this information to adjust their orders.
  191 
  192 * Empirical Properties of Limit Order Books
  193 Large tick vs. small tick: if tick size is comparable to spread, then it's large tick; if tick size is way smaller than spread, then it's small tick.
  194 
  195 This chapter is basically stylized facts for order books.
  196 
  197 - Summary Statistics
  198   1. Daily turnover around 0.5% of market cap. This has doubled from 1995 to 2015.
  199   2. Total volume in LOB within 1% of mid price (around half day's vol range), is 1-3% of daily traded volume, a rather small percentage.
  200   3. Top level activity are more abundant in large tick stocks and is on a sub-second time scale. This reflect importance of queue position for large tick stocks.
  201   4. Number of trade-throughs is a few percent for small tick name, and a few per thousand for large-tick stocks.
  202 - Intra-day Patterns. These apply to between 10:30-15:00 local time when most quantities have a flat average profile, away from open/close auctions.
  203   1. Market activity exhibits a U-shape profile, much more violent at beginning and end of day. This could be caused by overnight news, trader rushing at last minute, or their execution patterns.
  204   2. Average spread narrows through out the day, and small tick stocks show larger scale changes. This suggests liquidity at open is a lot more expansive, possibly due to stronger adverse selection caused by overnight news.
  205 - Tail of spread distribution is roughly exponential. Large/small tick stocks differ in the peak of distribution, and spread is generally narrower right before transactions.
  206 - Arrival rate distribution looks different for large/small tick stocks, but both with tail decay slower than power law. Large ticks' distribution decays monotonously with most orders at best quote, while that for small ticks has a secondary peak at 2x spread, with many levels in between empty, meaning that spread, instead of tick sizes is determining the distribution. Cancellation rates is to first order, proportional to arrival rate.
  207 - Order size distribution's upper tail roughly follows power law with exponent \(-\frac{5}{2}\). Generally order sizes are not clustered, but distributed over a broad range.
  208 - Volume at best quotes has similar distribution to order sizes. For small tick stocks, when trades happen, volume at best quote is higher (more liquidity); for large tick stocks, when trades happen, volume in queue is lower (meaning price may move soon).
  209 - Volume (book depth) profile is similar to arrival rate: increases sharply to typical spread before decaying very slowly beyond that. Volume can peak at round prices as they are favored over others. Empty levels is also a lot more common in small tick stocks.
  210 - Tick size effects.
  211   1. When relative tick \(\vartheta_{r}\) is small, spread is roughly proportional to price (around one thousandth of price).
  212   2. Volume at best quote is higher for large tick stocks. Note that small tick stock are also likely high-priced, the same sized lot is a lot more expansive.
  213   3. Orders in small tick stocks consume more of the outstanding volume percentage wise (>50%), but the available volume is also frequently lower.
  214 
  215 Relative tick size is what seems to differentiate different stock's behaviors the most.
  216 
  217 Most market metrics are symmetric between buys and sells when averaged over a suitably long horizon.
  218 
  219 All the size distributions (limit/market orders and best quote volumes) have heavy tails.