Evaluating A System Statistically

Now that some of the basics are out of the way, let us look at how statistics are used when developing and evaluating a trading system. The examples below employ a system that was optimized on one sample of data (the m-sample data) and then run (tested) on another sample of data (the out-of-sample data). The out-of-sample evaluation of this system will be discussed before the in-sample one because the statistical analysis was simpler for the former (which is equivalent to the evaluation of an unoptimized trading system) in that no corrections for multiple tests or optimization were required. The system is a lunar model that trades the S&P 500; it was published in an article we wrote (see Katz with McCormick, June 1997). The TradeStation code for this system is shown below:

DefineDLLFunc:"SCSIWA.DLL",LONG,"SAjyioonPhaseDate",LONG,LONG;

Vara: FullMoonDate(0), NewMoonDate(0), Trend(O);

{ Function returns date of the next full or new moon } FullMoonDate = SA_MoonPhaseDate (Date [5], 2} NewMoonDate = SA_MoonPhaseDate (Date[5], 0);

If (Date < FullMoonDate) And (Date Tomorrow >= FullMoonDate) Then Valuel =1; { Moon full tonight or tomorrow }

If (Date < NewMoonDate) And (Date Tomorrow >= NewMoonDate) Then Value2 - 1; { Moon new tonight or tomorrow }

0 0

Post a comment

  • Receive news updates via email from this site