PDA

View Full Version : Open Trades


SteveW
10th March 2004, 08:47 AM
Hi David,

I have a trade database for period 1/1/01 to 20/12/03.

If I choose close open trades, the portfolio simulation Trade Summary shows the last exit date as 13/2/04, which is beyond the period set in the tradesim ExtFml("TradeSim.SetStopRecordDate". The equity charts also show trades exiting after the stop record date.

Does close open trades close on the SetStopRecordDate or the date of the trade simulation (which in the case above is 3 months after the SetStopRecordDate)? I don't seem to be able to get a 'snapshot' of a specific time period as open trades always seem to be closed after the last database date.

The SetStopRecordDate only seems to be limiting the last trade entry. Is there an option to close out all open trades at a specific date so that the system can be tested for discrete timeframes only?

Version 3.4.3 Build 669 Beta Release.

SteveW

David Samborsky
10th March 2004, 11:30 AM
The SetStopRecordDate only seems to be limiting the last trade entry. Is there an option to close out all open trades at a specific date so that the system can be tested for discrete timeframes only?

The SetStartRecordDate and SetStopRecordDate effects the entry dates only, so the exit dates can still exceed the StopRecordDate.

Think about it for the moment it would not be realistic to control or limit the exit dates because in reality you don't know in advance when you will have an exit once you have entered a trade. Just like if you decide to stop trading you don't enter anymore trades after a certain date but you would let pending trades run their course.


Does close open trades close on the SetStopRecordDate or the date of the trade simulation (which in the case above is 3 months after the SetStopRecordDate)? I don't seem to be able to get a 'snapshot' of a specific time period as open trades always seem to be closed after the last database date.

All open trades terminate on the last bar of the chart data irrespective of the SetStopRecordDate. You can disable loading of open trades in the Global Preferences dialog box. Including open trades in your simulation can sometimes skew the results and mask the effectiveness of your trading system since trades are forced to terminate at a specified date which has nothing to do with your trading system rules. On the other hand including open trades in a simulation gives you a current snapshot of your trading system at a specific date.

The Enterprise Version 3.4.3 provides even more information by displaying open and closed trade equity on a bar by bar basis.

SteveW
10th March 2004, 10:36 PM
David,

If I choose 'ignore open trades', I still get last exit dates after the database setrecord date. Dosn't this mean that open trades are not being ignored?

SteveW

David Samborsky
11th March 2004, 03:05 AM
If you choose "Ignore Open Trades" and you load a trade database you will note there are no trades in the trade database manager with an "Open Trade" exit status.

However you may still have trades with exit dates after the SetEndRecordDate but as I said before the SetEndRecordDate only effects the entry date and not the exit date.

ppapp
4th February 2007, 02:41 PM
. . . . 3 years later ,

Yes i understand everything discussed here re: open trades and i appreciate that it is un-desirable to arbitrarily close off a trade at a certain fixed date that has nothing to do with the exit logic of the system.

However, if i wanted to do this am i able to?
In other words is there a facility within TradeSim that will force all open trades to exit at a specific date regardless of what the system exit logic says?

David Samborsky
6th February 2007, 06:48 AM
. . . . 3 years later ,

Yes i understand everything discussed here re: open trades and i appreciate that it is un-desirable to arbitrarily close off a trade at a certain fixed date that has nothing to do with the exit logic of the system.

However, if i wanted to do this am i able to?
In other words is there a facility within TradeSim that will force all open trades to exit at a specific date regardless of what the system exit logic says?

You could do this using MSFL using the dayofmonth(), month() and year() functions.

For example if you want your trades to exit on 2-Feb-2004 you would write:-

ExitTrigger:=YourExitTrigger OR ((dayofmonth()=2) AND (month()=2) AND (year()=2004));