For the past eight months or so I have been writing my own quant based trading system. I like to call it quant based trading, and not automated trading because quant implies analysis and some automated trading. Trading based on quantative analysis is becoming the norm, not the exception. Automated trading implies auto-pilot and not as much analysis. If you don’t know much about automated trading it is time that you start learning about it.Now brokerage companies are starting to release automated trading software that you can use to devise your own strategies. For example, TDAmeritrade has released such software. I use Interactive Brokers as an online brokerage, which has an application programming interface allowing me to write my automated trading software. Or you can buy software that allows you to write scripts.

What have I learned in the past eight months?

Regarding bought software:

  • Many claim if you buy this software your trading will improve and you will make money. My question is if your software makes money why are you not using the software to make money? Successful trading is a true money printing press, and if you can successfully trade there is no need to do anything else. So always keep a skeptical eye towards software that promises too much. 
  • Bought software is darn tooting expensive. Often good software runs in the 300 to 1000 USD per month range, and that is quite a bit of money. Every month you need to make that money. 
  • Most bought software does not go beyond the basic indicators. There is no probability and quantative analysis, and if there is then the software is mucho expensive.

In the end I decided against buying any software. I decided to implement my own software so that I can learn about quantative analysis and implement my own strategies. Implementing the software I ran into many roadblocks, and I am now on my fifth major version of the software.

The problems I ran into were the following:

  • Data overload: When you process literally millions upon millions of records how do you know what you process and calculate is right? In traditional programming when you write code you unit test, but unit testing is a one to one relationship. When you are processing millions of records you are literally not able to test the records. Things become too complicated. This topic has become a new writing and speaking topic for me. 
  • Indicator overload: There are literally thousands of indicators and it seems every Tom, Dick and Sally has their own special indicator. I found most of these indicators are useless and keep re-confirming the same piece of data. For example if you get a signal from both an SMA, and MACD you are asking for a bruising because the indicators are not orthogonal to each other. You need to compare different data, eg Aroon vs SMA.
  • Signal Conversion: How do you convert a buy or sell signal from your indicators into something the computer can process? Lets say that the SMA says 25.2, is that a buy, sell? Having data, and then converting it into something the computer can understand is very tricky. Current software likes to use decisions, but decisions can easily be fooled. I will give you an example, stochastic indicators are pretty good, but what if the indicator says buy, and the trading range is +- 10 cents? Stochastic indicators have a big problem in that they normalize the data thus making you buy and sell in a trading range causing major whiplash. 
  • Decision Making: This one issue is a toughie! If you have fifteen signals, where 5 say buy, 5 say sell, and 5 say do nothing what do you do? I think I have this one cracked, but the end result is that I need 308,000 computing years. I have 5 computing years, anybody willing to donate me the remaining 307,995 years? Seriously I am working on solution searching algorithms to help me figure out an ideal trading strategy. 
  • Making decisions right away instead of per period: Most trading system calculates indicators using a per period timespace. That period might be a day, month, minute or five minute. Though it is a period and that is a problem because period trading can miss very important details. It’s like motion stop camera where you come alive every five minutes, during the remaining 4 minutes and 59 seconds the world could come to an end and you would not know it. This causes your system to be triggered into trading. I have seen it very often where traders will force the system to go up or down in between a trading period and had I traded per period it would have triggered my rules. I solved this problem by doing away with fixed period timespaces, but it required me to change the mathematics of the traditional indicators. Not fun let me tell you, but as a result I can determine the velocity of the market. I will not give away my answer, but you need to study the option pricing model.
  • Dealing with historical and realtime data. Realtime data is not historical data and trading systems cannot be coded using historical data. This goes back to my point where historical data is based on fixed timespan periods. Realtime data in its raw forms give indicators on the market, and I don’t just mean this for day trading.

Reading my problems you would think I am developing a trading system that does day trading with lots and lots of trades. On the contrary, my system does not day trade because I have seen how professional traders use tricks to trap the in-experienced. No I need all of this data to find moments of in-efficiency that allow me to jump into the market.

By implementing my own trading software I am learning financial market engineering. It is quite exciting, but some of the mathes are quite difficult.

Following are the lessons that I have learned:

  • Practice, practice practice. Keep trying out your trading strategies on paper. Don’t practice with real money because you will loose sight of what is important. Though treat paper trading seriously.
  • If you make or loose money you must be able to explain why. Initially when I traded I made money because it seems I have knack for trading. Though my money was made by fluke. The moment I tried to run four or five strategies concurrently I would loose money. By explaining what is going right and wrong I can do more or less of what I am doing. Right now I am able to run about eight strategies concurrently. I am aiming to be able to run about twenty or thirty.
  • Make sure you have a plan… I can’t stress this one enough. Have a plan, don’t go in or out by the seat of your pants.
  • After hours and before hours trading is dangerous. Don’t assume the market in these timeframe’s knows what it is doing. Jim Cramer has talked about the “evils” of traders, and I see how they do it, unless you have an iron stomach and lightening fast reaction don’t do it. It is easy money if you have the skills. 
  • Understand macro issues, mathematics, and the psychology of the market.
  • You can’t predict the market, and no matter how good your model is it is only a probability.
  • My system is not completely automated, and more often than not finds moments of “in-efficiency.”
  • The market is about taking somebody else’s money. Many say the market works because the size of the market grows. Fair enough this is correct if you look at the market decade, by decade. Below that timespan the market is about taking somebody else’s money. So if you make money you are taking somebody else’s money. If you loose money you are giving it away. Remember to sell a share at a profit somebody has to figure that your price is low enough to make their own profit.

So how am I doing these days? Well I stepped out of real trading when I sold everything in January. Since then I have been paper trading using my software. I have had hiccups, but overall I am very happy. Things have become predictable and I can associate a probability with my trading. Am I profitable? Yeah I am…