[Quantproject-developers] QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank ComparableAc
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2005-04-24 16:26:21
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25814/b7_Scripts/WalkForwardTesting/WalkForwardOneRank Modified Files: ComparableAccount.cs Log Message: New goodness computation: now it is based on the PercentageWinningPeriods account report summary value Index: ComparableAccount.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank/ComparableAccount.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ComparableAccount.cs 30 Mar 2005 23:42:59 -0000 1.7 --- ComparableAccount.cs 24 Apr 2005 16:26:13 -0000 1.8 *************** *** 39,42 **** --- 39,44 ---- private double maxAcceptableDrawDown = 30; + private double minAcceptableWinningPeriods = 30; + private IHistoricalQuoteProvider historicalQuoteProvider = new HistoricalAdjustedQuoteProvider(); *************** *** 66,69 **** --- 68,73 ---- this.EndOfDayTimer.GetCurrentTime() , this.Key , this.historicalQuoteProvider ); + + // old goodness computation if ( ( this.accountReport.Summary.MaxEquityDrawDown >= this.maxAcceptableDrawDown ) || ( this.accountReport.Summary.TotalPnl <= this.accountReport.Summary.BenchmarkPercentageReturn ) ) *************** *** 73,76 **** --- 77,87 ---- returnValue = this.accountReport.Summary.ReturnOnAccount - this.accountReport.Summary.BenchmarkPercentageReturn; + + // new goodness computation + if ( this.accountReport.Summary.NumberWinningPeriods < this.minAcceptableWinningPeriods ) + returnValue = Double.MinValue; + else + returnValue = Convert.ToDouble( this.accountReport.Summary.PercentageWinningPeriods ); + return returnValue; } |