Thursday, September 29, 2005

Example Subjective Trading System

I sometimes get suckered into paying the $69 for an e-book detailing a "fantastic" trading system. Each guarantees to tell me why 90% of traders (or 95%, depending on the website) fail, and promises to show me how I can become part of the 10% (or 5%) that succeed.

And there's always a $20 discount if I act within the next 10 minutes, or before midnight, or whatever.

And there's always free extras "worth hundreds of dollars", but only for the next 17 people, or 47 people, or whatever relatively smallish-largish prime number they've decided upon.

Anyway, when I do purchase these books, I do it with the hope that they'll introduce something new to me - a new idea I can play around with. I don't hope beyond hope that the system they describe will do me any good without change. As I said before, I think trading systems have to be individualised for them to work. In my case at least.

Here are the rules for the most recent one. I won't go in to explaining everything. Buy the book. Anyway, this system uses points to determine if a trade is allowed or not. You don't need each item to be true - if you can get 36 points it means you can enter the trade. My theory is, that actually the below describes a whole bunch of different systems - one for each way the rules can add together to equal 36 or more.

Entering on the long side (buying)
  • 8 points - Increasing positive Volume

    This could be made to be objective. You can obviously give a True/False answer as to whether today's volume is more or less than yesterday's. But, you would need to specify for how many days the volume should be increasing. Also, what if the volume is increasing, but is still less than the "average" volume? Is that a buy? To answer yes or no, it needs backtesting.

  • 8 points - Price bouncing off the support level or moving through the resistance level

    Ah my old friend, the Support and Resistance lines. I also like the words "bouncing off" and "moving through". What, exactly, do these mean? Tell me how to program this into a computer and it becomes objective, otherwise, this rule is very very subjective.

  • 8 points - Price bouncing off trendline after declining or moving through the trendline if rising

    Trendlines are just as bad as Support and Resistance lines. If you look at a chart, any chart, you'll see that sometimes there does seem to be very clearly defined places that you can put these lines. You'll also see that the price completely ignores these lines whenever it feels like.

    Again we have the words "bouncing off" and "moving through". Look at your chart again. The candles aren't always exactly above or below your lines, right? So how do you decide when a candle has "broken through"? Hindsight allowed you to put that line where you put it, and to ignore the times when the candle moved below the line. The rules change when you're doing it real-time. You don't know if it's breaking through, or if it's another of those candles that doesn't fit neatly with the line.

  • 8 points - 12 hour EMA about to cross 4 hour EMA from above to below

    Wait... does it say *about* to cross?? Oh my god. This rule relies on future knowledge.

  • 6 points - Price is above 20D Moving Average

    Hooray! An objective rule.

  • 8 points - Easily recognizable bullish chart pattern is being formed

    Dude. Seriously. "Easily recognizable"??

  • 6 points - Price approaching upper Bollinger Band

    Price *approaching* the upper Bollinger Band. What the hell does "approaching" mean?

    You could make this rule objective though, by using the %b indicator. It gives a value of 0 if the price is at the lower bollinger line, less than 0 if below it, 1 if the price is at the upper bollinger line, more than 1 if above. 0.5 should therefore be right in the middle of the two bollinger lines. So you could say if the %b value is 0.8, then give your 6 points. Or is it 0.9? Who knows? Backtest.

  • 6 points - RSI is 70 or above

    Hooray! Another objective rule.

  • 4 points - Bullish candlestick pattern

    Most of the candlestick patterns can be programmed into a computer, and are therefore objective.

So there you have it. I guess there are people that can use this system effectively, but I guess my $49 investment is the cost of this article.

Sunday, September 18, 2005

Entry Rules

Entry Rules specify exactly when an entry signal is generated.

"Buy when the high of the most recently finished price bar is higher than the previous bar" is an example. On a daily chart, this rule would translate to "buy when today's high is higher than yesterday's".

Note that the entry price has not been specified - that's for the next post. At the moment we are dealing with "Yes we can enter a trade" and "No we cannot" only (and maybe a direction for the trade, but sometimes the Entry Price we use does this for us. I'll explain about this more next post).

You might have a whole bunch of Entry Rules:
"Buy when the today's close is above the 20-day moving average"
"Buy when 20-day moving average is above the 30-day moving average"

Etcetera, getting more and more complicated.

ALL of the Entry Rules must be satisfied for a trade to be allowed. If you have the word "OR" in your system, essentially you have more than one system.

