Quantitative Trading
Quantitative Trading

Quantitative Trading

It is as difficult to apply AI/ML to finance in 2021 as it was in 2009, but you may be surprised to hear that we have finally succeeded (Chan, 2020). (Location 322)

The key to successfully apply AI/ML to finance is to focus on metalabeling – i.e., finding the probability of profit of your own simple basic trading strategy, and not to use it to predict the market directly. (Location 325)

Despite our luck with the longevity of some of the strategies I described, most arbitrage opportunities eventually fade away—the notorious alpha decay that professionals like to lament. (Location 332)

The market is not stationary; why should your strategies be? The most agonizing decision a quantitative trader needs to make is to decide when to abandon a strategy during a prolonged drawdown, despite repeated efforts to evolve it. (Location 335)

My contention is that it is much more logical and sensible for someone to become a profitable $100,000 trader before becoming a profitable $100 million trader. (Location 394)

Many legendary quantitative hedge fund managers such as Dr. Edward Thorp of the former Princeton-Newport Partners (Poundstone, 2005) and Dr. Jim Simons of Renaissance Technologies Corp. (Lux, 2000) started their careers trading their own money. They did not begin as portfolio managers for investment banks and hedge funds before starting their own fund management business. (Location 396)

Quantitative trading, also known as algorithmic trading, is the trading of securities based strictly on the buy/sell decisions of computer algorithms. (Location 485)

This kind of training in the hard sciences is often necessary when you want to analyze or trade complex derivative instruments. But those instruments are not the focus in this book. (Location 503)

Finally, I quit the financial industry in frustration, set up a spare bedroom in my home as my trading office, and started to trade the simplest but still quantitative strategies I know. These are strategies that any smart high school student can easily research and execute. For the first time in my life, my trading strategies became profitable (one of which is described in Example 3.6), and has been the case ever since. (Location 517)

The lesson I learned? A famous quote, often attributed to Albert Einstein, sums it up: “Make everything as simple as possible. But not simpler.” (Location 520)

Compared to most small businesses (other than certain dot-coms), quantitative trading is very scalable (up to a point). It is easy to find yourselves trading millions of dollars in the comfort of your own home, as long as your strategy is consistently profitable. (Location 551)

Running most small businesses takes a lot of your time, at least initially. Quantitative trading takes relatively little of your time. By its very nature, quantitative trading is a highly automated business. (Location 565)

For example, at a well-known hedge fund I used to work for, some colleagues come into the office only once a month. The rest of the time, they just sit at home and occasionally remotely monitor their office computer servers, which are trading for them. (Location 570)

The urge to intervene manually is also strong when I have too much time on my hands. Hence, instead of just staring at your trading screen, it is actually important to engage yourself in some other, more healthful and enjoyable activities, such as going to the gym during the trading day. (Location 583)

Aside from monitoring and intervening when software and connectivity broke down (and they occasionally did), my colleagues and I routinely do absolutely nothing every day in terms of actually trading our strategies. (Location 588)

When I left the institutional money management industry to trade on my own, I worried that I would be cut off from the flow of trading ideas from my colleagues and mentors. (Location 695)

What truly make a strategy proprietary and its secrets worth protecting are the tricks and variations that you have come up with, not the plain-vanilla version. (Location 700)

The upshot here is that the more regularly you want to realize profits and generate income, the shorter your holding period should be. (Location 818)

There is a misconception aired by some investment advisers, though, that if your goal is to achieve maximum long-term capital growth, then the best strategy is a buy-and-hold one. (Location 819)

In reality, maximum long-term growth is achieved by finding a strategy with the maximum Sharpe ratio (defined in the next section), provided that you have access to sufficiently high leverage. (Location 821)

However, if the strategy is a long–short dollar-neutral strategy (i.e., the portfolio holds long and short positions with equal capital), then 10 percent is quite a good return, because then the benchmark of comparison is not the market index, but a riskless asset such as the yield of the three-month US Treasury bill (which at the time of this writing is just about zero percent). (Location 836)

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. (Location 853)

A higher Sharpe ratio will actually allow you to make more profits in the end, since it allows you to trade at a higher leverage. (Location 864)

As a rule of thumb, any strategy that has a Sharpe ratio of less than 1 is not suitable as a stand-alone strategy. For a strategy that achieves profitability almost every month, its (annualized) Sharpe ratio is typically greater than 2. For a strategy that is profitable almost every day, its Sharpe ratio is usually greater than 3. I will show you how to calculate Sharpe ratios for various strategies in Examples 3.4, 3.6, and 3.7 in the next chapter. (Location 883)

maximum). The global maximum is called the high watermark. The maximum drawdown duration is the longest it has taken for the equity curve to recover losses. (Location 894)

Hence, a backtest that relies on high and low data is less reliable than one that relies on the open and close. (Location 1418)

I would argue that the Sharpe ratio, maximum drawdown, and MAR ratio are the most important. (Location 1433)

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. (Location 1733)

An automated trading system will retrieve up-to-date market data from your brokerage or other data vendors, run a trading algorithm to generate orders, and submit those orders to your brokerage for execution. Sometimes, all these steps are fully automated and implemented as one desktop application installed on your computer. Other times, only part of this process is automated, and you would have to take some manual steps to complete the whole procedure. (Location 2429)

But now, with the easy availability of platforms such as QuantConnect and Blueshift, or various automated trading software such as MATLAB's Trading Toolbox, Python's Backtrader, or R's IBroker, you only need to be an amateur programmer (or not a programmer at all, in the case of Blueshift) to build a fully automated trading system. (Location 2437)

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.) (Location 2983)

It is a common fallacy to believe that imposing stop loss will prevent the portfolio from suffering catastrophic losses. When a catastrophic event occurs, securities prices will drop discontinuously, so the stop-loss orders to exit the positions will only be filled at prices much worse than those before the event. (Location 3035)

Furthermore, at any given time, stock prices can be both mean reverting and trending, depending on the time horizon you are interested in. (Location 3276)

Reversion of the price of a single stock from a temporary deviation from its mean price level back to its mean is called time-series mean reversion, which doesn't happen often. (Location 3281)

Mean reversion of the spread of a pair of stocks, or a portfolio of stocks, back to its mean level is called cross-sectional mean reversion, and it happens much more often. (Location 3283)

Though cross-sectional mean reversion is quite prevalent, backtesting a profitable mean-reverting strategy can be quite perilous. (Location 3291)

Momentum can also be generated by the herdlike behavior of investors: investors interpret the (possibly random and meaningless) buying or selling decisions of others as the sole justifications of their own trading decisions. (Location 3316)

Unfortunately, momentum regimes generated by these two causes (private liquidity needs and herdlike behavior) have highly unpredictable time horizons. (Location 3323)