Thinking Stuff's ATM

Automated Trading Machine (ATM) makes it simple to remove fear and greed from your trading. Automated trading is no longer just for the rich or nerdy. Our revolutionary software runs on your computer, using your trading rules, but none of your emotions. There's just one requirement - you know how to use a mouse.  Learn more...

Thinking Stuff's ATE

Automated Trading Execution (ATE) is where we run your trading systems for you on our servers. Your system can be exported from ATM, or written in plain English and we'll make it for you. We'll even backtest and suggest improvements if you want us to. This service essentially automates your automated trading.  Learn more...

Thinking Stuff's Groups

Join a group of like-minded individuals, and help each other to trading success. Once you join a group, you will have access to that group's trading systems, ideas, and feedback. And please contribute your own knowledge as much as possible. Or contact us to start your own group.  Learn more...

Automated Trading

Update From A Customer Who Trades Live With TS

Unfortunately I rarely hear from customers once they are up and running. So I have no idea if they are using TS in live accounts, and if so if they are profitable or not. So I took the opportunity to ask a customer the other day how he was going. Here's the reply:

It is all going well. I am trading live and it's running on the server with no intervention at all. Spent some time in Turkey and didn't have to check anything.

I do the maintenance manually once a month or so and give it all a restart.

The combined systems are profitable. The live results mirror the backtest so far - so I am happy.

It's possible folks.

Why Wouldn't I Sell It?

I was going through my website logs the other day. Anyone with a website can see "referrals" - the addresses of other websites which have a link to their own (assuming somebody has clicked that link).

So I sometimes go to those other websites and see what's written. (Interestingly there are a lot of sites in Spanish and German linking to my theory articles).

Anyway, one guy has some automated trading software for sale. Someone asked him "if it works, why would you sell it?". In the course of answering that guy, he linked to me.

But isn't it funny that that kind of question prevails? I've touched on this a couple of times before, but why are traders the only ones who aren't allowed to want to make more money? Aren't we exactly the type of person who is inclined to make money any way we can?

That kind of question also shows a misunderstanding of how trading works. It's not a fixed income. There are good times. And then there are lean times. Traders are people, believe it or not, and tend have things like families, rent to pay, food to buy. If done well, trading can bring in a fantastic income. But the need for security, the need to be a good *consistent* provider for your family (or just for yourself), doesn't go away.

And then, there is the fact that we live in a capitalistic society. Consider a movie star who spends a couple of months doing some 'acting', and gets a $20 million payment. Why is it, that the actor then goes on to make another movie? Why is it, that the actor then goes on to make a car commercial? Don't they have "enough" money? In capitalism, there is not such a concept.

Even if we don't use the money for ourselves, we can always use the extra for the benefit of others. Ala Warren Buffet, Bill Gates, and a list of other millionaire/billionaire philanthropists. How are they best to serve humanity - by volunteering their time at a soup kitchen for the homeless for 365 days a year? Or instead earning a stack of money, building a number of soup kitchens, and employing people to run all those soup kitchens?

And so, just like any other normal person, traders want to make more money. Selling their trading knowledge, or trading tools they've made along the way, seems a good way to me to pick up some extra cash. It's a completely normal thing to do, but yet people still have it in their head that once you've got a killer trading system, you are then no longer allowed to want to make money through alternate means.

Further, you're probably aware of the saying "it takes money to make money". Let's say you found a trading system which brings in 100% per year. Now let's say you have only $2000 to trade with. $2000 + 100% of $2000 equals just $4000. You can't live on $4000.

Year 1: $2000 + 100% = $4000.
Year 2: $4000 + 100% = $8000.
Year 3: $8000 + 100% = $16000.
Year 4: $16000 + 100% = $32000.
Year 5: $32000 + 100% = $64000.
Year 6: $64000 + 100% = $128000.

You could probably live on $32000 per year. So if you start with $2000, and you consistently make 100% return per year, it's going to be about 5 years before you can quit your day job.

Two problems come to mind: (1) you need to consistently earn 100% p.a. for this plan to work; and (2) once you've quit your day job, you now have to consistently earn 100% p.a. until you die. Because all of your winnings would be taken up by buying daily essentials. You wouldn't be saving any money - you'd be treading water for the rest of your life.