For example:
"Buy when the today's close is above the 20-day moving average"
OR "Buy when 20-day moving average is above the 30-day moving average"

is two systems - one where you can buy when today's close is above the 20-day MA, and another where you can buy when the 20-day MA is above the 30-day MA.

There's no problem with this, but I'd split them out to 2 systems so you can better judge each rule's effectiveness. If you kept it as 1 system and things go wrong, how can you tell if it's the first Entry Rule that's stopped working, or the second?

The result of adding all the Entry Rules together is a simple Yes/No answer (again, and maybe a direction for the trade). Yes - we are allowed to enter the trade. No - we are not allowed.

Sounds simple, but if it is so simple, why are we sometimes in the state of "I'm not sure"?

Your system might even specify a further rule to cover this case: "when you're in doubt - don't trade". But if the Entry Rules are specified clearly, how can there be doubt? It could only be if the system was not mechanical - if there was some subjective aspect at play. Mechanical systems have rules that you, me, your neighbour's kid, would all come up with the same answer. Systems with some kind of subjectiveness often have this "if in doubt get out" clause.

Support and Resistance (SR) lines are often the culprit.

SR lines look objective at first, but they can be placed at different prices by different people. They can be placed at different prices by the same person on different days. Unless there are mechanical rules on how to determine the location of SR lines (unlikely), they are subjective.

"Divergence" of the price from a specified indicator is also rather subjective. Divergent over what time period? Divergent by how much? If the stock price goes up a lot, but the indicator goes up only a little, is that divergence?

"Only trade in the direction of the trend" is another good one. In one of the systems I bought, a rule was "the trend is defined by the 3-month chart looking at daily candles". Easy to judge if the chart starts at the bottom left and ends at the top right. But what if it goes down for 6 weeks, and then up for 6 weeks, kind of finishing flat over the 3 month period? What's that trend - flat or up? What decision would you make if all of your other rules were screaming out for a trade entry?

The next system I bought clarified this - "If the close is above the 20-bar MA, it's an up-trend. If below, it's a down-trend". And there you have why I gravitate to mechanical systems - two systems involving "the trend", one was subjective, the other objective. One leaves you in doubt when things aren't clear cut, the other makes things rather simple.

Where To From Here?

You (well, I) need a trading system that is written down somewhere. Kind of like a checklist. Exactly like a checklist. Before entering a trade, all the Entry Rules *must* be satisfied. All of them. You can't ignore Entry Rules. If you've got 10 of them, and just 1 fails, there is no trade. There is no point to have the 10th rule if you're going to ignore it. If you want to drop it then backtest your system with and without that rule. If you get better results without it, then you can remove it. But you can't remove it just because it's in the way of a trade you want to take.

Because the rules are mechanical, there will not be much thought required. You've already backtested the system and the results were good. Now just tick off each rule. One rule not satisfied is enough to prevent the trade. All ticks means you can enter.

But at what price? That's next time.

Wait Wait Wait - How Do I Decide On Which Entry Rules To Use

You'll need to experiment. You can come across possible rules on websites, at seminars, in books, in lots of places. The short of it is though, that you have to experiment yourself so you can be satisfied.

Here's the thing - each and every indicator is included in someone's profitable system, somewhere. Guaranteed. It doesn't actually matter too much whether you stick with simple moving average crossovers, or you want to use Bollinger Bands, or Stochastics, or whatever. There'll be a way to squeeze whatever indicator you want into a profitable system. The key, I think, is experimentation and backtesting.

Here's another thing - some people swear by trend-based systems, and others believe break-out systems work, and others think everyone else is wrong and only scalping works in today's market.

It's similar to how some people swear by stocks, and others by real estate. Actually both work, but some people are more suited to one than the other. If someone tells you why real estate is so much better than stocks, it simply means they couldn't get stocks to work for them. Maybe you can. A lot of money is made everyday in both.

And so I can guarantee that there are profits to be made using all three methods - trend-following, break-outs, and scalping. If someone says one is better it means they couldn't get the other two to work. Maybe you can.

How To Determine Good Rules From Bad

The test for Entry Rules is done by placing arrows on the chart. How close to peaks and troughs do they signal entries?

Unfortunately, your Entry Rules will probably give you a chart filled with arrows. You'll really need to combine your Entry Rules with your proposed Entry Price in order to really get a picture on what your system would do. More on Entry Prices next time.

