How To Create An Online Automated Trading System With Zero Knowledge

With the large increase over the years of algorithms in the markets,  more and more traders are switching to online trading system structures to make their buying and selling automated.

In this post, I'm going to discuss what a trading system is to the advantages & disadvantages of them and how we go about creating one ourselves.

Nowadays, hedge funds are hiring world class PHDs in Psychics, Mathematics and Computer Programming to name a few.

I'm not even going to pretend I could compete against the billions of dollars and brainpower  these guys have at their disposal to test, build and fine tune their own systems. Depending what you want to achieve, building a system can go from easy to very very tough.  I like to keep things simple personally.

Here's a great video of the rise of High Frequency Trading (HFT) from 2007 - 2013

 

Obviously, it is visible to see how much more relevant algorithms are in todays markets and even since 2013, the number of algos have increased even more.

But lets get this straight, if you want to build an online trading system that isn't based around a high frequency trading approach, there are many ways you can do it.

It's still incredible competitive but no where near what it would be like to try build a HFT system.

So first off,

What is a Trading System ? 

Automated Online Trading systems are a set of rules input through coding that tells your software when to buy, sell, take profits or whatever you want it to do.  You can create your own or purchase one.

A lot of brokers ( as I'll mention below) accept automated trading so you can do this on a number of trading platforms today. There are many different inputs you can program, the most popular being creating a parameter for your technical indicator to signal buy or sells and having the system make the purchase itself. (That's in the most basic form)

Before we go any further, let me be clear. Unfortunately, there are absolutely huge amounts of online trading systems or black boxes as they are touted by people online for sale. The majority of these are nothing more than scams.

Think about this logically, if someone has this amazing black box system that makes $10k a day, why would they be selling it to you for $999 ? Obviously, I'm just using random numbers as examples, but you get the point.

Please, please, please be very careful buying from anyone selling an online system. I would hate to have any of you scammed out of your hard earned cash.

This doesn't mean all systems sold online are scams,  maybe some of you got lucky and actually found something of use so just do your due diligence as I always advise.

To decrease the chances of potentially being scammed, you can go to WealthLab. They have great features where you look at an array of already pre made systems, find one that suits your style and subscribe to it. Most of them will have free trials so you can check it out for free.

*Note: I have no affiliation with WealthLab.

 

How Do I Go About Creating A System ? 

You can create trading systems through many different avenues.  Examples include:

  • Excel Spreadsheets
  • In house broker software
  • Use programming languages - MatLab, Python, R, Java  e.t.c.
  • Hire a programmer
  • Websites that help do it for people with no knowledge of coding e.g. build alpha

*Note: Building Alpha doesn't cater for stocks yet, but if you shoot them an email, they might be able to help out . I have no affiliation with them whatsoever.

 

First things first though, you'll need to have a trading plan that can then be automated to your liking.

 

Where Can I Learn More About Creating My Own Automated Trading System?

learning how to create a trading system

If you don't want to find other systems and want to dig into building it yourself, a lot of brokers have training on how to do it.

However, for beginners, there is a difficulty in finding the right knowledge so I'll outline some great free & paid resources to learn from.

  1. QuantStart - Useful blog
  2. Quantitive Trading: How to  build your own Algorithmic trading business
  3.  QuantStratR - Great for learning through R language
  4. Quantinstitute - Great place to learn and get a certificate in algorithmic trading. They can teach you the very basics and more advanced stuff too.
  5. Quantopian - Very good website if you have an algorithm and want to raise capital. If accepted by them, your algorithm will be funded and you take a share of the profits. They also have excellent learning posts for complete newbies to more advanced.

It's also worth mentioning that Quantopian has great ways to backtest your code. You simply plug it in and it'll pull out your results. Remember though, that this is simulated results and doesn't allow for real time issues such as slippage etc.

 

What Brokers Offer Automated Trading For Your Trading System?

There are a few that offer both automated and semi automated online trading and it all depends on what you want really.

What is the difference  between fully automated and semi automated you might be asking ? 

Fully Automated Trading is when your systems finds the exact criteria you set it to make a buying decision, e.g when the moving average A crosses over moving average b and then automatically places the order with the broker for you.

