Mechanical Trading possible ?

...you must have rigid rules for backtesting past charts. It's just basic common sense to me that a signal cannot be filled on the same bar that it is generated. If the price is a good price for a reversal then the time of the chart should display at least one more bar containing that price in the near future (afterwards). The only exception I can think of is the use of 'daily bars'.

Something that is done trading the S&P is the use of 60 minute bars for signals and then Tradestation will plot the system fills on a faster chart, such as a 5 minute. The 60 minute bar will generate the limit order number, and the fill or kill will be plotted on the related 5 minute (or 3 minute or 7 minute, etc.) bar.

I would definitely backtest whatever methodology 24 months at least. If you're using intraday futures data, you would have to buy the data and string the contracts together. Tickdata.com handles this with custom software. A simplier way is to take your signals off the cash index and backtest the cash index of what you are trading (futures index for instance), then apply the signals to the futures contract (the current one will do) and determine your money management of your futures entry. The cash chart would determine the approximate time and technicals, the futures chart would be adjusted for the vagaries of the futures contract.

NOTE: on many American futures contracts the institutions purposely 'fuzz up' the futures data to frustrate mechanical traders - but the cash index (that underlies the futures contract) is technically perfect (that can't be fuzzed up).

About ten years ago, I used to trade a couple NASDAQ stocks, and would use NYSE stocks and indexes to key my reversals sometimes because the NYSE issues were technically perfect, whereas the NASDAQ stocks would try to stop you out. The technicians at the NYSE played their usual games in holding back fills, but the actual bid prices were right on.

When backtesting, use a 3:1 ratio to start, although you can have Tradestation adjust this during backtesting (all my systems have adjustable parameters to find the best setups (this is called curve fitting) so I have idea an of what to expect during live trading. If I traded based on 'curve fitted' data, then my backtesting data had to be 4+ years. Anything less than that was looking thru 'rose colored glasses' imo.

You should have two completely different sets of trading rules, one for trends another for trading ranges. Look at my attachment of my mechanical 'end' of an Uptrend, for instance. Mechanically, the end of a Trading Range is similar but time & a couple different cycle components come into play that do not come into play for trends.


Good luck.

The Mechanical Day Trader
 
Thanks MD . I understand your points about the futures. I am only testing it on currencies at the moment and use its signal on equities also.

I dont have the ability to backtest any of my systems. they are all based on how i would trade manually and i test them live as i develop them. I generally know before a bar is completed whether a signal should be there or not and vice versa if one appears when it is not supposed to.

I have different sets of rules for all the differnt phases that i have identified, this includes taking smaller moves within a larger move, and avoiding small noise. Its just getting the programming right as i go along which is time consuming. I am only programming my strats into excel, not VBA as that is all i know

Point taken about no signal being generated on the same bar. :)
 
Last edited:
I've found the data on currencies is real spotty, except for major pairs, tick data is pretty horrible, so 1 minute or slower bars is advisable. Spending about $3,000 to $4,000 in programming/data is the cost of due diligence in this industry - it just depends on how much your time is worth and how you are at withstanding trading losses.

Having code backtested a minimum of 300+ trades, consistently having profits 3x greater than losses is a minimum for most of us easy language (Tradestation) slaves.

If any of you guys hire a programmer, have him give you a bid for the whole project, pay him no more than 33% ahead and make sure you have a confidentiality agreement. If they don't automatically go along with that, continue looking...there's lots of broke or semi-broke programmers out there that don't want to get a real job.;)

If you persist in doing it the seat of your pants way, you can trade reversal setups that are well known, just have profit objectives known BEFORE your trade entry, set your stop at the close of the reversal pattern, then have a set of time/price rules to keep you in the trade for the trend if/when it happens.

Remember, the speed of the chart will set the 'close' of each bar -- a good reversal pattern to trade always goes by the close of a certain bar, not the highest high or lowest low. You trade the 'close' of that certain bar, your stop is ALWAYS set just outside of that bar's close, NEVER farther away. If you set your stop far away from the close, your trading account will blow up from big losses. The key to trading reversal setups is that you KNOW a fair % of the time you're going to get a decent profit..take the small losses.

A good way to trade long is to plot your short entries until your last short entry is stopped out; when the short is stopped out, attack the market from underneath via a Long. If this doesn't work, your chart is running at the wrong speed or your trading methodology is seriously flawed.

Successful trading, I've found, requires you to have NO ego..be willing to readily accept your methodology flaws and follow Deming's Continuous Process Improvement until you reach a profitable, robust methodology.

The Mechanical Day Trader
 
Last edited:
I'd like to add something about 'curve fitting'

If you want to find the best parameters - first of all, consider the possibility that oscillators may need tweaking to suit market conditions, so it's possible that no single setting will work on both high & low volatility market conditions.

Second - pick a small timeframe - say 2 months to do your optimisation once done, run the strategy in a different timeframe - a different 2 months, then pick another 2 month period & run again. Repeat this proces & when you think you have good settings, then run it over a number of years.

I wouldn't optimize on a 5 year chart myself - I think that is the path to mediocrity. Run on a 5 year chart but optimize on a smaller period to get your settings & then run on a larger period to see how it really performs.
 
I have found another very useful material on mechanical trading:

http://www.meta-formula.com/support-files/ed-seykota-of-technical-tools.pdf

It is an interview of Ed Seykota. For those who have read Market Wizards should know he is one of the very first people to develop mechanical trading system.

So what's his view on the subject? Quote:

Should a person focus his or her time on developing mechanical or non-mechanical (judgmental) methods?

Judgmental systems are inherently mechanical. Gut traders trade according to set rules of attitude, approach and personality. But I also feel that mechanical systems are inherently judgmental. System traders typically use judgment for the enormously important tasks of rolling forward, changing bet size and adding or deleting instruments. The point is, no real conflict exists between judgment and mechanical trading. A conscious trader is aware of money management algorithms, trading systems and the need for supportive relationships. He maintains his knowledge of broad and local economic trends and remains aware of his feelings. He is also aware of how his own personality works and creates a workable ecology between himself and the world around him.
 
Good quote GCC.... trading 8:30 ET announcements I don't think could be automated, BUT each reversal before/during/after the announcement is technically correct on the E-Mini Dow. Sometimes the lettuce goes on the BLT after the Bacon, sometimes the other way around...sometimes there are two tomatoes on one sandwich, sometimes the market makes two (or more) BLT's (a trend) ...otherwise the reversal b4 the announcement is a precursor to the next reversal immediately after the profit objective is hit 2 minutes after the 8:30 announcement. Whatever, just roll with the mechanical setups.

A daytrader would use mechanical rules to measure profit objective(s), stop loss and a likely reversal point based on experience, "news" and what the dang chart looks like the past few minutes.

I'll have to disagree with Pedro01 -- one of my 5 yr optimizations revealed that the system never made money in May and September/October of each year and made a ton of money in December and March. Tradestation's optimization basically advised me when to turn the system off and to study the weekly trading reports during the losing and peak $ months. The weekly Strategy Analysis report in Tradestation is a godsend for long range optimizations. You can then do short, multi-month optimizations during peak and valley months, if your long range optimization finds these types of trends.

For daytraders, backtesting at least 300 trades - regardless of the length of time - likely puts much more confidence when it comes time to execute a system trade, imo.

The Mechanical Day Trader
 
Hi All,

I've been trading mechanically for 9 months - yes, real money, an account about $200,000 large, all intraday trades on the futures market on the CME & EUREX. My return? Well, I made about $100,000 profit - but take out $20,000 for expenses.

Having a consistently profitable trading strategy is bloody hard IMO and has to do with the randomness of the markets. The distribution of types of days in the market, you would expect, would fall under some type of normal distribution. So the days where the market would cleanly rally, or trade within a tight range, should follow some form of uniform distribution. Right? Wrong.

Look up "fat tails statistics" - that is how the market behaves. I saw a documentary on the BBC regarding the recent crisis (the Ascent of Money) that said - a normal distribution would have the market fall 2% for six days in a row something like once every 1000 years, but because the distribution of market events has "fat tails" - it is more like once every 1000 trading days.

And to me, this is the key problem with mechanical trading. People are trying to use statistics to model patterns that happen within a very large, predominantly random dataset. Any mathematician would consequently treat anything that is *derived* from this dataset with a big fat red CAUTION sign on it - people are literally "Fooled by Randomness".

Not to say it is not possible, because it is, but no matter how good your back-testing is, the market will one day do something totally out of the blue and it would be the discretionary traders IMO that would be the quickest to respond and profit. Any mechanical trader that can consistently get >100% a year is probably in the top 1% of this crowd.

Having spent years and multiple attempts at developing algorithms, execution and server monitoring infrastructure, I've probably come full circle. At the end of the day, you've (I've) really got to learn to trade.

Any prop jobs in Melbourne (or Sydney) send me a PM :LOL:
 
Top