Anyway, if you'd like some ideas - here are some of the rules I've already programmed into ThinkingStuff. There'll be more. Mix 'n' match.

And please, if you have any comments, anything at all, I'd appreciate it.

Example Entry Rules

Bar Range Is More Than A Multiple Of The Average
True Range Is More Than A Multiple Of The Average
Backing Pattern
Bearish Bar
Bullish Bar
Current Close Above Previous Close
Current Close Below Previous Close
X Consecutive Eastside Bars
Every Bar
Current High Above Previous High
Current High Below Previous High
Current Low Above Previous Low
Current Low Below Previous Low
Move to Break Even After X Bars Clear Of Entry
Northern Bar
Southern Bar
X Consecutive Bars In Wrong Direction
Current Bar Swing Pattern Is Higher Peak
Current Bar Swing Pattern Is Higher Trough
Current Bar Swing Pattern Is Lower Peak
Current Bar Swing Pattern Is Lower Trough
Previous Bar Swing Pattern Was Higher Peak
Previous Bar Swing Pattern Was Higher Trough
Previous Bar Swing Pattern Was Lower Peak
Previous Bar Swing Pattern Was Lower Trough
Bar Swing High Higher Than Previous Swing High
Bar Swing High Lower Than Previous Swing High
Bar Swing High Lower Than Either Previous 2 Swing Highs
Bar Swing Low Higher Than Previous Swing Low
Bar Swing Low Higher Than Either Previous 2 Swing Lows
Bar Swing Low Lower Than Previous Swing Low
On Or After Day X Of Bar Swing
On Or Before Day X Of Bar Swing
Currently In Bar Swing Down
Currently In Bar Swing Up
%b Value Must Be Above X
Bollinger Bands Narrowing
Bollinger Bands Flaring
%b Value Must Be Below X
Close Above Lower Bollinger Line
Close Above Upper Bollinger Line
Close Below Lower Bollinger Line
Close Below Upper Bollinger Line
Close in Lower Bollinger Band
Close in Upper Bollinger Band
High Above Lower Bollinger Line
High Above Upper Bollinger Line
High Below Lower Bollinger Line
High Below Upper Bollinger Line
Low Above Lower Bollinger Line
Low Above Upper Bollinger Line
Low Below Lower Bollinger Line
Low Below Upper Bollinger Line
On Or After Day X Of Move
On Or Before Day X Of Move
ADX Is Above Both +D and -D
ADX Is Below Both +D and -D
ADX Is Falling
ADX Is Between +D and -D
ADX In Overheating
ADX In Overcooling
ADX Is Rising
-D Is Above +D
-D Is Falling
-D Is Rising
+D Is Above -D
+D Is Falling
+D Is Rising
Close Above High Of Previous X Bars
Close Below High Of Previous X Bars
High Above High Of Previous X Bars
High Below High Of Previous X Bars
Low Above High Of Previous X Bars
Low Below High Of Previous X Bars
Close Above Low Of Previous X Bars
Close Below Low Of Previous X Bars
High Above Low Of Previous X Bars
High Below Low Of Previous X Bars
Low Above Low Of Previous X Bars
Low Below Low Of Previous X Bars
MACD Histogram Peak Higher Than Previous Peak
MACD Histogram Peak Lower Than Previous Peak
MACD Histogram Peak Lower Than Either Previous 2 Peaks
Previous MACD Histogram Peak In Overbought
Current MACD Histogram Peak Peak In Overbought
Previous MACD Histogram Peak In Oversold
Current MACD Histogram Peak In Oversold
MACD Histogram Trough Higher Than Previous Trough
MACD Histogram Trough Higher Than Either Previous 2 Troughs
MACD Histogram Trough Lower Than Previous Trough
Previous MACD Histogram Trough In Oversold
Current MACD Histogram Trough In Overbought
Current MACD Histogram Trough In Oversold
Previous MACD Histogram Trough In Overbought
Previous Bar Caused MACD Histogram Peak
Previous Bar Caused MACD Histogram Trough
MACD Histogram Is Falling
MACD Histogram In Overbought
MACD Histogram In Oversold
MACD Histogram Is Rising
Current MACD Histogram Pattern Is Higher Peak
Current MACD Histogram Pattern Is Higher Trough
Current MACD Histogram Pattern Is Lower Peak
Current MACD Histogram Pattern Is Lower Trough
Previous MACD Histogram Pattern Was Higher Peak
Previous MACD Histogram Pattern Was Higher Trough
Previous MACD Histogram Pattern Was Lower Peak
Previous MACD Histogram Pattern Was Lower Trough
Current RSI Pattern Is Higher Peak
Current RSI Pattern Is Higher Trough
Current RSI Pattern Is Lower Peak
Current RSI Pattern Is Lower Trough
RSI Peak Higher Than Previous Peak
RSI Peak Lower Than Previous Peak
RSI Peak Lower Than Either Previous 2 Peaks
Previous RSI Peak In Overbought
Current RSI Peak In Overbought
Previous RSI Peak In Oversold
Current RSI Peak In Oversold
RSI Trough Higher Than Previous Trough
RSI Trough Higher Than Either Previous 2 Troughs
RSI Trough Lower Than Previous Trough
Previous RSI Trough In Oversold
Current RSI Trough In Overbought
Current RSI Trough In Oversold
Previous RSI Trough In Overbought
Previous Bar Caused RSI Peak
Previous RSI Pattern Was Higher Peak
Previous RSI Pattern Was Higher Trough
Previous RSI Pattern Was Lower Peak
Previous RSI Pattern Was Lower Trough
RSI Is Falling
RSI In Overbought
RSI In Oversold
RSI Is Rising
Previous Bar Caused RSI Trough
On Or After Day X Of Simple Moving Average Swing
On Or Before Day X Of Simple Moving Average Swing
Current SMA Swing Pattern Is Higher Peak
Current SMA Swing Pattern Is Higher Trough
Current SMA Swing Pattern Is Lower Peak
Current SMA Swing Pattern Is Lower Trough
SMA Swing High Higher Than Previous Swing High
SMA Swing High Lower Than Previous Swing High
SMA Swing High Lower Than Either Previous 2 Swing Highs
SMA Swing Low Higher Than Previous Swing Low
SMA Swing Low Higher Than Either Previous 2 Swing Lows
SMA Swing Low Lower Than Previous Swing Low
Previous SMA Swing Pattern Was Higher Peak
Previous SMA Swing Pattern Was Higher Trough
Previous SMA Swing Pattern Was Lower Peak
Previous SMA Swing Pattern Was Lower Trough
Currently In Simple Moving Average Swing Down
Currently In Simple Moving Average Swing Up
One Simple Moving Average Is Above Another
One Simple Moving Average Is Below Another
Close Above Simple Moving Average
Close Below Simple Moving Average
High Above Simple Moving Average
High Below Simple Moving Average
Low Above Simple Moving Average
Low Below Simple Moving Average
Slow Stochastic Is Falling
Slow Stochastic In Overbought
Slow Stochastic In Oversold
Slow Stochastic Is Rising
Current Slow Stochastic Pattern Is Higher Peak
Current Slow Stochastic Pattern Is Higher Trough
Current Slow Stochastic Pattern Is Lower Peak
Current Slow Stochastic Pattern Is Lower Trough
Slow Stochastic Peak Higher Than Previous Peak
Slow Stochastic Peak Lower Than Previous Peak
Slow Stochastic Peak Lower Than Either Previous 2 Peaks
Previous Slow Stochastic Peak In Overbought
Current Slow Stochastic Peak In Overbought
Previous Slow Stochastic Peak In Oversold
Current Slow Stochastic Peak In Oversold
Slow Stochastic Trough Higher Than Previous Trough
Slow Stochastic Trough Higher Than Either Previous 2 Troughs
Slow Stochastic Trough Lower Than Previous Trough
Previous Slow Stochastic Trough In Oversold
Current Slow Stochastic Trough In Overbought
Current Slow Stochastic Trough In Oversold
Previous Slow Stochastic Trough In Overbought
Previous Bar Caused Slow Stochastic Peak
Previous Slow Stochastic Pattern Was Higher Peak
Previous Slow Stochastic Pattern Was Higher Trough
Previous Slow Stochastic Pattern Was Lower Peak
Previous Slow Stochastic Pattern Was Lower Trough
Previous Bar Caused Slow Stochastic Trough

