Macrotactics

Take Your Trading to a Deeper Level

Artificial Neural Nets (Part 2 - Bogie-NN)

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 4 out of 5)
Loading ... Loading ...

In my previous article I introduced the topic of neural nets in trading. In this article I want to review a specific neural net: Bogie-NN as a way of getting more in depth around neural nets.

Bogie-NN

Bogie-NN was the second place winner in the 2007 automated trading championships. Between the 1st of October and the 21st of December 2007, Bogie-NN managed to trade $30,000 up to $55,033.10, representing a stellar return of 83% over 3 months.

200808130811.jpg

Since placing 2nd in the competition, William Boatright, the creator of Bogie-NN, has made it available on his website for $49.50 per month. You can also download a demo version of Bogie here, but the demo version expires in September so be quick if you want to have a look at it. If you do decide to sign up and buy bogie-NN, CK on his blog and mailing list has a 20% off deal.

How does it work?

Bogie-NN is a Metatrader 4 expert advisor. Like all commercial expert advisors, bogie-NN is a grey box trading system, where you can control and optimize some of the parameters of the system, but the internals of the system are proprietary.

Out of the box, Bogie-NN, comes with installation and optimization instructions and an installer. The installer drops two key files into your metatrader installation: an expert advisor (the system which does the trades) and a custom indicator (used by the expert advisor to trigger trades).

The expert advisor implements a trend trading system and allows you to control a number of properties around trade management including:

  • Risk (%) - as the name indicates this variable determines the percentage of the account to risk per trade. An alternative to Risk is the lots variable which allows the trader to set a fixed set of lots to trade instead of a percentage to risk
  • Take Profit, Stop Loss and Trailing Stop let you manage when trades are exited
  • Buy Trigger and Sell Trigger determine when you enter (see a discussion of the Bogie-NN indicator below for how this is used)
  • You can set which days not to trade
  • You can set wether to use mini-sized lots or not and you can set if you want to use pipettes

Unlike other commercial EAs, Bogie-NN does not come with a forum for support. All support is conducted through email.

The real black box part of bogie-NN seems to be the bogie-NN indicator. The indicator is the part of the system which has been trained by a neural net and is used to identify suitable entry points in a trend. The details of how it was trained remains a mystery. In an audio interview with the William by CK and some of his trading buddies, all we know is Bogie-NN is a 3 layer neural net. William did not disclose more than that (however keep reading - and we will try and get to the bottom of how the indicator actually works later in this article).

The indicator seems to be an oscillator, like a Stochastic %K or an RSI, which ranges between 0 and 100. Like all oscillators, I suspect 100 represents the possible over-bought top of the market and 0 represents the possible over-sold bottom. The indicator is used to determine entries and exits. If the indicator rises above the buy trigger level Bogie-NN will do a long entry. If the indicator sinks below the sell trigger level Bogie-NN will do a short entry.

indicator.png

The Bogie-NN indicator looks like it is a stochastic that is dampened somehow. For example, if you overlay it with a stochastic %K (12/5/5 period), you will see the oscillations are similar, but the stochastic swings more widely.

indicator.png

Bogie-NN comes in at least 2 different flavors:

  • Bogie-ATC2007-1 (the system used in the automated trading championship); and
  • Bogie-NN-v8 (an enhancement of the trading championship Bogie)
The big difference between the pre and post championship version seems to be a trend filter and some additional trade management tools (mentioned above). The ATC version didn’t have a trend filter. As the Euro trended heavily during the competition, the filter wasn’t required. However, when Bogie-NN was made available commercially, the Euro ranged heavily at the start of 2008 and as a result it cost some customers heavily. To counter this, WIlliam added a trend filter into Bogie-NN-v8 to ensure that this would not happen again. Again, William was never clear about how the actual trend filter actually works,

Performance

As mentioned above, in the 2007 trading championship Bogie-NN produced an 82% return over a 3 month period (i.e. around 22% per month compounding). CK on his blog has forward tested Bogie-NN-V8 and managed to replicate a similar result. He managed to produce an 87% return over about a 4 month period between late-May to mid-August (i.e. around 17% per month compounding) with a maximum drawdown of around 19 - 20%.

It is not clear what settings William used in the 2007 ATC he used to achieve his outcome, but if you run a back test over the same period of the competition using his default settings, you need to commit to about 10% risk to achieve the same outcome (5% is what William normally recommends).

If you back test the system, it seems that the system is sensitive to wether or not the market is trending. Even if you use the newer Bogie-NN-v8 and trade it between March and April of this year it would return a loss as the market was ranging in that period. So it seems the new trending filter is not necessarily every thing it could be, but at least it stops you from draining your account too heavily.

In my case I have been forward testing Bogie-NN-v8 for the last month and Bogie has recorded a loss. During this period, the Euro has declined substantially. It seems that Bogie seems to have an edge in a bullish market, but not in a bearish market. If you back test Bogie during bearish periods it doesn’t seem to perform well at all. Why this is the case is not clear to me. I guess more will be revealed when we open the black box.

Breaking Open the Black Box

