Sunday, April 5, 2015

Systematic Trading (or Mechanical Trading) - Let computer do the hard work

What is Systematic Trading?

Systematic trading or system trading is also known as quant (quantitative) trading, mechanical trading, algorithmic trading or even auto trading. It utilizes computer system to analyse share market and generate buy and sell signal of stocks automatically . More advanced systems even make buy and sell orders without human intervention if the market provide interfaces for the system to integrate with, which to my knowledge KLSE doesn't support this.  

Traders who are good in technical analysis and charting utilize share charting computer software to analyse stock market extensively and make the trading decision. This is called discretionary trading because the buy and sell decision is based on the strategy, experience and knowledge of the trader. System trading take the power of computer to the next level, the strategies of enter/exit to/from a trade are converted to computer algorithm (system) , all of the analysis work and trading decision are made by the system.     

What are the advantages of systematic trading?

All of us in share trading know that scanning through all of potential shares, analyse each of them and finally make the trading decision manually is a time consuming and complex job. So why not let the machine (computer) do the hard work for us, and let us focus on our daily job, family or just enjoy our free time?  

We can't deny machines make less mistake and are less emotional than human. Trading is a highly pressure activity because of its high risk, even a very experience trader will be affected by emotion and make wrong decision working under pressure . Therefore, if we have a reliable system, we will just follow its decision and we know that the decision is based on our proven strategy which implemented as a system and has been tested statistically. I will explain how to test a system in my next blog.        

Why we still need to develop our own system?

As I have explained above, a system generates buy/sell signal. You might have doubt why we still need a system because of the following reasons:
  • some of advanced charting software include stock scanner which allows us to scan for potential stock to buy/sell based on predefined criteria, some of the software even allow us to customized our own criteria
  • buy/sell signals are freely available or with a small charges by stock brokerage firms, newspaper, social networking site, share masters or gurus  
The following are my justifications based on the sequence of the points above:
  • A complete system is not equal to a scanner. It is true that both of them can generate buy/sell signal. But a system is very flexible and highly customized software program based on your own strategy. You develop the system yourself and you have access to the code so it is not constraint by any limitation. Most importantly, the system is back tested with historical data and proven profitable historically (I will explain more about this in my next post). We can argue that we can also apply some proposed or well known strategies for example golden cross, MACD crosss, multi-year high and etc from some books or gurus to the ready made scanner and hope to make good profit. But this kind of strategies are usually too general enough and it will not work on its own based on my testing.    
  • Experienced traders know that we shouldn't follow buy/sell call blindly from any source without our own analysis. Otherwise, we will be easily lured by syndicate which try to manipulate the market. Of cause I believe that there are some genuine stock brokerage firms, masters/gurus which provide good buy/sell calls to their members. But even with a very good strategy, it will lost its edge if too many people are buying and selling at the same time. Hence in my opinion we should only trust buy/sell signals from a trusted provider only if there are limited number of members/subscribers especially in a short or medium term trading. But I guess this is not really under our control?

How to develop our own system?

After reading till here, you might thought that develop a system is a highly complicated task and it needs specialized skill. But the good news is it is not as complex as it sounds, you don't need to be a seasoned programmer like me to create a system. I believe any experienced traders with good logical thinking and mathematics are able to create their own systems. A system could be extremely simple with few lines of code, even a quite complex system usually will not have more than few hundred lines of code.  

A trading system is simple because we do not develop from scratch, we are utilizing advanced charting software like MetaStock, TradeStation, Amibroker or etc. So you can imagine that creating a system is not really like writing a program but it is more to embed your formulas to the charting software. In this blog, I will focus on creating system using Amibroker.  

More to come...

In next posts, I will write about my experience of writing share trading systems and my systematic share trading journey in Kuala Lumpur Stock Exchange (KLSE or BURSA). I think most people like to see the end result instead of the process. I will end this post by showing you the result of one of my trading system which I tested from year 1991-2014 with initial capital of RM 100K. I will explain more about this system, please stay tuned for my next post :)   

1. Statistic

Initial capital 100000.00
Ending capital 31429349.55
Net Profit 31329349.55
Net Profit % 31329.35 %
Exposure % 55.31 %
Net Risk Adjusted Return % 56647.86 %
Annual Return % 27.06 %
Risk Adjusted Return % 48.93 %
Total transaction costs 2275586.78


2. Portfolio Equity




3. Profit Table



No comments:

Post a Comment