Friday, September 16, 2005

A Note Before We Start

Firstly, let me say that I am interested only in mechanical systems. "Mechanical" as in "no interpretation possible".

Secondly, you shouldn't just take some advice you read on the internet and apply it to your particular situation. You should experiment first. Does what I say make sense? Does what I say make sense for you? Does what I say bring you increased profits? Decreased losses? Lower risk? The opposite?

This information is free. Do you get what you pay for? Or are the best things in life free? That's your decision. In short, I can't be held responsible for what you do with the information I give. I'm just some guy with a website. *You* decided to take action based on what *you* thought was the best way forward.

Finally, I won't be giving "rules" per se. I'll be giving ideas. Ideas for you to play with. To experiment with. To add to your portfolio if you think they're better than what you've got now.

I've bought other people's rules on two occassions. I couldn't get either of them to work for me. I don't consider myself to be unintelligent - quite the opposite. But what I now realise is that trading rules are completely individualised and thus purchasing them is a fallacy. At least it is for me. Other people have probably made quite a bit of money trading those same rules that I couldn't get to work.

So what I think should happen when you go to a seminar, etc, is that you are given a bunch of ideas. Then you mix and match to suit your personality. Of course, it helps if the system you decide upon is profitable :-)

There is a comments section, and I really hope that people will contribute their own thoughts. Especially if you disagree with what I say.