As I mentioned above, the Bogie indicator is somewhat of a black box. William is reluctant to reveal much about the neural net he used to construct it. However, if you go to the forex-tsd site, you will see a thread indicating that William may not have built the indicator himself, but instead he took it from a tutorial on the snowcron site on how to build neural net based trading systems. To demonstrate the point, the 2 indicators were lined up side by side and they seem to match each other perfectly.
200808132037.jpg
If you want to play with the snowcron EA, the code for the EA is available here and the indicator is available here.
In CK’s interview with William he denied that he had used the indicator from this site, and that in fact what had happened was one of the organizers of the ATC competition took his code, decompiled it and posted it on the internet. However, I am somewhat skeptical of this. First, if you actually sit down and read the snowcron tutorial, you will see a full tutorial where the author starts from first principles and describes the evolution of how the indicator was built. Second if you consult the Internet Archive, you will see that the snowcron site had published the indicator first in July of 2007, which is 3 months before the start of the ATC competition. We will never know the truth of what actually went on.  Anyway, what really matters more to me is understanding how Bogie works and why it won the trading competition.
If you read the snowcron tutorial, the author makes it clear that he is providing a tutorial on how to develop a neural net based trading systems and not trying to provide a fully fledged trading system. He leaves that up to the reader as an exercise. So you should realize that the Bogie indicator has several limitations as a result of the tutorial nature of the article.
The article itself is fascinating. I read it on the bus the morning and it really engaged me. How the indicator was developed is the author first selected an indicator and then wrote a trading system to trade that indicator in a way which cheats by peaking into the future. This gave him the overall framework for the trading system and helped him identify the theoretical limits of what is possible with the system a system that is able to predict the future perfectly. He then trained a 3 layer feed forward neural net using back propagation to be able to predict future values of the indicator. The neural net was trained using the Cortex Toolkit. Once he had a stable version of the neural net, he then took his trading system and replaced the code which did the impossible and peaked forward into the future with code which was trained by the neural net.
Many moons ago, when I finished my computer science degree, one of my lecturers mentioned in Artificial Intelligence class that training neural nets was like teaching children. You cannot just give them anything and hope they will make sense of it, instead you need to be very selective about the learning material you give them to learn from. This is very much the case for the neural network presented in the snowcron tutorial in two ways:
  • The first thing to remember is that while neural nets cannot think, but they can be trained to do pattern recognition really well. Furthermore, you cannot train a neural net to recognize arbitrary patterns. You need to train it to do a specific task. In the tutorial the author trained the network on a strong bull trend during 2003/2004 on the EUR/USD. This means the bogie-NN is highly efficient at trading bull trends on the EUR/USD, but will suck in other conditions or on other pairs; and
  • The second thing to note is around the kinds of inputs you provide it. Many neophytes will take a neural net and feed it every indicator under the sun and pray that the net will find patterns. This is just wishful thinking. The selection of indicators you choose to train a neural net is just as important as the selection of indicators that you will use in every day trading. You need to pick appropriate indicators. For example, the stochastic is very susceptible to whipsaws. If the market is caught in an untradeable tight range the stochastic will swing around just as widely as it will in a tradeable wide range and is not very helpful for mechanical systems. Therefore to accommodate this author presents his own “Normalize on Condition (NOC)” indicator. The indicator is similar to a stochastic, but when the historical high / low is quite tight, a reference range is substituted. This means the NOC behaves like a dampened stochastic which is less susceptible to whipsaws. This in turn means large amounts of noise is filtered out of the input data used to train the neural network.
Closing Thoughts

Seneca once wrote that “Luck is what happens when preparation meets opportunity”, I believe Bogie-NNs performance is a beautiful example of this principle. Bogie-NN is a neural net based trading system that has been exclusively trained to trade bullish trends on the EUR/USD. Given the EUR/USD trended bullishly during the 2007 ATC, Bogie-NN cleaned up. Even if WIlliam didn’t develop the code behind the Bogie-NN indicator, he does deserve the credit for preparing for the 2007 ATC and taking advantage of the opportunity EUR/USD offered. He also should be given credit for following through and picking up the subsequent opportunity connected to his high profile second place which gave him the chance to build up Bogie Enterprises.
So should you trade Bogie-NN (or the free one)?
That is entirely up to you. Although you should realize that Bogie-NN and the free one are not general purpose holy grail systems that can be turned and then you sit back and sip Long Island Teas while you rake the money in. You should be very carful in trading this system during ranging markets, bearish trends or on pairs other than the EUR/USD, as it is not trained for it. However, if there is a bull trend on the EUR/USD you should jump in with this system, because odds are you will make money.
Should you rent Bogie-NN from William or use the free one?
Again, that is entirely up to you. I think William is providing a value add to this system and he does give you support for it. If you are inexperienced you could do no worse than to pay $40-$50 a month from William and have him help you. Also if WIlliam provided an online support forum, advice on when to turn his system on and access to other NN based systems trained for other market conditions, the monthly subscription would be well worth it.
However, if you are more experienced, you could probably make do with the free one and you can add your own twists and variations. If you are more experienced, the one thing to watch is the discussion on the forex-tsd forums. If the guys there manage to get Cortex to do their bidding and retrain a set of indicators for other pairs and other market conditions, then you will have an awesome set of trading tools to add to your arsenal.

Leave a Reply

Ad Zone