Lessons Learned from Algorithmic Trading

What all overconfident programmers should know before attempting algorithmic trading.

Here are a few lessons that I’ve learned in my algorithmic trading journey. Many have been learned from reading literature and talking with professional algorithmic traders, but a few I’ve also learned the hard way. Learn from these so you don’t have to learn all of them the hard way.

  • Academic paper strategies are usually heavily overfit
  • Make sure to have separate models for separate types of assets

    • Stocks are not the same as cryptocurrencies. Both of these behave differently from options
  • Just becase you’re using machine learning, doesn’t mean beating the market will be easy
  • Don’t overestimate the usefullness of reinforcement learning
  • Don’t underestimate the value of libraries like Scikit-learn
  • If you’re using a machine learning model, try to predict buy/sell signals instead of predicting exact prices with regression
  • Strategy Risk is not the same as Portfolio Risk
  • You can’t completely eliminate risk. Besides, to eliminate risk would also eliminate chance of a profit as well.
  • Quant Hedge funds (and by extendion hedge funds in general) don’t really hedge against market risk. Mainly they hedge against certain kinds of risk instead.
  • Most hedge funds are overrated.

    • Many make most of their money from 2 percent cut management fees, on average most of their performance is roughly equal to that of the market itself. Finding a fund manager that can actually pick stocks that beat the market is about as easy as picking the next Amazon or Apple yourself.
  • Don’t try to compete with high-frequency traders

    • High frequency trading algorithms can not only make and complete orders in microseconds, they can also just as quickly spoof orders to fool other algorithmic trading bots. Don’t try to compete on these time-scales.
    • While this is technically illegal, it’s something of an open secret that services like Robinhood make most of their money by acting as “dark pools” for high-frequency traders. It’s like they say, if you’re not paying for it you’re not the customer you’re the product.
  • Concurrency and multithreading will be your best friends
  • Don’t go it alone if you can avoid it

    • All of the above is a lot for one person to handle. You’re probably better off relying on a team (if you can’t get many other people to do the work for you cough Quantopian cough numerai)
  • Be extremely mindful of capital gains taxes
  • There are entire classes of accountants and lawyers that specialize in getting around capital gains taxes

    • Example: Incorporate your hedge fund in the US. Create an insurance company in a place like Bermuda. If you make 1 million in profit, get the insurance company to charge you 1 million in insurance premiums. In the US this shows up as a business expense. On paper the hedge fund has made no profit, and thus no taxes are owed. The insurance company has this new money, which it can then invest. Where should they invest it? It just so happens you have a hedge fund in the United States. Obviously this is an oversimplification, and a lot more lawyers would be involved in real life.
  • For all its complexities, algorithmic trading is still far superior to human trading on shorter time-scales. You should not try to compete with the algorithms with day-trading. Maybe humans have the advantage when it comes to longer-term value-investing, but programatic strategies can trade circles around even the best human.

Hopefully now you should have the tools for avoiding disaster in algorithmic trading (or at least convincing an interviewer at a quant hedge fund that you’re not completely new to this space).

Cited as:

    title = "Lessons Learned from Algorithmic Trading",
    author = "McAteer, Matthew",
    journal = "matthewmcateer.me",
    year = "2017",
    url = "https://matthewmcateer.me/blog/lessons-learned-from-algo-trading/"

If you notice mistakes and errors in this post, don’t hesitate to contact me at [contact at matthewmcateer dot me] and I would be very happy to correct them right away!

See you in the next post 😄

I write about AI, Biotech, and a bunch of other topics. Subscribe to get new posts by email!

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

At least this isn't a full-screen popup

That'd be more annoying. Anyways, subscribe to my newsletter to get new posts by email! I write about AI, Biotech, and a bunch of other topics.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.