What I'm trying to say is, you need a decent bank balance before you can consider trading for a living. The more you have, the less return per annum you need in order to pay for daily essentials.

So, I sell my freaking software! :-)

The other fundamental misunderstanding of how trading works, shown by the question of "if it works, why would you sell it?" is this theory of "the more people know the system, the less well it works". Now in my particular software, you create your own trading system. So you won't be trading the same as me - I'm just providing you a way to automate your own system. However, even if I was selling trading systems, theoretically the more people that know the system - the better the results should be for everybody. No?

Because, the more people buying at a particular time, the more demand there is. And the more demand there is, the higher the price goes. Isn't that how the supply-demand thing works??

So to me, the question should not be "if it works, why would you sell it?". The question should be "if it works, why wouldn't you sell it?".

Automated Trading Software - The Thing Which Relies On Many Other Things

Automated trading software, if you will, is the glue that holds a number of other things together.

But should any of those other things fail, then so does the automated trading software.

Obviously the software has to place orders at the broker. And to do that, brokers provide a so-called "API". Someone at that company programmed the API. Coding is never 100% accurate. Bugs in the API means bugs in your automated trading software. At the very least, it means you have to do extra coding to get around those bugs in the API. At worst, it could make using that broker a waste of time.

It's a similar story with the database. They're pretty big and complex, and there are bound to be bugs somewhere in there. And just like the API, bugs in the database range from annoyances to reasons to switch databases.

To connect to your automated trading software to the database, you need another thing which does the connecting. That's programmed by someone else too. If it don't work, then you ain't connecting to the database, and your automated trading software don't work. So to speak.

To connect to the broker, you need to be connected to the Internet. If your modem is a dud, then so is your automated trading software. If your Internet service provider often has outages, so does your automated trading software. If a hurricane takes out the Internet connection to Taiwan, and you live in the area, then it really doesn't matter how good your automated trading software is - you can't use it anyhow.

Generally people like charts in trading packages. You can create the charts by yourself, but generally it's easier to buy a charting module from someone else. Hope there's no bugs in it. At least, no big ones.

There are also packages out there to do all the indicator calculation. Saves a lot of time over doing it all yourself.

And in my case, my software connects to my webhost to verify your subscription details. So if they go down, well, so does the software.

So pretty much all the automated trading software does by itself, is work out when to buy and sell. Just about everything else is integrating bits of software that other people have made. And therefore you are both grateful that other people have spent the time to create something you can plug in, and weary that if someone screws up, the whole thing comes tumbling down. Also that if something does go wrong, you are now reliant on someone else deciding that the problem is as important as you think it is.

Still, it's a tightrope worth walking.

Setting Your Primary Focus

I mostly enjoy reading posts by Steve Pavlina. His recent article, Setting Your Primary Focus, says to resolve to focus on one thing in the coming year, rather than making any resolutions. Read the article for his explanation.

I have decided that health is my one thing. I tend to think about money by default, so that's taken care of.

The truth is, Sharky has become a chubby bunny.

Steve says:

For example, if you’re 50 pounds overweight, that’s a serious problem that will negatively affect many parts of your life, including your health, your career, and your relationships.

I'm not quite 50 pounds overweight, but by the same token nobody wants to see my belly. Although, now I think about it, nobody really wanted to see it before :-)

So it's to the gym for me, as soon as I move cities, as soon as I get a job, as soon as v1.0 is out. Until then, I'm trying to walk 10,000 steps per day.

And, as Steve Pavlina said in a different post, it's all about turning up. You go to the gym, and you're going to do a workout. The more often you turn up, the fitter you'll become. It's the turning up that's the hard part.

Rings

Don't buy a diamond engagement ring. Get one made from your own bone instead.

Is the tradition of buying a diamond ring only 70-odd years old??

50 Gigabytes

Over the last few days I've been loading the many text files of historical price data into my Automated Trading Machine.

All these files are freely available on the web. And here are the instructions on where to get them.

