Australian (ASX) Stock Market Forum

Developing a mechanical system from scratch

I see, its like the vix for bonds....volatility has dropped so much, so thats why system did well recently and not in the past. The market has changed.

Thanks Sinner.


CanOz
 
I see, its like the vix for bonds....volatility has dropped so much, so thats why system did well recently and not in the past. The market has changed.
Thanks Sinner.
CanOz

Your system is probably robust where a specific type of volatility is present. No point trying to trade it in a market where that volatility isn't present. You can write filters for that kind of thing ;)
 
Yeah, i was trading a system for a while that used the vix as a filter, more looking for selling climaxes for counter trend plays. I was thinking of plotting the vix alongside my indices and looking for a level of volatility that may increase the success rate. Makes sense.

Actually the DAX has been the most successful because it uses a volatility filter that only works on the DAX. I've got more data for the DAX now so I'll give that a go shortly.

Thanks for the inspiration Sinner...!

CanOz
 
This is the Hang Seng with an optimized ATR trail and trade carry over to the next session..:eek:..yeah i know but i does some sweet things to the PF.

CanOz
 

Attachments

  • HSI carry over ND.PNG
    HSI carry over ND.PNG
    54.7 KB · Views: 6
  • HSI carry over ND EQ.PNG
    HSI carry over ND EQ.PNG
    65.5 KB · Views: 5
This is the Hang Seng with an optimized ATR trail and trade carry over to the next session..:eek:..yeah i know but i does some sweet things to the PF.

CanOz

I reckon if you check you'll find on the good days you don't need the stop and on the bad days any sane stop will do. Looking at your scatter I'd say -20,000

If you're gonna optimise, why not see what the best opening range width (or duration, or combination) is? Or how many days you can hold for i.e. 1,2,3 day returns...
 
The DAX is untradeable. In desperate need another filter of some sort.:pc:

CanOz
 

Attachments

  • DAX ORB optm.png
    DAX ORB optm.png
    60.5 KB · Views: 9
I discovered today, that i don't need a volatility filter. I can achieve the same thing by re-optimizing a system every quarter or when needed based on the present state of the market according to a measure of the volatility of the market, or the systems equity curve.

This, i discovered by trialing a reasonably well know system that does exactly that. I believe this system (locked code for the trial period) does a similar thing as my system to get into the market, but it has a much better system of stops, my ATR Trail is notoriously poor, as i just found out.

Check out this EC of the trial system on the HSI. This is with 4 points of slippage each way and commissions.

Now the dilemma, do i just lease/purchase the open code for this system, or put more money and time into coding my own system at a similar cost?

This is hard to beat...it works on the DAX, the HSI and the SPI at 1, 5 and 60 minute time frames.:confused:


CanOz
 

Attachments

  • HSI EC.PNG
    HSI EC.PNG
    55.7 KB · Views: 16
This is sweet...
 

Attachments

  • DAX EC razor.PNG
    DAX EC razor.PNG
    71.7 KB · Views: 12
Yes Canoz must be tempting to buy the system and trade it , if you bought the open code at least it is a learning excerise as well but depends how much it is I guess
 
Yes Canoz must be tempting to buy the system and trade it , if you bought the open code at least it is a learning excerise as well but depends how much it is I guess

That HSI is the real attraction...a win rate of 75%.

The DAX is 47%, still doable.

Lots of work to do yet though Waza.

CanOz
 
Check out this system that trades 5 contracts on the HSI. It scalps for quick profits and only trades for the opening 45 minutes. It back tests over as much OOS data as i can throw at it with the same results.

Can anyone tell me the problem with it? OR at least what i suspect the problem is...

CanOz
 

Attachments

  • HSI Scalper TT.PNG
    HSI Scalper TT.PNG
    55.1 KB · Views: 10
  • HSI Scalper SPS.PNG
    HSI Scalper SPS.PNG
    46.5 KB · Views: 18
  • HSI Scalper.PNG
    HSI Scalper.PNG
    27.3 KB · Views: 9
  • HSI Scalper ERD.PNG
    HSI Scalper ERD.PNG
    54.3 KB · Views: 9
