Simulation Start

Discussions about the testing and simulation of mechanical trading systems using historical data and other methods. Trading Blox Customers should post Trading Blox specific questions in the Customer Support forum.
Post Reply
Murray
Senior Member
Senior Member
Posts: 33
Joined: Mon Jul 07, 2003 1:56 am
Location: Sydney, Australia

Simulation Start

Post by Murray »

Is there any way to get TradingBlox to start a simulation with the first triggered trade in a market, rather than entering all markets based on the entry criteria being true?

ie. wait until a trade entry is triggered rather then enter part the way through the trade.

I've noticed that my long term systems performance can be significantly changed by when the start date is and what the first trades did. When the simulation starts, it normally enters all markets part way through the trade, which can cause a lot of losing trades with the first month.

Murray
Tim Arnold
Site Admin
Site Admin
Posts: 9015
Joined: Tue Apr 06, 2004 1:41 pm
Location: Boston, MA
Contact:

Post by Tim Arnold »

Yes. That is the purpose of the Testing Order Prime Months global parameter. You can set this to the number of months prior to the test start that TB will generate orders and get into positions. These are just priming positions, so they don't affect the profit/loss of the test directly.

The default is 3 months, but you can set this to longer if you have a longer term system.

The benefit, as you point out, is that you don't jump into trade mid-trend. For longer term systems this can make your test results better, and more accurate (assuming you would also do this on starting real trading of a new system).

A second way to handle this: you could modify the system so it takes this into consideration. A common example is to modify a moving average cross over system so that it only takes the trade when the cross over actually occurs, not just when one ma is greater than the other.
sluggo
Roundtable Knight
Roundtable Knight
Posts: 2987
Joined: Fri Jun 11, 2004 2:50 pm

Post by sluggo »

viewtopic.php?p=14254&highlight=cross%2A#14254
Here is an easy way to investigate these phenomena: Copy the Dual MA blox to a new name like "Dangerous Experiment" so you can edit them without harming the original. Add another "AND" phrase to the code which will only enter a new long at tomorrows open, if todays fastMA > todays slowMA, AND if it is also true that yesterdays fastMA <= yesterdays slowMA. Do the same for shorts. Now run the system and scroll through the "Trades" tab looking at the graphs. To your great surprise you will find times when the system goes "flat" (has no position), even though Dual MA is a pure reversal system. You will also find times when the system trades one or more bars "late", i.e., after the MA's cross. Dig into these with gusto and vigor, you will discover the reasons are on the above list.
Post Reply