Oanda gave me tick data for 5 currencies going back to January 2004. And Gain Capital gave me tick data for 16 currencies, most of which go back to 2001.

Having loaded each and every file into my database, I can now report how much hard-drive space that takes.

50 Gigabytes.

That's just for the tick data. Now I have to create the interval data. Creating each and every interval for each and every currency will, I dare say, double the amount of hard-drive space required (bringing the total to about 100Gb).

But it's 16 currencies going back 5 years, and 5 currencies going back 2 years. So the total is about 100 years' worth of price data, which roughly equals 1Gb of hard-drive space per year of price data that you should budget for.

Sitting straight 'bad for backs'

Sitting straight 'bad for backs'

When they looked at all test results, the researchers said the 135-degree position was the best for backs, and say this is how people should sit.

I thought this was interesting for anyone who sits at a desk all day. And for all our Grandmothers who tell us to sit up straight :-)

Trading-related Oxymoron

Came across the title of a book today called "A Mechanical Trading System..."

Cool!

"...Using Simplified Elliot Wave Analysis"

DELETE! DELETE! DELETE!

Elliot Wave Analysis is hardly mechanical. Or maybe I'm just judgemental.

Here's my test for mechanical-ness:

#1. Will the today me, in this mood, think that a rule is met, and will the tomorrow me, in another mood, agree that the same rule is met?

#2. Will I think that a rule is met, and every other person in the world agree that the same rule is met?

I say "Bah!" to Elliot Waves fitting either of those 2 rules.

No Gridding

