_____________
1 11X. Gabaix, R.S.J. Koijen, In Search of the Origins of Financial Fluctuations: The Inelastic Markets Hypothesis, Swiss Finance Institute Research Paper No. 20-91, Available at SSRN: https://ssrn.com/abstract=3686935, 2021.
2 12J.-P. Bouchaud, J.D. Farmer, F. Lillo, How markets slowly digest changes in supply and demand, arXiv:0809.0822 [q-fin.TR], 2008.
Computation is a primary tool in most parts of the quantitative trading process and in machine learning. Several aspects of computing, including coding style, efficiency, bugs, and environmental issues are discussed throughout the book. A few important machine learning concepts, such as bias-variance tradeoff ( Secs. 2.3.5and 2.4.12) and the curse of dimensionality (Sec. 2.4.10), are supported by small self-contained pieces of Python code generating meaningful plots. The reader is encouraged to experiment along these lines. It is often easier to do productive experimental mathematics than real math.
Some of the material covering statistics, machine learning, and optimization necessarily involves a fair amount of math and relies on academic and applied research in various, often disjoint, fields. Our exposition does not attempt to be mathematically rigorous and mostly settles for a “physicist's level of rigor” while trying to build a qualitative understanding of what's going on. Accordingly, the book is designed to be reasonably accessible and informative to a less technical reader who can skip over the more scary math and focus on the plain English around it. For example, the fairly technical method of boosting in ML (Sec. 2.4.14) is explained as follows: The idea of boosting is twofold: learning on someone else's errors and voting by majority .
The field of quantitative portfolio management is too broad for a single paper or book to cover. Important topics either omitted here or just mentioned in passing include market microstructure theory, algorithmic execution, big data management, and non-equity asset classes. Several books cover these and related topics. 13 , 14 , 15 , 16 , 17 While citing multiple research papers in various fields, the author could not possibly do justice to all relevant or original multidisciplinary contributions. The footnote references include work that seemed useful, stimulating, or just fascinating when developing (or explaining) forecasting and optimization ideas for quantitative portfolio management. Among the many destinations where Google search brings us, the arXiv, 18 is an impressive open source of reasonably high signal-to-noise ratio 19 publications.
A note about footnotes. Citing sources in footnotes seems more user-friendly than at the end of chapters. Footnotes are also used for various reflections or mini stories that could be either meaningful or entertaining but often tangential to the main material.
Finally, in the spirit of the quant problem-solving sportsmanship, and for the reader's entertainment, a number of actual interview questions asked at various quant job interviews are inserted in different sections of the book and indexed at the end, along with the main index, quotes, and the stories.
_____________
1 13R.C. Grinold, R.N. Kahn, Active Portfolio Management: A Quantitative Approach for Producing Superior Returns and Controlling Risk. McGraw-Hill, New York, 2000.
2 14R.K. Narang, Inside the Black Box: A Simple Guide to Quantitative and High Frequency Trading, 2nd Edition, Wiley, 2013.
3 15J.-P. Bouchaud, J. Bonart, J. Donier, M. Gould, Trades, Quotes and Prices. Financial Markets Under the Microscope, Cambridge University Press, 2018.
4 16Z. Kakushadze, J.A. Serur, 151 Trading Strategies, Available at SSRN: https://ssrn.com/abstract=3247865, 2018.
5 17 Finding Alphas: A Quantitative Approach to Building Trading Strategies, 2nd Edition, Edited by I. Tulchinsky, Wiley, New York, 2019.
6 18 https://arxiv.org.
7 19A. Jackson, From Preprints to E-prints: The Rise of Electronic Preprint Servers in Mathematics, Notices of the AMS, 49, 2002.
Perhaps the most useful predictor of future asset prices are past prices, trading volumes, and related exchange-originated data commonly referred to as technical , or price-volume data. Market data comes from quotes and trades. The most comprehensive view of the equity market includes exchange-specific limit order book by issue, which is built from limit orders forming buy and sell queues at different price depths, market orders, and their crossing (trades) per exchange rules such as price/time priority. In addition to the full depth of book tick stream, there are simplified datafeeds such as Level 2 (low-depth order book levels and trades), Level 1 (best bid and offer and trades), minute bars (cumulative quote and trade activity per discrete time intervals), and daily summary data (open, close, high, low, volume, etc).
Depth of book data is primarily used by high frequency trading (HFT) strategies and execution algos provided by brokers and other firms, although one can argue that a suitable analysis of the order book could detect the presence of a big directional trader affecting a longer-term price movement. Most non-HFT quant traders utilize either daily or bar data—market data recorded with certain granularity such as every 5 minutes—for research and real-time data for production execution. 1
Major financial information companies such as Thompson Reuters and Bloomberg offer market data at different levels of granularity, both historical and in real time. A quant strategy needs the history for research and simulation ( Chapter 7) and real time for production trading. Historical simulation is never exactly the same as production trading but can, and must, be reasonably close to the modeled reality, lest research code have a lookahead bug, that is, violate the causality principle by using “future-in-the-past” data. As discussed in Chapter 2, highly competitive and efficient financial markets keep the predictability of future price movements at a very low level. As a result even a subtle lookahead ( Sec. 2.1.1) in a quant trading simulator can be picked up by a sensitive machine learning (ML) algorithm to generate a spurious forecast looking great in simulation but never working in production.
1.2 Corporate actions and adjustment factor
Compute the products:
1
2
From a quant interview
Equities as an asset class are subject to occasional corporate actions (“cax”) including dividends, splits, spin-offs, mergers, capital restructuring, and multi-way cax. Maintaining an accurate historical cax database is a challenge in itself. Failure to do so to a good approximation results in wrong asset returns and real-time performance not matching simulation (Sec. 7.1). For alpha research purposes it is generally sufficient to approximate each cax with two numbers, dividend
and split
. 2 The dividend can be an actual dividend paid by the issue in the universe currency such as US dollar (USD) or the current total value of any foreign currency dividend or stock spin-off.
_____________
1 1Sometimes even real-time trading is done on bar data. The author has observed peculiar periodic pnl fluctuations of his medium-frequency US equity portfolio. The regular 30-minute price spikes indicated a repetitive portfolio rebalancing by a significant market participant whose trades were correlated with the author's positions.
Читать дальше