Check out this system that trades 5 contracts on the HSI. It scalps for quick profits and only trades for the opening 45 minutes. It back tests over as much OOS data as i can throw at it with the same results.

Can anyone tell me the problem with it? OR at least what i suspect the problem is...

CanOz

Hi CanOz --

The results look too good. Suspect either some untradable condition or a future leak.

What is the system you are considering leasing? Name? Publisher? URL?

Howard
 
Re: Developing a mechanical system from scratch - Van Tharp

http://www.traderplanet.com/newsletter_articles/view/8068/distribution:8/

in mistakes.

So let’s look at the psychology of trading from the angle of mistakes. When you don’t follow your rules, you make a mistake. It’s that simple. And making the same mistake repeatedly is called self-sabotage. Self sabotage is another area of psychology rich with the opportunity for understanding yourself to improve your trading results. Here, however, we’ll focus on mistakes relating to some broad categories of traders.

First, let me introduce one way to measure mistakes' impact on your trading. Trader efficiency is a measure of how effective a trader is in making mistake free trades. So a person who makes five mistakes in 100 trades is 95% efficient. In the last five years I’ve requested that my Super Traders document their mistakes so that we can look at their efficiency levels. I have found that 95% is actually a very good trading efficiency level; many traders can’t even trade at 75% efficiency””which is terrible. That’s one mistake in about every four trades. This is most important for one category of traders: rule-based discretionary traders. In my opinion, when rule based discretionary traders become efficient, they are by far the best type of trader.

There are two other groups of traders I’d like to talk about: 1) mechanical traders and 2) no-rule discretionary traders.

First, we’ll look at mechanical traders. Mechanical traders believe that they can eliminate psychologically related trading problems by becoming mechanical. Many people aspire to be mechanical traders, letting a computer make all the decisions for them, because they believe it factors out many human-based errors.

In fact, one of my best trader friends said to me once that psychology didn’t enter into his trading because his operation was totally automated. My response was “You could decide not to take a trade.” About 18 years after I made that statement, his CTA business closed down. His partner decided against taking one trade””the trade that would have made their entire year had they taken it.

I’ve always said that people can only trade their beliefs about the market, so let’s look at some of the most important beliefs that a pure mechanical trader might have:

With mechanical trading, I can be objective and not make mistakes (except the psychological mistake of overriding my system).

Mechanical trading is objective. My system testing will allow me to determine my future results.

Mechanical trading is accurate.

If a system’s underlying logic cannot be turned into a mechanical trading system, it probably isn’t worth trading.

Human judgment is too prone to errors. I can eliminate those through mechanical trading.

So then, is mechanical trading truly objective? I tend to think not because there are all sorts of errors that can creep into an automated trading system: data errors, errors in the software platform, errors in your own programming, and many more. (Interestingly, one of the main categories of errors that my Super Traders come up with consistently is programming errors.)

Let’s consider data errors. Is your data accurate or does it have bad ticks and other issues with it? Mechanical traders are always dealing with data errors of some sort. For example, price errors can show up in streaming data quite regularly. Sometimes those are resolved within seconds and the error “disappears” but, by that point, the bad data may have triggered a trade already. Additionally, historical stock data may or may not have dividend and split adjustments. And what happens when a company goes bankrupt? What if it goes private or is bought out by another company? Those companies’ data may simply disappear from your data set.

I once wanted to research an efficient stock trading system. We looked for efficient stocks (moving up without much noise) and bought them with a 25% trailing stop. We had an S&P 500 data set going back 40 years that was supposed to be clean and adjusted for splits and dividends. I was very pleased with the results because my system made a small fortune. I didn’t realize this at the time, however, but the system traded on “inside information.” Because of the data set, I was able to buy stocks at the IPO that would later become part of the S&P 500. Thus, my system, in back test, bought Microsoft, EBay, Intel, and many other companies before anyone knew they would become part of the S&P 500. Why? Because, as I said, my data set was today’s S&P 500 going back 40 years.

And what about Thursday May 6th, 2010? The Dow Jones dropped 1,000 points in the space of about 20 minutes. Blue chip stocks like Procter & Gamble dropped over 20 points, and Accenture even went to a penny per share briefly. While there may not have been one root cause for that mini-crash, it had a major effect on mechanical trading systems. Things like that happen in the markets; such are the challenges (error/mistakes) for mechanical systems. (That afternoon’s swing affected lots of regular traders, too. One client said he used 25% trailing stops on all of his positions and got stopped out of every single stock.)

Meanwhile, one of our instructors, Ken Long, trades rule-based discretionary systems and made 100R in that same week. As always, he was very conservative in his trading and very careful to make sure that he fully managed his risk.

There is another class of error that is made by mechanical trading systems: the error of omission. Because the criteria by which trade setups and entries are so precisely defined, mechanical systems miss many good (or great) trades that a discretionary trader would spot easily.

For example, suppose your systems screens for five consecutive lower closes. After you get five consecutive lower closes you then look for an inside day. Now you have your full setup. Your entry is a few cents above yesterday’s high.

So let’s look at some examples of other entry signals you might miss by being so precise. You could have four down days that were extreme””perhaps the price is down 30%. Or you could have less than four down days that where the price is 30% lower or more. However, neither of those example would be an adequate down move according to your strict mechanical criteria.

Let’s say you found something that had five days of new lower lows but the fifth down day might open on a new low and then close on a new high. That’s usually an extremely bullish signal, but you’d miss it by your precise definition. Or, you could have five days of lower closes and the sixth day opens on a new low but closes on a new high. Thus, the precise entry definition would miss a trade opportunity with even more weakness followed by an extreme bullish signal.

There are a lot more variations of this entry that a mechanical system would miss, but you get the point. As soon as you state your rules so precisely that a computer can execute the trades, you open yourself to errors of omission””good or outstanding trades that your automated system cannot take because of its precision. Those missed opportunities don’t qualify as mistakes but they severely limit the potential results of the underlying logic behind the system. The mechanical system results will look rather weak next to the results of a trader who used that same system and was allowed some discretion to take the all of those other trades that didn’t quite fit the precise mechanical system rules.

Next week we’ll look at mistakes and another type of trader: the no-rule discretionary traders.

-------------------------------------------------------------------------------------

Dr. Van K. Tharp is the founder and president of the Van Tharp Institute and stands out as an international leader among professional trading coaches and consultants. Helping others become the best trader or investor that they can be has been Tharp’s mission since 1982.

Tharp collected more than 5,000 successful trading profiles in a 10-year study of individual traders and investors
 
Re: Developing a mechanical system from scratch - Van Tharp

First, let me introduce one way to measure mistakes' impact on your trading. Trader efficiency is a measure of how effective a trader is in making mistake free trades. So a person who makes five mistakes in 100 trades is 95% efficient. In the last five years I’ve requested that my Super Traders document their mistakes so that we can look at their efficiency levels. I have found that 95% is actually a very good trading efficiency level; many traders can’t even trade at 75% efficiency””which is terrible. That’s one mistake in about every four trades.

He's taking the p!ss.... surely??!!

:freak3:
 
Re: Developing a mechanical system from scratch - Van Tharp

He's taking the p!ss.... surely??!!

:freak3:

This is Rhetoric pumped out of their media department in volumes on a daily basis.
Designed to have Joe Average feel that he needs to be one of these " Super Traders "
So they better sign up NOW.---before Super Trader status runs out!

I get these pages en mass from Traders Help desk/Elliott/Van Tharp/Tradeguider/Daily.

Just full of Wha Wha.
Truth is they are finding the markets exactly as we are ---tough!

Just read the complete artical.
No time at the moment but remind me if I forget to answer it!
 
Yeah this guy seems to spout a lot of hot air. Based on a recommendation on this site, I picked up his book the other day (my first book on trading), but only managed a page or two before the dross was overwhelming ...
 
Re: Developing a mechanical system from scratch - Van Tharp

http://www.traderplanet.com/newsletter_articles/view/8068/distribution:8/

in mistakes.

So let’s look at the psychology of trading from the angle of mistakes. When you don’t follow your rules, you make a mistake. It’s that simple. And making the same mistake repeatedly is called self-sabotage. Self sabotage is another area of psychology rich with the opportunity for understanding yourself to improve your trading results. Here, however, we’ll focus on mistakes relating to some broad categories of traders.

First, let me introduce one way to measure mistakes' impact on your trading. Trader efficiency is a measure of how effective a trader is in making mistake free trades. So a person who makes five mistakes in 100 trades is 95% efficient. In the last five years I’ve requested that my Super Traders document their mistakes so that we can look at their efficiency levels. I have found that 95% is actually a very good trading efficiency level; many traders can’t even trade at 75% efficiency””which is terrible. That’s one mistake in about every four trades. This is most important for one category of traders: rule-based discretionary traders. In my opinion, when rule based discretionary traders become efficient, they are by far the best type of trader.

Further to my other reply.
I find this comment suspicious.
If a Rule based discretionary trader is compared to a Rule based Systems trader it is seen by this guy as a distinct advantage to be able to select any trade in which the rules apply at his discretion.
In other words he or his super traders are able to select from those stocks chosen by the "Rules" that will
Not be stopped
Will out perform others.
Now I have discretionary filters that I dont programme into my systems so I "think" Im clever enough to out fox everyone else.
Truth is what Im trying to do is out perform the mean of my systems---or rule base.
Under Montecarlo analysis my ---and everyone elses--rule based trading will have deviations each side of the mean. So we attempt to get on the up side of results above our mean---its human nature.
Over all Im above it--the mean--but not well above it.
Im still taking a trade that is chosen by the rules and due to capital restraints not every trade---every portfolio trader has the same dilema.

There are two other groups of traders I’d like to talk about: 1) mechanical traders and 2) no-rule discretionary traders.

First, we’ll look at mechanical traders. Mechanical traders believe that they can eliminate psychologically related trading problems by becoming mechanical. Many people aspire to be mechanical traders, letting a computer make all the decisions for them, because they believe it factors out many human-based errors.

In fact, one of my best trader friends said to me once that psychology didn’t enter into his trading because his operation was totally automated. My response was “You could decide not to take a trade.” About 18 years after I made that statement, his CTA business closed down. His partner decided against taking one trade””the trade that would have made their entire year had they taken it.

Again very suspicious.
The one trade which in HINDSITE left a years opportunity un collected!
His partner decided not to take the trade not the systems trader!!
His CTA business closed down----inferring it was due to his system---sounds like a story--you know Snow white--etal.

I’ve always said that people can only trade their beliefs about the market, so let’s look at some of the most important beliefs that a pure mechanical trader might have:

With mechanical trading, I can be objective and not make mistakes (except the psychological mistake of overriding my system).

Mechanical trading is objective. My system testing will allow me to determine my future results.

Mechanical trading is accurate.

If a system’s underlying logic cannot be turned into a mechanical trading system, it probably isn’t worth trading.

Human judgment is too prone to errors. I can eliminate those through mechanical trading.

So then, is mechanical trading truly objective? I tend to think not because there are all sorts of errors that can creep into an automated trading system: data errors, errors in the software platform, errors in your own programming, and many more. (Interestingly, one of the main categories of errors that my Super Traders come up with consistently is programming errors.)

And interestingly they are still Super traders.--They identify the issue---

Let’s consider data errors. Is your data accurate or does it have bad ticks and other issues with it? Mechanical traders are always dealing with data errors of some sort. For example, price errors can show up in streaming data quite regularly. Sometimes those are resolved within seconds and the error “disappears” but, by that point, the bad data may have triggered a trade already. Additionally, historical stock data may or may not have dividend and split adjustments. And what happens when a company goes bankrupt? What if it goes private or is bought out by another company? Those companies’ data may simply disappear from your data set.

Survivourship--nothing new.

I once wanted to research an efficient stock trading system. We looked for efficient stocks (moving up without much noise) and bought them with a 25% trailing stop. We had an S&P 500 data set going back 40 years that was supposed to be clean and adjusted for splits and dividends. I was very pleased with the results because my system made a small fortune. I didn’t realize this at the time, however, but the system traded on “inside information.” Because of the data set, I was able to buy stocks at the IPO that would later become part of the S&P 500. Thus, my system, in back test, bought Microsoft, EBay, Intel, and many other companies before anyone knew they would become part of the S&P 500. Why? Because, as I said, my data set was today’s S&P 500 going back 40 years.

An excellent example of how you can be trapped but nothing more.

And what about Thursday May 6th, 2010? The Dow Jones dropped 1,000 points in the space of about 20 minutes. Blue chip stocks like Procter & Gamble dropped over 20 points, and Accenture even went to a penny per share briefly. While there may not have been one root cause for that mini-crash, it had a major effect on mechanical trading systems. Things like that happen in the markets; such are the challenges (error/mistakes) for mechanical systems. (That afternoon’s swing affected lots of regular traders, too. One client said he used 25% trailing stops on all of his positions and got stopped out of every single stock.)

Black Swan events happen. Let me assure you in the example above the discretionary Rule Based traders would have suffered just the same.

Meanwhile, one of our instructors, Ken Long, trades rule-based discretionary systems and made 100R in that same week. As always, he was very conservative in his trading and very careful to make sure that he fully managed his risk.

I really see this as a selective example.
Im sure there were regression systems that would have done well also.

There is another class of error that is made by mechanical trading systems: the error of omission. Because the criteria by which trade setups and entries are so precisely defined, mechanical systems miss many good (or great) trades that a discretionary trader would spot easily.

For example, suppose your systems screens for five consecutive lower closes. After you get five consecutive lower closes you then look for an inside day. Now you have your full setup. Your entry is a few cents above yesterday’s high.

So let’s look at some examples of other entry signals you might miss by being so precise. You could have four down days that were extreme””perhaps the price is down 30%. Or you could have less than four down days that where the price is 30% lower or more. However, neither of those example would be an adequate down move according to your strict mechanical criteria.

Let’s say you found something that had five days of new lower lows but the fifth down day might open on a new low and then close on a new high. That’s usually an extremely bullish signal, but you’d miss it by your precise definition. Or, you could have five days of lower closes and the sixth day opens on a new low but closes on a new high. Thus, the precise entry definition would miss a trade opportunity with even more weakness followed by an extreme bullish signal.

There are a lot more variations of this entry that a mechanical system would miss, but you get the point. As soon as you state your rules so precisely that a computer can execute the trades, you open yourself to errors of omission””good or outstanding trades that your automated system cannot take because of its precision.

But thats the whole point of it.
It can be measured
Perhaps your being deluded by the mind believing it can find EVERY (95%) of winning trades.
I think that in itself is a psycological problem---

Those missed opportunities don’t qualify as mistakes but they severely limit the potential results of the underlying logic behind the system. The mechanical system results will look rather weak next to the results of a trader who used that same system and was allowed some discretion to take the all of those other trades that didn’t quite fit the precise mechanical system rules.

Some discretion!!!
The whole outcome is completely changed it is nothing like a mechanical system
There would be longterm results from discretionary trading---I have mone and so does everyone else.
Now sit down and work out all the stats and youll find they are --well mine are---similar to results I get with systems over time.


Next week we’ll look at mistakes and another type of trader: the no-rule discretionary traders.

Cant wait.

-------------------------------------------------------------------------------------

Dr. Van K. Tharp is the founder and president of the Van Tharp Institute and stands out as an international leader among professional trading coaches and consultants. Helping others become the best trader or investor that they can be has been Tharp’s mission since 1982.

Tharp collected more than 5,000 successful trading profiles in a 10-year study of individual traders and investors

His agenda is to have a successful business---dont lose sight of that!
 
Re: Developing a mechanical system from scratch - Van Tharp

lulz.......when i first read this article i did a double take on most of the ideas....."hang on a mo......c'mon"

and he's got a huge rep, too
:confused:
 
Top