Semi Automated Trading is when you can have the computer alert you to when your trading system parameters are met and you manually place the orders yourself.

Semi automated trading is more useful for someone that wants a faster way to find their trading signal. This works great if you are trading multiple markets and cannot watch them all at once.

So which brokers offer these services ?

Heres a list of popular brokers that have both automated and semi automated capabilities:

  1. Interactive Brokers
  2. TradeStation
  3. ThinkorSwim
  4. Trading Technologies

 

What Exactly Can I Automate ?

The majority of trading strategies today can be automated. There are very few limitations on the actually rules and parameters side of things, i.e, finding a trading signal automatically. However, there may be limitations on the execution side of your strategy when automating it.i.e placing the order itself to buy and sell on the order book.

Fundamental and Technical Analysis Automation

Firstly lets briefly look at what can be automated on the technical and fundamental analysis  side of things.

You can automate a system to alert Fundamental Analysis Criteria, e.g. if earnings of a particular stock are a certain number and the stock has certain volume, alert me to buy. You get the idea.

Very basic example of something simple.

You can also automate most technical analysis indicators too.

Say, for example, your strategy is to buy a stock, forex,etc when the rsi is below 30 and the stock is approaching support, all this can be automated.

I only used the above for example purposes, pretty much any technical criteria can be automated.

 

Execution Automation 

Now, this is where it gets tricky, like I mentioned above, some brokers will only allow semi automation.

Fully automated trading systems means that your system does everything automatically online. From finding a trading setup based on your trading strategy to placing the order with your broker, you literally have the program do it all.

Trading technologies is the best broker to do this with but it is very expensive and not something for a beginner. It really is the Ferrari of trading software and something we used when I was in prop trading.

Like every trading style, different brokers offer different services so find one that suits you and your style.

 

The Advantages Of Automated Systems

A few advantages with an automated system include:

  • Eliminates emotional decisions
  • Rule Adherence isn't a problem
  • Saves time
  • Eliminates the human element altogether

Let me explain here. Emotional decision making and following your rules are the 2 most problematic areas for any trader. If you've been trading for any length of time, you'll have broken a rule at least once.

Come on, we all have and it sucks !

Well, with an automated systematic approach, our rules are pre programmed so we simple turn the algo on or off, thus eliminating any human emotions or problems with adhering to rules.

Unless however, we turn off the algorithm at the wrong time because we think it is not working but that's a whole different story in another post.

Time saved means once we have our strategy up and running, we don't have to sit at screens as much provided our system is sound and we have all the correct measures in place should something disastrous occur.

 

Disadvantages Of An Automated Trading System

Some disadvantages include:

  • Over optimization
  • A 'black swan' event in the market
  • Initial period to set up can take some time
  • Specific Skillset Required

It can take anywhere from a few months to years to have your strategy automated and optimized to where you want it to be. Another problem is if you have it automated and aren't at the screens full time, a black swan event in the markets, like flash crashes etc could cause significant damage to your account.

Over-optimization can become a problem in that you spend endless hours tweaking every little detail.

 

Can I Trade My System In All Markets?

Well, in theory, yes you can. But there is one major problem that may stop you. This isn't unique to systematic automated trading as discretionary traders can be effected by this too. I'm talking about liquidity.

The less liquid a market it, the more risks you run of slippage being a problem or not getting any fills at all.

I remember trading Cotton Futures and they were a nightmare for liquidity. I learned the hard way with it but you might find a whole strategy around trading illiquid markets. It's whatever suits the individual.

Simply put the more liquid a market is, the easier it is to automate with peace of mind.

Some liquid markets include:

  • Currencies
  • Bonds
  • Blue Chip Equities
  • Indices
  • Futures (varies on contracts)

 

Another thing to keep in focus is commission structures. Again, this isn't just unique to a trading system but you want to know the whole commission structure.

I remember traders, rather naively,spending months studying and creating systems for a particular market only to realize that they failed to allow for all costs associated with that market.

This meant in some instances that cost adjusted returns were in some instances actually negative. So it's something to keep in mind when you start out with your new system.

 