Gridding is where you believe the price to be moving in one direction, so you set up a whole bunch of limit orders at regular intervals (let's say every 10 pips) both above and below the current price.

It means you're buying more and more regardless of where the price is going in the short-term. The theory is that because the price is eventually going to go in your favour, you want to keep buying more and more at hopefully cheaper prices. When the big move comes, you rake in the dough.

And just to finish off the gridding explanation, I think also when one limit order is taken up, you're supposed to place another one so that you've always got 10 limit orders at any one time. Or maybe it's 10 limit orders on either side of the current price. Or whatever.

It's a lot like dollar-cost-averaging, which I already said I don't like. The reason I don't like either of these is because prices don't always come back. Sure you're buying cheaper than what you originally got in at, and this is fantastic if the price does rebound, but it's no help at all if the price never makes it back to these "cheap" prices. In fact you're just multiplying your losses.

Now when I say "No Gridding" in the title, I don't really mean to say to you that you shouldn't do gridding. I wouldn't. But then I wouldn't set up a website for people to post videos and 2 years later rake in $1.5 billion.

What I mean by "No Gridding" in this context, is that the Thinking Stuff software will not be able to support gridding. Sure you could have made 20 different trading systems which were set to place their entry orders at "Close Minus 10 Pips", "Close Minus 20 Pips", etc, but even so I made a change in v0.8.3 that just won't allow it.

Gain Capital has a heart attack if you try to put a Long limit order below the current price. But Oanda allows it, and such a limit order will be taken up when the price pushes *down* through the limit order price, rather than pushing up through it as normal.

I had this as a bug - a limit order had been placed, and due to some latency between retrieving the price and placing the order, the price had already shot up above where the Long limit order was put. What to do in this case? The problem is of course, that the algorithm which works out if we should be in a trade will think that we should be in a trade - a Long limit order was placed during the previous bar, and the current price is above where it was placed. "We're in a trade!", the algorithm will think to itself. And then it will discover that it should be in a Long trade, but actually there's no trade and still a Long order. "Huh?" it'll say.

So, I decided the best thing to do would be to cancel the order altogether, and when the current bar finishes, recalculate where the order should be placed.

i.e. No Gridding.

I know I didn't have to say all that, because it's in the Change Log. And I know that everyone reads the Change Log because it's so fantastically interesting.

Carry Trading

Carry Trading is where you buy and hold a currency in order to accrue interest payments.

For example, and this and all figures are taken from the Excel file produced at ElectricSavant.com, which in turn takes its figures from Oanda, if you buy 10,000 units of AUD/JPY at 1:50 margin, you get paid interest at 250% p.a.

250%!!

That's if the price of AUD/JPY remained static for that year. If AUD/JPY went higher, you make even more. If AUD/JPY goes lower, you might still make money if the interest payments are more than the amount you lose in terms of pips.

From that Excel file, the top ten are:
AUDJPY, Long: 250%
GBPJPY, Long: 208%
USDJPY, Long: 200%
GBPCHF, Long: 168%
USDCHF, Long: 161%
CADJPY, Long: 153%
EURAUD, Short: 130%
NZDUSD, Long: 122%
EURJPY, Long: 100%
EURGBP, Short: 87%

So I set about finding if there was some kind of fool-proof way to rake in the interest, and hedge against any potential drop in price.

The thing to note is that if you do a perfect hedge - that is you go long 10,000 units of AUD/JPY in one account, and go short 10,000 units of AUD/JPY in another, then you'll be paying your broker interest. Because here's the reverse of the top ten above:
AUDJPY, Short: -286%
GBPJPY, Short: -237%
USDJPY, Short: -239%
GBPCHF, Short: -192%
USDCHF, Short: -195%
CADJPY, Short: -189%
EURAUD, Long: -168%
NZDUSD, Short: -170%
EURJPY, Short: -137%
EURGBP, Long: -119%

The 250% interest from your long AUDJPY trade is wiped out by the -286% interest from your short.

So, what some people do is create a "Carry Basket" - a group of currencies that combined pay a high amount of interest, but the price is as flat as possible. Every day or week or so, the Carry Trader shifts money around so that the ratio of currencies owned remains fairly constant.

One such basket I read about was:
EURCHF, Long: 61%
GBPCHF, Long: 168%
EURGBP, Short: 87%
EURAUD, Short: 130%

(Actually the ratio was to buy 2x EURAUD than the others, but let's keep things simple).

What I did was, using Daily bars back to the start of 2005, worked out for each day how much interest was accrued, and how much money was gained/lost due to the fluctuations in price. Then I added those figures together to see how much money would have been made in a buy and hold strategy.

Note that I did not use compounding. Everyday the same 10,000 units of each was kept.

The end result is quite fantastic - $4500 in profit, when the margin required to buy those 40,000 units (20K in CHF, 10K in GBP, 10K in AUD) at 1:50 was about $1200. As with all these images, click on it to see the full-size version.

Carry Basket

The interest received was around $1500. Meaning $3000 came from price movement.

You can see from these charts, that the big moves in profit all come from the big moves of price in our favour (that's the yellow sections):

EURCHF:

EURCHF, Daily

GBPCHF:

GBPCHF, Daily

EURGBP:

EURGBP, Daily

EURAUD:

EURAUD, Daily

Let's instead start everything at exactly the worst time - 22-June-05. Markets do change personality, and I assume it's going to happen as soon as I place my first trade using a new system that backtested well. The cosmos might want me to succeed, but it also has a sense of humour.

Now the chart is not so good:

Carry Basket

While the interest certainly does lessen the impact of the price going in the wrong direction, it doesn't make up for it altogether. It would have been great to earn all that interest, but the only good part about it for more than a year was that without it, you would have been losing more than you were.

If you add compounding to the mix, I'm not sure the results would be much different. Buying 2x more EURAUD than the others didn't change the shape of the chart either.

So what does this mean? What's the conclusion?

I think that for some currencies, the interest is too much to ignore. However I also think that price fluctuations will always outweigh the amount of interest earned. Interest would be the icing on the cake for trades that went well, and take the bite out of trades that don't.

So... if you want to trade long-term in currency and rake in some interest, how about developing a trading system that only trades in the direction that pays out interest, and base that system on Daily or Weekly bars.

Following the normal strategy - you backtest over historical data, taking into consideration the amount of pips earned and the number of days in the trade. More is better for both. Then instead of buying and holding, and adjusting once per week, you just trade your system - place order, set stop loss. Repeat. Simple.

When I read about Carry Trading in forums, I see the words "sell when you make money", "buy more when the price is going down", "dollar-cost average". None of these make sense to me. These tactics assume the price is always going to rebound, so you're buying while it's "cheap". I don't like that kind of assumption.