Wednesday, July 13, 2005

The Good And Bad Of Automated Trading

You've spent most of your last 6 months developing an automated trading system. A so-called "trading-bot". Or you spent a few thousand dollars to buy one that somebody else made. So you're about to become rich then?

No, not necessarily.

A trading-bot is good in that it does stuff automatically.

A trading-bot is not so good in that it can only do automatically, what you tell it to do.

Let me expand.

The Good
  • In a word - Automatic. It downloads prices for future backtests, it calculates entries, stops, exits, the amount of money to risk, whether or not this trade should be taken in light of the past X trades, it stores the details of trades, the amount won/lost, and more, and continues to do all of this while you're sleeping, at the beach, or in a different country.

  • It removes the boring administrative side of trading - the recording of trades for your own purposes and for tax purposes. Now everything's stored for you, and all you have to do is use the Search and Print buttons.

  • More importantly, it removes the emotional side to trading. Book after book has told you and me that emotions are the biggest hurdle for traders, and the reason why most traders fail.

  • It adds 100% discipline. Book after book has told you and me that lack of discipline is the other reason why most traders fail.

  • Passive Income Generator. Kick it off and go do something else.

  • Take care of your family. Okay, you know how to trade. You're quite good at it. But if something happened to you, you'd want to ensure your family is still being looked after, right? Set up your trading-bot using your specialised knowledge, then demonstrate how to use the On/Off switch.

The Bad
  • In a word - Automatic. Without thought. (Don't take the name of my software too literally). It only does what you tell it to do. A bad trading system traded automatically still loses money.

  • Some chart patterns are more easily recognised by humans than computers.

So there you have it. A trading-bot does not guarantee riches. But a lot of benefits to be gained nonetheless. A lot.

If you've got anything to add, good or bad, please leave a comment.

Tuesday, July 12, 2005

Why MySQL?

I've chosen MySQL as the database for my automated trading software - Thinking Stuff. If the licence fee for MySQL is 500 Euros, Why did I do that?

First, let's take a look at what I actually need in a database. I need it to handle a lot of data. To store tick data, it seems to take about 1.5Gb of space per 4 years of data per 1 currency. I'll probably want to keep an eye on about 10 currencies.

That immediately takes Microsoft Access out of the picture. It's maximum size is 2Gb (click on the "Access database" section).

It also takes out Microsoft's SQL Server Express. This product is to be released later this year for around $50 for per licence. Microsoft has limited the size of these databases to 4Gb.

Oracle is a step too far.

That essentially leaves Microsoft SQL Server (the standard edition as opposed to the "express" one), and MySQL.

The licence fees for these two products are essentially the same - 500 Euros for MySQL, and a touch over US$600 for SQL Server.

However, for private use, MySQL is free. While I'm developing the application, and if in fact I decide not to sell Thinking Stuff, there is no cost to me. So that's what I went with.

Of course, please leave a comment if you know of another product.

Saturday, July 09, 2005

You Don't Need Charts To Trade

Bit of a strange heading that, for someone who is purely a technical analyst. I mean, I might get out of the market when a major announcement is coming up, but I don't use any kind of fundamental analysis for my trading. I use a very short time-frame to be worried about the long-term trend.

So what do I mean by "you don't need charts"? If I'm a technical analyst, surely charts are the *only* thing I need?

What I'm talking about, is using charts to develop new trading systems. You don't need the chart for that. In fact, you'll just be wasting a lot of time.

What do we do when developing a new trading system, or determining how good someone else's trading system is? Well, I'll tell you what I do. I pull up a chart. I add the indicators to it. I run my mouse across the screen from left to right, and say in my head when that system would have bought and sold. I look at the approximate prices and judge if it made a profit or loss.

Kind of like "hmmm... entry... about 1.1405... still in... still in... exit there for a loss of about 20 pips... then entry..." Etcetera, etcetera. Maybe I do that for about 10 minutes. I change the indicator settings a bit, do it again, add another indicator to see if it gets better. Repeat. I'm doing that for about an hour.

I'm looking at about 300 bars of history. Whatever the results are, I can't trade based on the evidence I've just gathered.

So I punch the trading system into my software. I click the Start button, and it tells me the results, the exact results, working with about 2000 bars of history, in 2 minutes.

I change some settings and click the Start button. Another 2 minutes later I get the exact results. Repeat.

I've now performed a much more thorough analysis, obtaining the exact pip win/loss, and finding the best settings for that system for that currency and timeframe, all in about 15 minutes. I don't need charts to do to this. If I have an idea, I just punch it into the software and click Start. Who cares what the chart looks like?

And who cares what "makes sense"? It costs nothing to backtest like this. Conventional wisdom has it that the price closing above a simple moving average, for example, is a buy signal. Go long. Create that system. Test it. With a few clicks of the mouse, change the system so that you're going short when this happens. Test that. The result is better - keep it that way. It's worse - change it back.

Add another indicator. The result is better - keep it that way. It's worse - change it back. It doesn't matter what the indicator is, if it goes with conventional wisdom or not, if it's another trend-following indicator and you've already got 2 trend-following indicators.

The result is better - keep it that way. It's worse - change it back. Looking at charts to do this stuff will just waste your time.