A quick recap of terminology:

A "rule" is something like "buy when the high of the most recently finished price bar is higher than the previous bar".

Many rules combine to form a trading "system".

Monday, September 05, 2005

Trading Systems

I mentioned in this post, the one which gives away thousands of dollars of trading education (seriously), something along the lines of:
A trading "rule" is something like "RSI in overbought". A bunch of rules form a "system".

However, a system is not just about the rules for when to buy and when to sell. There's also rules for how much money to use, times of day you shouldn't buy, and so forth. These extra bits are so very incredibly important, and these are the things which prevent the loss of all your capital.

Briefly, a complete system should have:

  • Entry rules - they generate a "buy" or "don't buy" signal;

  • Entry value - the exact price at which to buy;

  • Initial stop loss value - the exact price at which you are going to sell if the trade goes against you. You ALWAYS have a stop loss - you know exactly your $ at risk;

  • Initial take profit value - the exact price at which you are going to sell if the trade goes in your favour. This is optional. Either you have a take profit, or you rely on your trade management;

  • Trade management rules - when to move your stop loss to a position of decreased risk, to a position of break-even, and eventually to locking-in profits;

  • Trade management values - the exact points at which to move the stop loss;

  • Exit rules - they generate a "get out right now" or not signal;

  • Money management - the exact amount of money you're prepared to risk on this trade. Often people go by the rule of "never risk more than 2% of your entire trading bank on any one particular trade". Or 1%. Or 3%. Or whatever;

  • When not to trade rules - tell you to stay out, even if all of the above looks fantastic. Such rules might be "don't enter any trades less than 2 hours before a major announcement" (with "major" having also been defined). "Don't bother trading 1 week before Xmas, until 1 week after New Years"-kind-of-thing;

Soon I'll be starting a series looking at each point individually. The series won't be an every day thing, probably not even every week, but we'll get there in the end :-)

Sunday, September 04, 2005

Sure. Why Not?

I have indeed decided to go ahead and make Thinking Stuff commercially available. Sure. Why not?

I'm thinking of 3 versions:
  1. Thinking Stuff Trial. PostgreSQL and Gain Capital's API have made it possible for a completely free trial version. There will be no time limit, but some features will be crippled. Hopefully you'll see just how easy creating trading systems, experimentation, and backtesting are, and you'll sign up for either of the two paid subscriptions below.

  2. Thinking Stuff Lite (US$20/month?). Designed to *save* you thousands of dollars by allowing you to backtest systems before you use them in the real world. Sure, everyone knows they're *suppposed* to paper trade a new system for a while, but...

  3. Thinking Stuff (US$50/month?). Designed to *make* you thousands of dollars by adding the automatic trade execution. Trading for a living is supposed to be about giving you freedom, not replacing one computer screen for another.

Thinking Stuff will be built for systems running Windows 2000 and above. I'll be waiting for Microsoft to officially release their new .NET product in early November, and chances are I won't be ready by then anyway. We'll have to see.

BTW, I don't know if anyone's using it, but soon I'll be removing the access to this page through http://blog.thinkingstuff.com/. If you do use that address, please change to http://www.thinkingstuff.com/blog/.

Please, as always, I appreciate any comments.