[Quantproject-developers] QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank ComparableAc
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2004-12-15 23:20:07
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31647/b7_Scripts/WalkForwardTesting/WalkForwardOneRank Modified Files: ComparableAccount.cs Log Message: - The constructor has been changed - The Goodness calculation has been fixed Index: ComparableAccount.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank/ComparableAccount.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ComparableAccount.cs 29 Nov 2004 14:32:10 -0000 1.1 --- ComparableAccount.cs 15 Dec 2004 23:19:56 -0000 1.2 *************** *** 24,27 **** --- 24,30 ---- using QuantProject.Business.Financial.Accounting; using QuantProject.Business.Financial.Accounting.Reporting; + using QuantProject.Business.Financial.Ordering; + using QuantProject.Business.Timing; + using QuantProject.Data.DataProviders; namespace QuantProject.Scripts.WalkForwardTesting.WalkForwardOneRank *************** *** 46,64 **** get { return this.goodness(); } } ! public ComparableAccount() { - // - // TODO: Add constructor logic here - // } - private double goodness() { double returnValue; ! if ( this.accountReport.Summary.MaxEquityDrawDown >= this.maxAcceptableDrawDown ) returnValue = Double.MinValue; else ! // max draw down is acceptable ! returnValue = this.accountReport.Summary.TotalPnl / this.accountReport.Summary.BuyAndHoldPercentageReturn; return returnValue; --- 49,69 ---- get { return this.goodness(); } } ! public ComparableAccount( string accountName , IEndOfDayTimer endOfDayTimer , ! IDataStreamer dataStreamer , IOrderExecutor orderExecutor ) : base( accountName , ! endOfDayTimer , dataStreamer , orderExecutor ) { } private double goodness() { double returnValue; ! if ( this.accountReport == null ) ! this.accountReport = this.CreateReport( this.Key , 7 , ! this.EndOfDayTimer.GetCurrentTime() , this.Key ); ! if ( ( this.accountReport.Summary.MaxEquityDrawDown >= this.maxAcceptableDrawDown ) ! || ( this.accountReport.Summary.TotalPnl <= this.accountReport.Summary.BuyAndHoldPercentageReturn ) ) returnValue = Double.MinValue; else ! // max draw down is acceptable and the strategy is better than buy and hold ! returnValue = this.accountReport.Summary.TotalPnl - this.accountReport.Summary.BuyAndHoldPercentageReturn; return returnValue; |