Archive for the ‘System Trading Nuts and Bolts’ Category

Evaluating the Fitness of a Fitness Function

November 9, 2009

The walk-forward process of system development is the final test of a system before real capital gets allocated. It validates the system on out-sample data, or data that hasn’t been peeked at during development. It’s not very complicated, really. You optimize your system on a range of data and then choose the best parameter set to trade with in the out-sample period. Then you observe the results and determine if the system warrants any capital investment. As with most things in system trading, you need to make a decision on how you approach this idea of picking the best parameter set. Who or what decides what is best? The arbiter is known as a fitness function, because it determines which parameter set is best suited for future trading. Not all fitness functions are created equal though. Let’s look at three fitness functions and see how they offer different results. (more…)

A Short List of Candidates

November 6, 2009

You can’t trade everything. Well, at least you can’t trade everything well. At some point, you should limit the universe of things you trade. And it’s okay. You don’t need to trade everything because quite frankly, nobody knows what you’re talking about anyway at the weekend cocktail party, and they don’t care. I implore you to be prudent in this way: commit to trading a specific world of underlyings, and quit chasing bright lights in the depths of the ocean, like everyone’s favorite Nemo character, Dory the Blue Tang. (more…)

System Trading is Quicksand without the Quick

October 28, 2009

Perhaps the best way to describe the path to system trading is slogging. It’s like one of those dreams where you’re trying to run in the sand, and it keeps sinking. And then it starts to rain and the wind starts blowing you backwards. Like many things related to trading, system trading sounds simple on its face, but becomes increasingly elusive as one pursues it. (more…)

Are you related to Perfect Profit?

October 9, 2009

Okay, by now you’ve probably discovered you are not the perfect trader. You are but a fraction (if that) of the money-banking machine. He is no longer your friend, this creature known as Perfect Profit is your competition. Now that you’ve formally met your competition, what is the family resemblance between your equity curve and Perfect Profit’s equity curve? Are you brother and sister, second cousins or do you need to go all the way back to Tiktaalik roseae to find a common gene? On the practical level, what is the correlation between your equity curve and Perfect Profit’s equity curve? (more…)

How close are you to perfect?

October 8, 2009

Becoming the perfect trader is no easy task, and I daresay that nobody has been able to achieve this great feat. The perfect trader buys at the absolute low of the day and sells at the absolute high. And depending on whether the high happens first or the low happens first determines if he is long or short for the day. It’s really easy to calculate this metric. It is simply the absolute value of the daily range or the high minus the low. (more…)

Upcoming Classes, Objects, Properties and Methods

September 15, 2009

Maybe I’m doing a little too much programming lately, but I’ve decided to lay out my plans for system development into classes and objects. This is more than just creating a super-duper trading system that uses data mining as its justification for massive, unheard-of returns. And it’s more than just creating a ‘system.’ It’s about a style of trading that uses systems, but more in the manner of a symphony and less in the manner of a 3rd grade recorder. I’ll be organizing systems under different classes. An instance of a class of systems will be an object, which itself contains properties that makes it unique from other objects within the class. Getting a little programmy for you? Not to worry. I’ve laid out some of what’s in store below.

So far I’ve shared the development of the Bumblebee trading system. It is a rules-based system, meaning it trades off signals derived from a single market that are clearly defined. The long entry for Bumblebee is when the fast moving average closes above the upper Bollinger band of the slow moving average. That’s an example of a rule-based trigger. Now let’s start organizing.

Bumblebee is an object of the class of systems known as rules-based systems. More specifically, it belongs to the Insect class of trading systems.

Insect Trading Systems (class)

These systems use price action and technical indicators to trigger entries and exits. The source of the price action and the inputs to technical indicators is the market that is traded.

Bird Trading Systems (class)

These systems use intermarket data to trigger entries and exits. Slightly more complicated than the Insect class, Bird class systems include data about what a separate market is doing to trigger trades.

Safari Animal Trading Systems (class)

These systems use neural networks with either basic back-propagation or radial net algorithms, or kernel regression modeling. The inputs into the network can include a wide-range of data. Because of greater jeopardy to overfitting, these systems deploy neural network outputs as enhancements to already viable trading strategies. Too many neural networks have blown up trading accounts, and we’re not going to let that happen here.

Dinosaur Trading Systems (class)

Reserved for more advanced strategies that may use multiple neural networks, for example.

So from that simple outline, one can easily see that the Bumblebee system uses rules to trigger trades, and that its triggering data is all derived from the market to be traded. You likely don’t know about my Pelican trading system, but you can tell from its name that it is an intermarket system that uses data from a separate market to trigger trades.

Now I’d like to designate some properties. We will be using a simple color system that will sound familiar to parents whose children participate in martial arts.

The color property of a system designates the version of the system. The first color is White. White Bumblebee is the first version of the Bumblebee trading system, and the one for which the code, backtesting, optimization profile, etc are publicly available here. Later versions will follow the following order:

Yellow: second version
Purple: third version
Orange: fourth version
Green: fifth version
Blue: sixth version
Brown: seventh version
Red: eighth version
Black: ninth version

There, that’s simple, no?

But we’re just coming to the place where it all comes together. Systems are not going to be traded as stand-alone toys. Instead, they will be grouped together and traded together. They will all play in the same sandbox. And that leads us to a new class known as box. The box is a trading system that incorporates more than one trading system. So the White Box includes the following systems, for example:

White Bumblebee
White Firefly
White Finch
White Zebra

Our White Box trading system incorporates two simple rules-based systems, one inter-market system and one neural network system. The Box’s ‘White’ property signifies that the Box includes only White trading systems and only trades single contracts.

More advanced boxes will follow the same color scheme mentioned above and will get progressively more complex to include more advanced money management schemes, and neural network-based constrictors and expanders, meaning it will have the ability to adapt capital allotments to different systems and markets.

You may be wondering what a particular instance of the White Box system would be. We have designated the Box as a class and White as a property, but there is no Object. Not to worry, each instance of the White Box will be given a name that will differentiate it from other White Boxes. A specific instance of the White Box could include any number of white systems and trade any number of markets, so each time a White Box is created, it will be given a hurricane name.

There, that completes the overview.

This should be fun.