Wednesday 13 August 2008

WHAT IS A COMPLETE, MECHANICAL TRADING SYSTEM?

One of the problems with Trading early trading was that his “system” only provided entry signals, leaving the determination of exits to subjective judgment; it was not, therefore, a complete, mechanical trading system.
A complete, mechanical trading system, one that can be tested and employed in a totally objective fashion, without requiring human judgment, must provide both entries and exits. To be truly complete, a mechanical system must explicitly provide the following information:
1. When and how, and possibly at what price, to enter the market
2. When and how, and possibly at what price, to exit the market with a loss
3. When and how, and possibly at what price, to exit the market with a profit

WHAT ARE GOOD ENTRIES AND EXITS?

Given a mechanical trading system that contains an entry model to generate entry orders and an exit model to generate exit orders (including those required for money management), how are the entries and exits evaluated to determine whether they are good?
In other words, what constitutes a good entry or exit?
Notice we used the terms entry orders and exit orders, not entry or exit signals.
Why?
Because “signals” are too ambiguous.
Does a buy “signal” mean that
one should buy at the open of the next bar, or buy using a stop or limit order? And
if so, at what price? In response to a “signal” to exit a long position, does the exit occur at the close, on a profit target, or perhaps on a money management stop?
Each of these orders will have different consequences in terms of the results achieved.

THE SCIENTIFIC APPROACH TO SYSTEM DEVELOPMENT

This is intended to accomplish a systematic and detailed analysis of the individual components that make up a complete trading system. We are proposing nothing less than a scientific study of entries, exits, and other trading system elements.
The basic substance of the scientific approach as applied herein is as f0110ws:

1. The object of study, in this case a trading system (or one or more of its elements), must be either directly or indirectly observable, preferably
without dependence on subjective judgment, something easily achieved with proper testing and simulation software when working with complete
mechanical trading systems.

2. An orderly means for assessing the behavior of the object of study must
be available, which, in the case of trading systems, is back-testing over
long periods of historical data, together with, if appropriate, the application of various models of statistical inference, the aim of the latter being to provide a fix or reckoning of how likely a system is to hold up in the future and on different samples of data.

TOOLS AND MATERIALS NEEDED FOR THE CIENTIFIC APPROACH

Before applying the scientific approach to the study of the markets, a number of things must be considered.
First, a universe of reliable market data on which to perform back-testing and statistical analyses must be available. Since this book is focused on commodities trading, the market data used as the basis for our universe on an end-of-day time frame will be a subset of the diverse set of markets supplied by Pinnacle Data Corporation: these include the agricultural, metals, energy resources, bonds, currencies, and market indices.
Intraday time-frame trading is not addressed in this book, although it is one of our primary areas of interest that may be pursued in a subsequent volume.

TYPES OF DATA


Commodities pricing data is available for individual or continuous contracts. Individual contract data consists of quotations for individual commodities contracts.
At any given time, there may be several contracts actively trading.
Most speculators trade the front-month contracts, those that are most liquid and closest to expiration, but are not yet past first notice date. As each contract nears expiration, or passes first notice date, the trader “rolls over” any open position into the next contract.

Working with individual contracts, therefore, can add a great deal of complexity to simulations and tests.

Not only must trades directly generated by the trading system be dealt with, but the system developer must also correctly handle rollovers and the selection of appropriate contracts.

DATA TIME FRAMES

Data may be used in its natural time frame or may need to be processed into a different time frame.
Depending on the time frame being traded and on the nature of the trading system, individual ticks, 5.minute bars, 20-minute bars, or daily, weekly, fortnightly (bimonthly), monthly, quarterly, or even yearly data may be necessary.
A data source usually has a natural time frame.
For example, when collecting intraday data, the natural time frame is the tick. The tick is an elastic time frame:
Sometimes ticks come fast and furious, other times sporadically with long intervals between them.

The day is the natural time frame for end-of-day pricing data.
For other kinds of data, the natural time frame may be bimonthly, as is the case for the Commitment of Traders releases; or it may be quarterly, typical of company earnings reports.

DATA QUALITY

Data quality varies from excellent to awful. Since bad data can wreak havoc with all forms of analysis, lead to misleading results, and waste precious time, the best data that can be found when running tests and trading simulations.
Some forecasting models, including those based on neural networks, can be exceedingly sensitive to a few errant data points; in such cases, the need for clean, error-free data is extremely important. Time spent finding good data, and then giving it a final scrubbing, is time well spent.
Data errors take many forms, some more innocuous than others. In real-time trading, for example, ticks are occasionally received that have extremely deviant, if not obviously impossible, prices.

The S&P 500 may appear to be trading at 952.00 one moment and at 250.50 the next! Is this the ultimate market crash?
No-a few seconds later, another tick will come along, indicating the S&P 500 is again trading at 952.00 or thereabouts.

What happened? A bad tick, a “noise spike,” occurred in the data.
This kind of data error, if not detected and eliminated, can skew the results produced by almost any mechanical trading model.