Skip to content

Instantly share code, notes, and snippets.

@tgraham777
Last active August 16, 2018 22:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tgraham777/da260f029ec75808d4c4 to your computer and use it in GitHub Desktop.
Save tgraham777/da260f029ec75808d4c4 to your computer and use it in GitHub Desktop.
Trading Algorithms for the Masses - Outline

Trading Algorithms for the Masses

What is quantitative trading?

  • Quantitative trading is an extremely sophisticated area of finance
  • It has four main components:
    1. Strategy Identification - Finding a strategy, exploiting an edge and deciding on trading frequency
    2. Strategy Backtesting - Obtaining data, analysing strategy performance and removing biases
    3. Execution System - Linking to a brokerage, automating the trading and minimizing transaction costs
    4. Risk Management - Optimal capital allocation, "bet size" criterion and trading psychology

Quantitative trading is hard

  • When it comes down to it, a good trading algorithm generally has to be written in C/C++ (it's the only thing fast enough)
  • How fast do these guys trade? In the 2000s one of the top quant funds was single-handedly responsible for 1/6 of all trading on the Nasdaq
  • Quantitative trading relies heavily on what is known as financial signal processing, the history of which can be traced back to Isaac Newton
  • The result? Newton lost the equivalent of $3.7 million investing in the South Sea Company

The story of Long Term Capital Management

  • The first massive quant fund, which many thought to be infallible, was Long Term Capital Management (LTCM)
  • LTCM's algorithm, which was written by two Nobel-prize-winning economists and a Japanese rocket scientist, is still used today to value derivatives (forwards, futures, options, etc.)
  • LTCM returned 21% (after fees) in its first year, 43% in the second year and 41% in the third year, the equivalent of turing $1 million into $2.4 million after fees
  • However, even the LTCM model finally failed because it had not accounted for the Asian Currency Crisis and Russian debt default in the late 90s
  • Asian currency crisis hit in 1997, bringing huge losses, but they were confident the algorithm could work in all situations and so essentially doubled-down on all their bets
  • In 1998 when Russia defaulted on its debt, the fund lost $4.6 billion over a single four-month period (GRAPH - Wiki)
  • Ultimately the fund collapsed and had to be bailed out by an international consortium of companies, though it still owed over $100 billion to various creditors when it was dissolved

So why use quantitative trading at all?

  • One of the posterchildren for quant trading today is Renaissance Technologies
  • They have been using "black box" algorithms to invest since 1988
  • Their flagship fund (closed to new investors in 1993) returned an average of 35% per year from 1988-1999, the equivalent of turing $1 million into $36.6 million after fees
  • Fun fact: Renaissance is currently hiring developers!

The good news - quantitative trading is possible for anyone

  • In 2013 Harvard grad Christopher Ivey acquired $4.5 million in funding and launched a web-based platform called Rizm
  • Rizm lets individual investors with no coding skills build computer programs that select and trade stocks automatically, similar to the trading programs used by quant funds and high-frequency trading firms
  • For $99 per month investors get quick cloud access to sophisticated algorithm-building tools and the capability to back-test strategies
  • You say what you want to try, have it automatically back-tested to see how it would've worked in the past, and (hopefully) start making money!
  • LINK: Renaissance Tech page, Rizm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment