Quantitative Trading: How to Build Your Own Algorithmic Trading Business by Ernest Chan - ISBN 9780470284889 - Wiley 2008
Motivation
Discovering in Ghost in the Shell the idea of a fully automated trading system, letting it rest for few years then starting to organize links related to this idea (cf FinancialTools), offering a link to Sylvain then deciding to read it together.
Pre-reading model
Draw a schema (using PmGraphViz or another solution) of the situation of the area in the studied domain before having read the book.
Reading
- Preface
- "can an independent, retail trader benefit from these algorithms? Can an individual with limited resources and computing power backtest and execute their strategies over thousands of stocks, and come to challenge the powerful industry participants in their own game? I will show you how this can, in fact, be achieved. " (pxi)
- "it is much more logical and sensible for someone to become a profitable $100,000 trader before becoming a profitable $100 million trader. " (pxi-xii)
- "this is a possible route to riches as well as intellectual accomplishment, and for someone with an entrepreneurial bent, a preferred route. " (pxii)
- "This book is definitely not designed as an encyclopedia of quantitative trading techniques or terminologies. It will not even be about specific profitable strategies" (pxii)
- 1 The Whats, Whos, and Whys of Quantitative Trading
- "Quantitative trading, also known as algorithmic trading, is the trading of securities based strictly on the buy/sell decisions of computer algorithms. " (p1)
- "quantitative trading includes more than just technical analysis. Many quantitative trading systems incorporate fundamental data in their inputs: numbers such as revenue, cash flow, debt-toequity ratio, and others. " (p1)
- "As long as you can convert information into bits and bytes that the computer can understand, it can be regarded as part of quantitative trading. " (p2)
- "Statistical arbitrage deals with the simplest financial instruments: stocks, futures, and sometimes currencies. " (p2)
- "It is important not to have a need for immediate profits to sustain your daily living, as strategies have intrinsic rates of returns that cannot be hurried (see Chapter 6)." (p4)
- "research and development of new strategies is the creative part of any business, and it can be done whenever you want to. " (p7)
- "in the financial marketplace base their purchase decisions on nothing but the price" (p7)
- "there is absolutely no marketing to do in a quantitative trading business. " (p7)
- 2 Fishing for Ideas
- "Increasingly, however, I have found that many strategies described by academics are either
- too complicated,
- out of date (perhaps the once-profitable strategies have already lost their power due to competition), or
- require expensive data to backtest (such as historical fundamental data). " (p9)
- Table 2.1 Sources of Trading Ideas (p10)
- "many traders' forums or blogs may suggest simpler strategies that are equally profitable. " (p10)
- "the trick is that you can often modify the basic strategy and make it profitable. " (p11)
- "one of the best ways to gather and share trading ideas is to start your own trading blog - for every trading <<secret>> that you divulge to the world, you will be rewarded with multiple ones from your readers. " (p11)
- "what you thought of as secrets are more often than not well-known ideas to many others! " (p11)
- "No, the difficulty is not the lack of ideas. The difficulty is to develop a taste for which strategy is suitable for your personal circumstances and goals, and which ones look viable even before you devote the time to diligently backtest them. " (p11)
- "In general, I would not recommend quantitative trading for an account with less than $50,000 capital. " (p13)
- "With a low-capital account, we need to find strategies that can utilize the maximum leverage available. " (p13)
- "a hedged position is less risky than an unhedged position, the returns generated are correspondingly smaller and may not meet your personal requirements. " (p14)
- Table 2.2 How Capital Availability Affects Your Many Choices (p15)
- "as long as you are aware of the limitations of your tools and data, you can cut many corners and still succeed. " (p16)
- "the more regularly you want to realize profits and generate income, the shorter your holding period should be. " (p17)
- "Information ratio is the measure to use when you want to assess a long-only strategy. " (p18)
- "It is defined as
- Information Ratio = Average of Excess Returns / Standard Deviation of Excess Returns
- where
- Excess Returns = Portfolio Returns - Benchmark Returns" (p18)
- "The Sharpe ratio is actually a special case of the information ratio, suitable when we have a dollar-neutral strategy, so that the benchmark to use is always the risk-free rate. " (p19)
- "As a rule of thumb, any strategy that has a Sharpe ratio of less than 1 is not suitable as a stand-alone strategy. " (p21)
- "A historical database of stock prices that does not include stocks that have disappeared due to bankruptcies, delistings, mergers, or acquisitions suffer from the so-called survivorship bias, because only <<survivors>> of those often unpleasant events remain in the database. " (p24)
- "The reason that survivorship bias mainly inflates the performance of an earlier period is that the further back we go in our backtest, the more missing stocks we will." (p24-25)
- "[the more statistically robust the backtest should be] is true only when the financial time series is generated by a stationary process. Unfortunately, financial time series is famously nonstationary, due to all of the reasons given earlier. " (p25)
- "in general, the more rules the strategy has, and the more parameters the model has, the more likely it is going to suffer data-snooping bias. " (p26)
- section adapted from Artificial Intelligence and Stock Picking (p26-27)
- "niches are [...] likely to be [still] profitable because they have not yet been completely arbitraged away by the gigantic hedge funds. " (p27)
- summary of the chapter (p28-29)
- 3 Backtesting
- "this chapter [describes] the common platforms that can be used for backtesting, various sources of historical data useful for backtesting, a minimal set of standard performance measures that a backtest should provide, common pitfalls to avoid, and simple refinements and improvements to strategies. " (p31)
- Excel, WYSIWYG but limited in scope and to generate orders (p32)
- MATLAB, not free but easy to backtest thanks to principal component analysis and other tools (p32)
- scrapping example on Yahoo! Finance (p34)
- TradeStation
- "advantages of this setup are:
- Most of the historical data necessary for backtesting is readily available, whereas you have to download the data from somewhere else if you use Excel or MATLAB.
- Once you have backtested the program, you can immediately generate orders using the same program and transmit them to the brokerage. " (p35)
- High-End Backtesting Platform (p36)
- "databases that are free from survivorship bias are quite expensive [...] to overcome this problem [...]
- start collecting point-in-time data yourself for the benefit of your future backtest. If you save the prices each day of all the stocks in your universe to a file, then you will have a point-in-time or survivorship-bias-free database to use in the future.
- Another way to lessen the impact of survivorship bias is to backtest your strategies on more recent data so that the results are not distorted by too many missing stocks. " (p40)
- "For almost all daily stock data, the high and low prices are far noisier than the open and close prices. " (p42)
- "the discrepancies of the open and close prices usually have less impact on backtest performance than the errors in the high and low prices, since the latter almost always inflate your backtest returns. " (p42)
- "I would argue that the Sharpe ratio and drawdowns are the two most important [performance measures]. " (p43)
- "Usually, an erroneous backtest would produce a historical performance that is better than what we would have obtained in actual trading. " (p50)
- Look-Ahead Bias
- "refers to the situation when you are using information that was available only at a time ahead of the instant the trade was made. " (p51)
- "How do we avoid look-ahead bias? Use lagged historical data for calculating signals at every opportunity. " (p51)
- truncate your data and compare the result, if it is not identical to non-truncated historical data, you have a look-ahead bias
- Data-Snooping Bias
- "the danger that backtest performance is inflated relative to the future performance of the strategy because we have overoptimized the parameters of the model based on transient noise in the historical data. " (p52)
- "The less independent data you have, the fewer adjustable parameters you should employ in your trading model. " (p52)
- "As a rule of thumb, I would not employ more than five parameters, including quantities such as entry and exit thresholds, holding period, or the lookback period, in computing moving averages. " (p53)
- "The most basic safeguard against data-snooping bias is to ensure that you have a sufficient amount of backtest data relative to the number of free parameters you want to optimize. " (p53)
- "Out-of-Sample Testing Divide your historical data into two parts" (p53)
- seems similar to machine learning techniques to avoid overfitting
- "The ultimate out-of-sample testing is familiar to many traders, and it is called paper trading . Running the model on actual unseen data is the most reliable way to test it (short of actually trading it). " (p55)
- "No backtest performance is realistic without incorporating transaction costs. " (p60)
- Strategy Refinement
- "The guiding principle is the same as that of parameter optimization: Whatever changes you make to the strategy to improve its performance on the training set, it must also improve the performance on the test set. " (p65)
- "it is preferable that the refinement has some basis in fundamental economics or a well-studied market phenomenon, rather than some arbitrary rule based on trial and error. Otherwise, data-snooping bias looms. " (p66)
- summary of the chapter (p66-67)
- 4 Setting Up Your Business
- "this chapter, we will be taking a break from the technical aspect of trading to focus on the business side of it." (p69)
- "The main choice you have to make is whether to open a retail brokerage account or to join a proprietary trading firm.
- The next step is to determine what features of the brokerage or trading firm are important to you.
- Finally, you have to decide what kind of physical trading infrastructure you need in order to execute your quantitative strategy." (p69)
- since 2007, the National Association Of Securities Dealers (NASD) merged with the New York Stock Exchange's regulation committee to form the Financial Industry Regulatory Authority (FINRA).
- Wikipedia:Dark pools of liquidity
- "too much real-time information may not necessarily lead to more profitable trades." (p76)
- "any delay in the transmission of your order to your brokerage results in slippage, which is quite real in terms of lost profits. " (p76)
- "The advantage of this setup [,remote servers] is not only that your trading will almost never have downtime, but that the Internet connection at the hosting company is likely to be faster than what you have at home or in your office. " (p77)
- "it is advantageous to locate your servers near an Internet backbone as close as possible to the exchange on which your trades will be executed. " (p77)
- summary of the chapter (p77-78)
- 5 Execution Systems
- " This chapter is about building such an automated trading system and ways to minimize trading costs and divergence with your expected performance based on your backtests." (p79)
- "A basket trader is an application that allows you to upload multiple orders for multiple symbols and submit them to the brokerage in one keystroke. " (p82)
- "Spread trader is an application with which you can specify the symbols of multiple pairs of stocks or other securities, and the conditions when orders for each of these pairs should be entered. " (p82)
- "To cut down on commissions, you can refrain from trading lowprice stocks. " (p87)
- "In order to minimize market impact cost, you should limit the size (number of shares) of your orders based on the liquidity of the stock. " (p87)
- "Another way to reduce market impact is to scale the size of your orders based on the market capitalization of a stock. " (p87)
- "Paper trading has a number of benefits; chief among them is that this is practically the only way to see if your ATS software has bugs without losing a lot of real money. " (p89)
- "Backtesting also won’t reveal the operational difficulties, such as how fast you can download all the needed data before the market opens each day and how you can optimize your operational procedures in actual execution. " (p89)
- applying debugging techniques not just to the ATS but also to its results over time
- "Regime shifts refer to the situation when the financial market structure or the macroeconomic environment undergoes a drastic change so much so that trading strategies that were profitable before may not be profitable now." (p91)
- "There are two noteworthy regime shifts in recent years related to market (or regulatory) structure that may affect certain strategies.
- The first one is the decimalization of stock prices. [...]
- The other regime shift is relevant if your strategy shorts stocks. [plus-tick rule]" (p91)
- summary of the chapter (p92 to 94)
- 6 Money and Risk Management
- "The optimal allocation of capital and the optimal leverage to use so as to strike the right balance between risk management and maximum growth is the focus of this chapter, and the central tool we use is called the Kelly formula. " (p95)
- "Every optimization problem begins with an objective. Our objective here is to maximize our long-term wealth - an objective that I believe is not controversial for the individual investor. " (p96)
- "Maximizing long-term wealth is equivalent to maximizing the long-term compounded growth rate g of your portfolio. " (p96)
- "Risk management always dictates that you should reduce your position size whenever there is a loss, even when it means realizing those losses. (The other face of the coin is that optimal leverage dictates that you should increase your position size when your strategy generates profits.)" (p104)
- reference to Nassim Taleb's "black swan" (p105)
- "The truly scary scenario in risk management is the one that has not occurred in history before. " (p106)
- behavioral bias
- endowment effect, status quo bias, or loss aversion (p106)
- "Despair occurs when a trading model is in a major, prolonged drawdown. " (p110)
- "Greed is the more usual emotion when the model is having a good run and is generating a lot of profits. " (p110)
- "We must remember that we are operating in a probabilistic regime: No system can avoid all the market vagaries that can result in losses. " (p109)
- "As with most human endeavors, the way to do this is to start with a small portfolio and gradually gain psychological preparedness, discipline, and confidence in your models. " (p111)
- summary of the chapter (p111-112)
- "I have found that in order to proceed slowly and cautiously, it is helpful to have other sources of income or other businesses to help sustain yourself either financially or emotionally (to avoid the boredom associated with slow progress). " (p112)
- 7 Special Topics in Quantitative Trading
- doubts of AI, ML and other complex techniques (p116)
- "Constructing a trading strategy is essentially a matter of determining if the prices under certain conditions and for a certain time horizon will be mean reverting or trending, and what the initial reference price should be at any given time. " (p116)
- "what about the much-feared datasnooping bias that seems to creep into every strategy that is based on machine learning or artificial intelligence? " (p125)
- Matlab Econometrics Toolbox by James P. LeSage]]
- Wikipedia:Arbitrage pricing theory
- sumarry of chapter (p154 to 156)
- 8 Conclusion
- "The key, it turns out, is capacity, a concept I introduced at the end of Chapter 2. (To recap: Capacity is the amount of equity a strategy can generate good returns on.)" (p158)
- "There are many simple and profitable strategies that can work at the low capacity end that would be totally unsuitable to hedge funds. This is the niche for independent traders like us. " (p158)
- "Another reason that independent traders can often succeed when large funds fail is the myriad constraints imposed by management in an institutional setting. " (p159)
- "experience tells us that strategies do lose their potency over time as more traders catch on to them. It takes ongoing research to supply you with new strategies. " (p162)
Tables and figures
Sources of Trading Ideas (p10)
Academic
Financial web sites and blogs
Trader forums
Newspaper and magazines
See also
- my FinancialTools page
- Ernest Chang's blog Quantitative Trading Quantitative investment and trading ideas, research, and analysis
- FOSS Trading Algorithmic Trading with Free Open Source Software
- Automated Trading 2009: Backtesting and Optimization October 2009
- The Misbehavior of Markets : A Fractal View of Financial Turbulence by Richard L. Hudson, Benoit B. Mandelbrot, Basic Books first edition 2004
- trading-shim Frequently Asked Questions
- Automated Trading System (ATS)
- Communities
- Yale Financial Markets (ECON 252)
- Street Smarts CNBC.com 2007
- Hedge funds using computer models to invest are taking a hit of late, with Ernest Chan, Quantitative trading consultant and CNBC's Dylan Ratigan
- E. P. Chan & Associates Research page, including MATLAB source code
- Advances in Machine Learning for Computational Finance (AMLCF '09, London 2009
- http://en.wikipedia.org/wiki/Computational_finance
- Journal of Computational Finance including its latest issue
- Statistical Arbitrage: Algorithmic Trading Insights and Techniques by Andrew Pole, Wiley 2007
- Automated Trader Algorithmic Trading Magazine
- kaChing world's first marketplace to find great investors to emulate.
- Covestor Follow proven investors on Covestor
- Quants: The Alchemists of Wall Street Marije Meerman, VPRO Backlight 2010
- A.I. Stock Market Forum
- USA Today: “The Machines Took Over (Wall Street)”, Cyberpunk Review May 2010
- academic research
- [[#DesMathematiciensBoulevardDesItaliens]Des mathématiciens boulevard des Italiens by Emmanuel Ferrand, Images des mathématiques May 2010
- publish your results?
- yes to influence other actors in a predicable way
- no to keep a competitive advantage
- applied research
- implemented and used internally first and foremost
- see also Seedea:Research/StrategicalEpistemology
- Computer-trading worries grow as NYSE builds new datacenter by Jon Stokes, ars technica 2009
- Marketcetera Open Source Automated Trading Platform
Tools mentioned
Overall remarks and questions
Synthesis
So in the end, it was about X and was based on Y.
Critics
Point A, B and C are debatable because of e, f and j.
Vocabulary
(:new_vocabulary_start:)
new_word
(:new_vocabulary_end:)
Post-reading model
Draw a schema (using PmGraphViz or another solution) of the situation of the area in the studied domain after having read the book. Link it to the pre-reading model and align the two to help easy comparison.
Categories
Back to the Menu
Other read books linking to the QuantitativeTrading page :
Back to the Menu