Australian (ASX) Stock Market Forum

Developing a mechanical system from scratch

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:

Its not a bad idea to keep track of your error rate. That is not how many trades go bad as such but how many actions you do that are not in keeping with your proven "plan".

But Fcensored.gif me if any discretionary trader can make only 5 mistakes out of 100. I make more fat fingers than that let alone dumb trades!
 
I thought it would be interesting to develop a mechanical trading system from scratch with some of the members on ASF.

Maybe this has been tried before here, not sure. I know that it has been done a few times on ReefCap, with some obvious results, mostly positive from what i can gather.

I know very little about mechanical systems, but i am very keen to learn more about them and develop and test several of my own for application one day.

So if your interested, then drop by and add your "2 bob" as we proceed through the development stages.

How about a few ground rules:

1.) There are no such things as stupid questions or suggestions, lets brain storm this together.

2.) If you have 'been there, done that' then please let us work through some of the issues so we get a feel of ownership. Maybe a few hints now and then would be good too.

3.) Those more experienced at this are most welcomed to provide thier guidence and constructive criticsm for us, without you we cannot learn.

4.) Keep in mind we all have different software, lets try to be as generic as possible when talking about code. If you post code then at least label it for us code dummies.

Lets try to agree on the plan for the project first.

As Tech suggested to me, we could go like this to start with:


Instrument/Universe
Time Frame

Anyone to start things off?

Cheers,:)

Well its been a long time since i started this thread. Since then I've learned allot about the markets and discretionary / systematic trading.

I'm now able to say i have a portfolio of systems that i'm ready to start forward testing. So far they consist of:

1) A DAX channel breakout
2) A DAX Open Range Fade
3) An HHI/HSI Open Range Breakout
4.) A Crude Oil Reversal System

I have 1 more in testing currently and two additional systems at the coder. One is for FX and the other should be ok on the SPI, or the FESX.

Today i'm working on an aggregate equity curve of the four combined systems to see how smooth it is and how they might compliment each other.

Although my testing has been done in Ninjatrader, i'll convert them to Multi-charts for forward testing and operating.

This process has taken weeks and weeks of work. Many evenings and a couple of thousand in coding. Still i need to forward test them on real market conditions to ensure they're still performing as expected.
 
Today i'm working on an aggregate equity curve of the four combined systems to see how smooth it is and how they might compliment each other.

Although my testing has been done in Ninjatrader, i'll convert them to Multi-charts for forward testing and operating.

This process has taken weeks and weeks of work. Many evenings and a couple of thousand in coding. Still i need to forward test them on real market conditions to ensure they're still performing as expected.
Congrats on getting through all the hard work Can. Looking forward to seeing some equity curves :)
 
A portfolio equity curve. Some systems did not come online here until 2013. This was 1 contract for each system with slippage and commission.
 

Attachments

  • portfolio EQ - 4 systems.JPG
    portfolio EQ - 4 systems.JPG
    54.5 KB · Views: 17
You have probably already seen this but for others interested in opening range trading. They like the first 30 minutes range.

https://www.wpi.edu/Pubs/E-project/...910-142422/unrestricted/Veselin_Iliev_IQP.pdf

Yeah i have Crabel's book. Another guy, Murray Ruggiero has done allot of work on ORB's....taking from where Crabel had left off and considering the extended trading hours of equity indices and commodities. I got some of my ideas from him on alternative's to time dependent ranges.

Thanks for the paper, will make some interesting reading during my nightly period of insomnia!
 
Some additional statistics on the portfolio:

All stats are in AUD

  • Win% 48
  • Average Trade 189.83
  • Average Win 647.00
  • Average Loss -413


profit factor is 1.56

and the most important figure to me, MAX drawdown - 9.05%
 
Some additional statistics on the portfolio:

All stats are in AUD

  • Win% 48
  • Average Trade 189.83
  • Average Win 647.00
  • Average Loss -413


profit factor is 1.56

and the most important figure to me, MAX drawdown - 9.05%

How do these numbers compare with your discretionary trading?
 
Greetings --

Check opening range data carefully. I was working in a Commodity Trading Advisory (CTA) firm in the 1990s and spent a little time with Toby Crabel. He is talented and a lot of his ideas are good. Rules, regulations, and market operations have changed significantly since the books and articles he wrote then. Multiple market makers, electronic trading, decimalization, etc have changed the opening. Historical data may, or may not, represent trades that are achievable today.

Each bar (day) has four prices associated with it -- open, high, low, close. Some commodities have an additional price -- settle. Each bar has two known times -- open and close. Open price does not necessarily coincide with open time. For the issues that are highly active, the opening price may have occurred at the opening time. Similarly for the close. For less active issues, there could be substantial time difference between the opening of trading and the first trade. Intra-day bars may be needed to determine the accuracy of the system.

I recommend doing development work using recent data but not quite current -- reserve a year or two. Data before about 2000 may have very different characteristics than current data, but that is dependent on the specific issue being traded. When everything looks good, do a one time walk forward over the reserved data as an out-of-sample validation. Really one time only. If the system is modified based on the out-of-sample results of the walk forward, that validation has been compromised and is no longer useful as an estimate of future performance.

Recall the one-liner: If you do not do system validation yourself, the market will do it for you -- using real money.

Best,
Howard
 
Thanks Howard, great points.

Regarding the ORB strategies, they don'y work very often on indices, but fading them does. There are some Asian markets where they perform quite well.

I'm not a fan of optimizing allot of parameters and my strategies that work well don't have allot of parameters to optimize.
 
Another system to add to the portfolio, fresh from the coder. This one does require some optimization due to volatility. I optimized it on 4 years of old data and then walked it forward on 4 years of oos data. Then i optimized it on more recent data and then tested it on new oos data. In all tests it works well and its works well on several different markets. It will be tested on the IB paper trader with the other systems.
 

Attachments

  • NinjaTrader Cumulative Profit Report, 1_1_2009 - 1_1_2016 settings 3 recent opt.jpg
    NinjaTrader Cumulative Profit Report, 1_1_2009 - 1_1_2016 settings 3 recent opt.jpg
    107.5 KB · Views: 13
Another system to add to the portfolio, fresh from the coder. This one does require some optimization due to volatility. I optimized it on 4 years of old data and then walked it forward on 4 years of oos data. Then i optimized it on more recent data and then tested it on new oos data. In all tests it works well and its works well on several different markets. It will be tested on the IB paper trader with the other systems.

It has some fairly drawn out DD periods, looks like one is ~2 years. Are these all single market systems?
 
Can, you're going to automate all these through Multicharts and AMP or IB?

Likely Multi-charts and IB. So i need to get the operational versions all re-coded in EL.

I've had so many ideas to code over the years but couldn't find a decent coder that was reasonably priced, friendly and fast....until this year. Its been a great year for system development and because i have a quiet office, i get allot of work done.
 
Top