[Quantproject-developers] QuantProject/b7_Scripts/WalkForwardTesting/LinearCombination LinearCombina
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2005-08-10 16:51:38
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/LinearCombination In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27983/b7_Scripts/WalkForwardTesting/LinearCombination Modified Files: LinearCombinationTest.cs Log Message: - added an informative title (to be compacted, yet) - the genomeRepresentation is passed as a parameter, now Index: LinearCombinationTest.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/LinearCombination/LinearCombinationTest.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LinearCombinationTest.cs 2 Aug 2005 23:12:59 -0000 1.2 --- LinearCombinationTest.cs 10 Aug 2005 16:51:31 -0000 1.3 *************** *** 43,47 **** private DateTime firstDate; private DateTime lastDate; ! private string[] signedTickers; private bool openToCloseDaily; --- 43,47 ---- private DateTime firstDate; private DateTime lastDate; ! private GenomeRepresentation genomeRepresentation; private bool openToCloseDaily; *************** *** 52,60 **** public LinearCombinationTest( DateTime firstDate , DateTime lastDate , ! string[] signedTickers , bool openToCloseDaily ) { this.firstDate = firstDate; this.lastDate = lastDate; ! this.signedTickers = signedTickers; this.openToCloseDaily = openToCloseDaily; } --- 52,60 ---- public LinearCombinationTest( DateTime firstDate , DateTime lastDate , ! GenomeRepresentation genomeRepresentation , bool openToCloseDaily ) { this.firstDate = firstDate; this.lastDate = lastDate; ! this.genomeRepresentation = genomeRepresentation; this.openToCloseDaily = openToCloseDaily; } *************** *** 77,86 **** private void run_setStrategy() { if ( this.openToCloseDaily ) this.endOfDayStrategy = new OpenToCloseDailyStrategy( ! this.account , this.signedTickers ); else this.endOfDayStrategy = new OpenToCloseWeeklyStrategy( ! this.account , this.signedTickers ); } public void Run() --- 77,107 ---- private void run_setStrategy() { + string[] signedTickers = GenomeRepresentation.GetSignedTickers( + this.genomeRepresentation.SignedTickers ); if ( this.openToCloseDaily ) this.endOfDayStrategy = new OpenToCloseDailyStrategy( ! this.account , signedTickers ); else this.endOfDayStrategy = new OpenToCloseWeeklyStrategy( ! this.account , signedTickers ); ! } ! private string getDateString( DateTime dateTime ) ! { ! string returnValue = dateTime.ToString( "yy-MM-dd" ); ! return returnValue; ! } ! private string run_getReportTitle() ! { ! string returnValue = "Fitness:" + ! this.genomeRepresentation.Fitness.ToString() + ! " | Tickers:" + ! this.genomeRepresentation.SignedTickers + " - " + ! "from " + this.getDateString( this.firstDate ) + ! " to " + this.getDateString( this.lastDate ) + ! " opt. in sample from " + this.getDateString( ! this.genomeRepresentation.FirstOptimizationDate ) + ! " to " + this.getDateString( ! this.genomeRepresentation.LastOptimizationDate ); ! return returnValue; } public void Run() *************** *** 97,102 **** this.historicalQuoteProvider ) ); run_setStrategy(); ! // OneRank oneRank = new OneRank( account , ! // this.endDateTime ); this.historicalEndOfDayTimer.MarketOpen += new MarketOpenEventHandler( --- 118,123 ---- this.historicalQuoteProvider ) ); run_setStrategy(); ! // OneRank oneRank = new OneRank( account , ! // this.endDateTime ); this.historicalEndOfDayTimer.MarketOpen += new MarketOpenEventHandler( *************** *** 116,119 **** --- 137,141 ---- // ObjectArchiver.Archive( report.AccountReport , // @"C:\Documents and Settings\Glauco\Desktop\reports\runOneRank.qPr" ); + report.Text = this.run_getReportTitle(); report.Show(); } |