How to Design an Algo Trading Strategy in 3 Easy Steps | Algorithmic Trading in India Explained.

How to Design an Algo Trading Strategy in 3 Easy Steps | Algorithmic Trading in India Explained.

Share it with your friends

Who is the World’s most successful investor since the last 10-20 years? Most people would say that it’s Warren Buffett, some might say that it’s Ray Dalio or George Soros. But most people would not identify this man.

He is Jim Simons. Founder of Renaissance Technologies, a hedge fund managing 68 billion dollars. Jim Simons is worth around 21 billion dollars. Not that impressive compared to Buffett, right?

Not really.

Buffett has managed to make an average return of around 21% over the last few decades. But his returns are running dry, especially after his Airline Selloff.

Jim simons on the other hand has managed to make an average return of around a whopping 66% over the last 20 years.

How did he do that?

Algo Trading.

Check out my YouTube video on Algo Trading for more clarity-

Jim Simons is a mathematician. His approach is entirely technical. With the use of his algorithmic trading system and HFT, he has amassed a huge fortune.

Buckle up your seatbelts cause this is going to be a bumpy ride. We’re going to be talking about Algo Trading. What it is, its Advantages and Disadvantages and how you can build an algo trading system.

When I talk about Wall Street, what comes in your mind? A huge crowd of traders shouting “Buy” “Sell” on a trading floor?

That might be true in the 80s and the 90s but modern trading floor looks something like this-

Around 70% of the trade volume on the New York Stock Exchange is done through aglo traders and High Frequency traders. (40% on NSE).

What is algo trading?

It is short for Algorithmic Trading. In the simplest words possible, it means that the computer will trade for you.

Think about this, imagine that you want to ride a bicycle. What do you do?

You sit on the bicycle, put your feet on the pedal and push the left (or the right) pedal. Then you push the other pedal with your other leg (if you have one).

Similarly, in trading you scan for stocks, you look at charts and try to find valid entry and exit points. And you look for risk management and position sizing.

In algo trading, you write a programme for the computer and the computer will do all the trades for you. A system could be fully automated (computer will buy/sell) or semi automated (you’ll receive only the singals).

Advantages.

The greatest advantage of algo trading is the lack of emotions. If you’re an experienced trader you probably know that mastering your emotions is crucial.

I once shorted a stock, I set decent entry and exit points. 3 hours later, nothing happened. The stock moved sideways. My stop loss or my target price hadn’t been hit. But out of frustration and impatience I decided to close my position.

A few minutes after I close my position the stock showed significant movement. I missed a good profit opportunity simply because I wasn’t patient enough.

But computers don’t have these problems. They wont close/open their position unless the target or the stop loss have been hit.

When we talk about algo trading, High Frequency Trading aka HFT is a major point. By the time I finished saying these words, a HFT algo could’ve trader millions, if not billions of shares.

A high frequency trading algo works on Inefficient markets. In one millionth of second it executes multiple orders. If you and I had to place orders on 50 stocks, it’d take use at least 3-5 minutes. But a HFT does it before you blink your eyes.

This gives you a huge edge in the market, especially if the trading is news based. If you read an article about a stock facing challenges, it’ll take you about 5 minutes before you decide what to do. But a HFT acts on the news in one millionth of a second.

It tracks words like “profit” or “loss” or “layoff” or “fraud” and processes this information to figure out what to do.

Another major advantage of algo trading is the Diversity.

If you had to look at the data and charts of 50 stocks, you probably couldn’t do it. Even if you manage to do it, you’ll be pretty inefficient.

But an algo trader can scan thousands of stocks very quickly to find trading opportunities. And finally, you can backtest your strategy using historical data.

If you want to know if you strategies work, you can use your strategy in the last few years and find out everything. The win rate, the risk reward, the sharpe ratio.

The Myth.

One of the biggest myths about algo trading is that you can simply sit on a beach or travel anywhere while your algorithm prints money for you .It simply isn’t true. Is algo trading difficult? Yup.

