Algorithmic trading.

The image likely conjures groups of bespectacled nerds (we are a certain type) staring at screens of code and convoluted charts as their systems make trades at lightning speed; a foreign world for the average investor.

math-blackboard-algorithmic-trading.jpg

The image painted in Hollywood or in books like Michael Lewis’ Flash Boys is one that is unobtainable for those outside of Wall Street or the City.

And - if you’re involved in high frequency trading (HFT), complex vol or derivatives strategies - it likely is.

But there’s more to algorithmic trading than the highly complex, esoteric mathematics taught in MIT, Carnegie Mellon, NYU, and other top computational finance programs.

Before diving in too deep, let’s step back for a moment and ask the most basic question: what is algorithmic trading?

Rules Based Trading

Algorithmic trading consists of a set of quantifiable rules that guide investment decisions.

An algorithm could be just about anything. It could be as simple as a rule which states to buy one share of the SPY (S&P 500 ETF) if the high temperature in New York City is greater than 75F and sell it if it’s below 75F.

I’m willing to bet this particular rule won’t make any money (if you try it, let me know how it goes) but it does constitute an algorithm to make trading decisions.

It also meets the requirements for a complete trading system.

  • Entry rule
    • Buy if the temperature in New York City is greater than 75F.
  • Exit rule
    • Sell if the temperature in New York City is less than 75F.
  • Instrument rule
    • Trade the SPY
  • Position sizing rule
    • Buy or sell one share

This is something a computer could execute!

Of course, profitable strategies are going to be more complicated, but they don’t need to be obscenely complex a la the algo traders we discussed in the intro.

There are tried-and-true strategies that are mathematically simple which have yielded tremendous results.

Look at trend following strategies for example.

These methods are based on buying based signals like breakouts or moving averages and then sell when those signals point in the opposite direction.

Here are the results from Dunn Capital - a 41 year track record of trend following.

dunn-capital-returns.png

Algo traders like this exist all over the world and have racked up great returns for traders.

This approach isn’t overly complex either.

Here’s a “trend following 101” strategy. Can you do these calculations?

  • Entry rules:
    • Go long if the 16-day simple moving average (SMA) crosses above the 64-day SMA.
    • Go short if the 16-day SMA crosses below the 64-day SMA.
  • Exit rules:
    • Set the stop price at 1/2 of the standard deviation above the current price for a short trade or below the current price for a long trade.
    • Exit the position if the price closes above the stop on a short trade or below the stop on a long trade.
  • Instrument rule:
    • Trade the S&P 500 via the SPY ETF.
  • Position sizing rule:
    • Only put a fixed percentage of trading capital into each trade.

There’s nothing terribly complicated about this set of rules. You would just have to calculate a few averages and a standard deviation and you’re set.

Now that you have some rules, handing these rules over to a computer to trade for you has a number of advantages.

Number one on the list is removing emotional decision making from the process. If you go down an algo trading route, it doesn’t mean you won’t feel emotions when you check your account, but it does mean that you aren’t second guessing every trade.

That second guessing can lead to undue stress and bad decisions in the market.

trading-stress.png

If you have an automated system in place, then your bot is following the rules you developed and tested every day without fail.

Which takes us to our next algo trading advantage: backtesting.

Backtesting is the process of running the rules over historical data to see how your system would have performed in the past.

The idea is that these rules are based on some repeatable market patterns or behavioural biases which persist over time. If your strategy worked in the 2000s and the 2010s, then it will probably work in the 2020s.

This gives you an idea of what to expect.

A great backtest doesn’t mean that you’re going to have great results going forward - there are a number of ways you can make errors or fool yourself! Even if you avoid these errors, there is no guarantee that the pattern you saw is going to work in the future.

You know, all of those disclaimers that “past performance is not indicative of future performance?” That’s what they’re talking about. Markets do change over time (look at how poorly value investing has done over the past decade) but long persisting patterns have a better chance of continuing into the future.

Algorithmic trading can free up a lot of time.

If you hand your account over to a bot to run, you don’t have to sit and watch the markets all day every day. You don’t even need to update a spreadsheet, you can have all that handled for you!

trader-multiple-screens.png

If your bot is running smoothly, then go explore some hobbies, spend time with family and friends, or go make some family and friends for that matter.

You’ve done the hard work by setting up your trading system and looking for long-lived patterns, so let it do its thing while you live your life.

You might be saying, “All of this sounds great - I find some good rules and then let a computer trade my account for me while I go sip caipirinhas in Ipanema. But there’s one problem, I can’t code!”

“No need!” I say.

“Then how is a computer supposed to do all of this?”

“You see, that’s where our platform can help. We have built a platform to help retail traders achieve their algorithmic trading goals without code. You make a few clicks, test your strategy, then you can let it run in the market in real time. It’s really that easy.”

“Wow! That sounds great!” you say. “Where can I sign up?”

“Check us out here at raposa.trade and you can learn more and play around with it for free. On top of that, we have dozens of articles to teach you how to do it yourself. If you don’t want to use our platform, that’s fine, we still want to help you.”

“Why would you do something like that?”

“We want to help the average investor get away from behavioral biases and make better investment decisions.”

“You sound like a great group of people!”

“You’re too kind!”

I’m about 98% sure that’s how an actual conversation would go.