[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Continuous contract



PureBytes Links

Trading Reference Links

During the last couple of weeks I have with great interest followed the
ongoing discussion on what contracts to use when back testing systems,
what performance numbers are of most importance and whether or not to
use dollar based stops. With this mail I hope that I can provide the
list with my five cents worth.

The best contract to use for your system testing is the proportional
back adjusted continuous contract (PBACC,) put together by CSI (Unfair
Advantage.) It is the only contract that allows you to compare your
system trading results between different markets and different
timeframes.

It has been discussed by myself in an article in Futures magazine (June
-98) and further elaborated upon by Dr. Enrico Donner in a recent
article in TASC. However, as for now it has to be handled with care
since most system testing software cannot handle the contract, which
will result in obsolete trade statistics.

I'm writing this from my home computer, but when I get to work tomorrow
I will mail to the list a simple Excel spreadsheet that I've put
together for the speach I'm preparing on the subject for the up-coming
Futures West conference. It will calculate a new set of system testing
performance numbers tailored around the PBACC. I also think that Mr.
Donner discusses the subject even further on his web-site. I'll mail the
address tomorrow.

Meanwhile, below you will find the TS-code you will need to place at the
end of all your systems to export all the necessary data to a comma
separated text file, that later can be opened and manipulated in Excel.
With these settings it will default to export into the C:\Omega\Prog
directory and name the file with its symbol name, without an extention.

This code is also prepared to export all the data necessary for further
analysis in Excel of other system testing topics discussed in Futures
during the last 8 months, which include such topics as John Sweeney's
MAE/MFE and Ralph Vince's Optimal f.

If CurrentBar = 1 Then Begin
	FileDelete(GetSymbolName);
	FileAppend(GetSymbolName, "Pos." + "," + "E-Date" + "," + "E-Time" +
"," + "E-Price" + "," +
	"X-Date" + "," + "X-Time" + "," + "X-Price" + "," + "Length" + "," +
"Lowest" + "," +
	"LowBar" + "," + "Highest" + "," + "HighBar" + "," + NewLine);
End;

Value99 = MarketPosition;

If Value99 <> Value99[1] Then Begin
	Value98 = Close;
	Value97 = Close;
	Value96 = 0;
	Value95 = 0;
End;

If Value99 = 1 Then Begin
	If High > Value98 Then Begin
		Value98 = High;
		Value96 = BarsSinceEntry;
	End;
	If Low < Value97 Then Begin
		Value97 = Low;
		Value95 = BarsSinceEntry;
	End;
End;

If Value99 = -1 Then Begin
	If Low < Value98 Then Begin
		Value98 = Low;
		Value96 = BarsSinceEntry;
	End;
	If High > Value97 Then Begin
		Value97 = High;
		Value95 = BarsSinceEntry;
	End;
End;
	
If Value99 <> Value99[1] and Value99[1] <> 0 Then
	FileAppend(GetSymbolName, NumToStr(MarketPosition(1), 0) + "," +
NumToStr(EntryDate(1), 0) + "," +
	NumToStr(EntryTime(1), 0) + "," + NumToStr(EntryPrice(1), 5) + "," +
NumToStr(ExitDate(1), 0) + "," + 	NumToStr(ExitTime(1), 0) + "," +
NumToStr(ExitPrice(1), 5) + "," + NumToStr(BarsSinceEntry(1), 0) + ","
+ 	NumToStr(Value97[1], 5) + "," + NumToStr(Value95[1], 0) + "," +
NumToStr(Value98[1], 5)+ "," + 
	NumToStr(Value96[1], 0) + "," + NewLine);

Regards,
Thomas Stridsman
Futures magazine