So, how do you start Algo Trading.

Before I tell you the steps, here are some things you’ll require to begin algo trading.

1.       A really good Laptop/ computer (preferably a gaming one). If you use a 1 gb ram, i3 processor laptop from the early 2010s, you’ll lose money.

2.       Good internet connection. A poor connection can literally bankrupt you. Always have an external source of power/internet in case of an emergency.

3.       Access to authentic data. You’ll be using a lot of data. If the data isn’t accurate, you’ll end up losing a lot of money.

4.       Skills and risk management. Some systems make crazy returns but lose everything the next day. A few months ago I was watching a video by Biaheza about his crazy algo system.

5.       Programme skills. Even though this isn’t a compulsory requirement, I highly recommend that you learn a programming language.

a.       I’ve been learning python over the last couple of weeks because learning at least one programming language is crucial,

b.       You can use R, Python, C++ or Java to design your algorithm. Python is said to be easy to learn.

The Steps.

      1.   Get Market Data.

a.       It completely depends on the type of data you’ll need. You need historical data, probably fundamentals, bid/ask spread, bid size, ask size, volume %, etc.

b.       Accurate data is crucial in trading.

     2.  Design a trading strategy.

a.       This is actually the tough part.

b.       You cant just expect the computer to trade. You need to feed in strategies with a well defined entry and exit.

c.       It could be a simple strategy such as buying when the 50 day moving average crosses the 200 day moving average and selling on the opposite situation.

d.       But this strategy isn’t great as it’ll give a ton of false signals, you’ll have to add in more conditions about the selection and the risk.

e.       But if you make the system too complicated, you might not understand it or the opportunities will be limited.

       3.   Test the Strategy.

a.       This is a crucial part of algo trading. You need to backtest your strategy.

b.       You need to find out the win rate, the lose rate and the maximum drawdown.

c.       You’ll also have to look at the performance during black swan events and recessions like 2008.

d.       Then test the strategy in live market using a small capital.

After you complete the strategies, you’ll need to use a broker that supports algo trading. Zerodha, Upstox and 5Paisa are eligible. You then need an API and you’ll have to be eligible for algo trading, your strategy will be checked.

Algo trading is really complicated if you come from a non programming background like me. There are certain disadvantages too.

Disadvantages.

1.       Technical problems/ glitches. If you suddenly lose power or internet connection, your programme will probably lose a lot of money.

2.       Doesn’t factor in news. If a really negative news about a company is published on the weekend, your algo wouldn’t factor in the news and you’ll lose money.

a.       You can programme it in such a way that it factors in news articles, but its very difficult and expensive to build.

3.       Expensive. Algo trading requires a huge cost to set up.

4.       Doesn’t work in sideways market. Algos will receive false signals in a sideways market and your profits will be wiped out.

a.       An algo cant just look at charts like a human and decide if it’s an uptrend or not. An algo will perform all the codes you write in it.

5.       Risk management. You need to focus closely on this point. And test it during  unexpected falls. A single loss can wipe you out.

6.       Overtrading. If your algo is really simple, it’ll take in thousands of trades each day which will add up to a huge brokerage charge.

7.       Difficult. Most retailer investors find it extremely difficult to trade using algos. The available resources on the internet aren’t very helpful or reliant.

Despite the drawbacks, algo trading, HFTs and machince learning will only grow in the future. You may not need to build an algo bot, but you need to understand that such a thing exists and you compete with a emotionless machine.

-Vikrant C.

Follow me on Instagram

Subscribe to my YouTube Channel

Twitter

Quora

 

Is Tesla a Bubble?

The Ultimate Guide to Goal Setting.

What is Money Laundering Explained | How to Launder Money | Money Laundering 101

 

close
close

One Reply to “How to Design an Algo Trading Strategy in 3 Easy Steps | Algorithmic Trading in India Explained.”

Leave a Reply

Your email address will not be published. Required fields are marked *