Types Of Trading Systems

There are many different types of trading systems that can be automated.

  1. Trend Following
  2. Statistical Systems
  3. Technical Analysis
  4. Fundamental Analysis
  5. Arbitrage (can be within statistical or separate)
  6. Mean Reversion

Like an trading strategy out there today, it can be automated to meet your needs. The above list of trading system types cover a wide variety of many different styles of trading.

Trend Following is self explanatory in that it's a trading system based on finding and following trends.

Technical & Fundamental online trading systems are simply systems that make their buying or selling decisions off a set of criteria you set, either from technical analysis, fundamental analysis or both.

Arbitrage is finding discrepancies in pricing models of a market. For example, you might use 2 brokers and find the price of a market e.g. AAPl stock  is higher on one broker software than the price on the other broker. The arbitrage would be to buy AAPL on one broker and short it on the other, in turn, your profit is the spread of the 2.

That's arbitrage in very basic from and only one type of arb strategy just for illustration.

Statistical Trading Systems are based off statistical analysis, generally found in quant algorithms.More information can be found at this educational resource. You can use statistical arbitrage or many other variations of stats you may uncover to trade.

 

Time Frames of Automated Trading Systems

 

online trading system timframes Timeframes Of Systems

By time-frame, I mean, your automated trading system makes buying and selling decisions based on the length of time you anticipate holding the trade. This works like any strategy you set up. If your trading strategy is build around longer term trading, you can automate it that way and similar for shorter term trading.

Generally speaking, trading system timeframes include:

  • Longer term ( 1 year +)
  • Medium Term (1 month - 1 year)
  • Short term (1day - 1 month)
  • Shortest term ( anything from milliseconds to day trading)

Lets clarify this.

For example, the shortest term trading occurs with High Frequency Trading and this is done with billions of dollars of infrastructure and literally servers located at or near the exchange for the quickest speeds.

Putting this in perspective, algos for HFT's make trades in 10 milliseconds or less. So yes, super fast. These trades account for 60% of the daily average trading volume of US indexes.

So the competition is fierce for these types of trading systems, not including the brain power and finances behind it.

Other trading systems are longer than this time frame ranging from the time period listed above. These, although still tough, are much less competitive systems to create mainly because HFTs are dominating and super saturated. The video shown above really illustrates how these algos are taking over the markets.

I would much prefer creating a system with less competition as it leaves room for more edge. Don't get me wrong, the market is very difficult no matter what way you trade and billions are investing in all timeframes for automated systems but HFT algorithms are by far the toughest and most competitive to create.

 

I learned how to build an online trading system, now what ? 

Well, great. You know how to build your strategy and automate it. The next thing you will want to do is backtest it. Like I outlined above,  Quantopian is a great place to backtest your strategy. However, there are some things you really need to be aware of when you are backtesting.

  • Curve fitting results - Be very careful of over optimizing your results that look great in past performance but are terrible in the real world. Obviously, this is easier said than done. Depending on what you want to achieve, it's also best to ensure that you have sufficient data set in your back testing.
  • Simulation versus real life -  The biggest issue here is ensuring you allow for the volume of the market you are testing. What I mean is if you test a thin market, your hypothetical results could be far better than what would happen in real life. For example, your simulator could be trading alot bigger size than liquidity would allow in reality so keep this in mind.
  • Commission structure - When backtesting, a lot of people forget to allow for commissions of the market they are trading. This can have a huge impact for your results so make sure you know the commission structure of any market you are trading.

 

Conclusion- I'm ready to go 

You have done all the work, learned through the blogs/courses and resources above how to create your online trading system and have successful backtested it without slipping into one of the common backtesting pitfalls.

You are now ready to go live ! Great, it isn't easy to get to this part but when you do,  give yourself  a pat on the back :)

Now the real fun begins, testing it with real money and real market data.  We can all be nervous here but trust in the work you have done. If you worked your butt off, trust the process.

I hope you found this useful and the very best of luck on starting your journey in creating a trading system.

You may also like to read about my story in trading from start to where I am now.

Close

Two Step

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.