[Quantproject-developers] QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardLag/WFLagDebugger
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2007-10-28 19:07:04
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardLag/WFLagDebugger In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv16843/b7_Scripts/WalkForwardTesting/WalkForwardLag/WFLagDebugger Modified Files: WFLagDebugGenome.cs Log Message: Since the type WFLagChosenPositions has been removed from qP, the code has been changed so that the new constructor is WFLagDebugGenome( WFLagWeightedPositions wFLagWeightedPositions , DateTime lastOptimizationDate , int inSampleDays , string benchmark ) it was WFLagDebugGenome( WFLagChosenPositions wFLagChosenPositions , int inSampleDays , string benchmark ) in the previous version Index: WFLagDebugGenome.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardLag/WFLagDebugger/WFLagDebugGenome.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** WFLagDebugGenome.cs 30 Jul 2006 13:43:42 -0000 1.4 --- WFLagDebugGenome.cs 28 Oct 2007 19:06:59 -0000 1.5 *************** *** 19,23 **** along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! */ using System; --- 19,23 ---- along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! */ using System; *************** *** 37,43 **** public class WFLagDebugGenome : System.Windows.Forms.Form { int inSampleDays; string benchmark; ! WFLagChosenPositions wFLagChosenPositions; private WFLagChosenPositionsDebugInfo wFLagChosenPositionsDebugInfo; --- 37,44 ---- public class WFLagDebugGenome : System.Windows.Forms.Form { + DateTime lastOptimizationDate; int inSampleDays; string benchmark; ! WFLagWeightedPositions wFLagWeightedPositions; private WFLagChosenPositionsDebugInfo wFLagChosenPositionsDebugInfo; *************** *** 64,69 **** private System.ComponentModel.Container components = null; ! public WFLagDebugGenome( WFLagChosenPositions wFLagChosenPositions , ! int inSampleDays , string benchmark ) { // --- 65,71 ---- private System.ComponentModel.Container components = null; ! public WFLagDebugGenome( WFLagWeightedPositions wFLagWeightedPositions , ! DateTime lastOptimizationDate , ! int inSampleDays , string benchmark ) { // *************** *** 75,81 **** // TODO: Add any constructor code after InitializeComponent call // this.inSampleDays = inSampleDays; this.benchmark = benchmark; ! this.wFLagChosenPositions = wFLagChosenPositions; } --- 77,84 ---- // TODO: Add any constructor code after InitializeComponent call // + this.lastOptimizationDate = lastOptimizationDate; this.inSampleDays = inSampleDays; this.benchmark = benchmark; ! this.wFLagWeightedPositions = wFLagWeightedPositions; } *************** *** 207,220 **** this.ClientSize = new System.Drawing.Size(616, 437); this.Controls.AddRange(new System.Windows.Forms.Control[] { ! this.dataGridPortfolioPositions, ! this.dataGridDrivingPositions, ! this.labelPortfolioPositions, ! this.labelDrivingPositions, ! this.PreSampleDays, ! this.testPreSample, ! this.PostSampleDays, ! this.TestPostSample, ! this.TestInSample, ! this.TestPreInSampleAndPost}); this.Name = "WFLagDebugGenome"; this.Text = "WFLagDebugGenome"; --- 210,223 ---- this.ClientSize = new System.Drawing.Size(616, 437); this.Controls.AddRange(new System.Windows.Forms.Control[] { ! this.dataGridPortfolioPositions, ! this.dataGridDrivingPositions, ! this.labelPortfolioPositions, ! this.labelDrivingPositions, ! this.PreSampleDays, ! this.testPreSample, ! this.PostSampleDays, ! this.TestPostSample, ! this.TestInSample, ! this.TestPreInSampleAndPost}); this.Name = "WFLagDebugGenome"; this.Text = "WFLagDebugGenome"; *************** *** 236,240 **** { DateTime preSampleLastDateTime = ! this.wFLagChosenPositions.LastOptimizationDate.AddDays( -this.inSampleDays ); return preSampleLastDateTime; } --- 239,244 ---- { DateTime preSampleLastDateTime = ! this.lastOptimizationDate.AddDays( ! -this.inSampleDays ); return preSampleLastDateTime; } *************** *** 273,277 **** // } private void run( DateTime inSampleLastDateTime , ! int preSampleDays , int inSampleDays , int postSampleDays ) { // WFLagChosenPositions wFLagChosenPositions = --- 277,281 ---- // } private void run( DateTime inSampleLastDateTime , ! int preSampleDays , int inSampleDays , int postSampleDays ) { // WFLagChosenPositions wFLagChosenPositions = *************** *** 279,286 **** // this.transactionDateTime ); WFLagDebugPositions wFLagDebugPositions = ! new WFLagDebugPositions( this.wFLagChosenPositions , ! inSampleLastDateTime , preSampleDays , ! inSampleDays , postSampleDays , ! this.benchmark ); wFLagDebugPositions.Run(); } --- 283,290 ---- // this.transactionDateTime ); WFLagDebugPositions wFLagDebugPositions = ! new WFLagDebugPositions( this.wFLagWeightedPositions , ! inSampleLastDateTime , preSampleDays , ! inSampleDays , postSampleDays , ! this.benchmark ); wFLagDebugPositions.Run(); } *************** *** 288,312 **** { WFLagDebugPositions wFLagDebugPositions = ! new WFLagDebugPositions( this.wFLagChosenPositions , ! this.wFLagChosenPositions.LastOptimizationDate , 30 , ! this.inSampleDays , ! Convert.ToInt32( this.PostSampleDays.Text ) , ! this.benchmark ); wFLagDebugPositions.Run(); } private void TestInSample_Click(object sender, System.EventArgs e) ! { WFLagDebugPositions wFLagDebugPositions = ! new WFLagDebugPositions( this.wFLagChosenPositions , ! this.wFLagChosenPositions.LastOptimizationDate , 0 , ! this.inSampleDays , 0 , ! this.benchmark ); wFLagDebugPositions.Run(); } private void TestPostSample_Click(object sender, System.EventArgs e) { ! this.run( this.wFLagChosenPositions.LastOptimizationDate , ! 0 , 0 , this.getPostSampleDays() ); } --- 292,316 ---- { WFLagDebugPositions wFLagDebugPositions = ! new WFLagDebugPositions( this.wFLagWeightedPositions , ! this.lastOptimizationDate , 30 , ! this.inSampleDays , ! Convert.ToInt32( this.PostSampleDays.Text ) , ! this.benchmark ); wFLagDebugPositions.Run(); } private void TestInSample_Click(object sender, System.EventArgs e) ! { WFLagDebugPositions wFLagDebugPositions = ! new WFLagDebugPositions( this.wFLagWeightedPositions , ! this.lastOptimizationDate , 0 , ! this.inSampleDays , 0 , ! this.benchmark ); wFLagDebugPositions.Run(); } private void TestPostSample_Click(object sender, System.EventArgs e) { ! this.run( this.lastOptimizationDate , ! 0 , 0 , this.getPostSampleDays() ); } *************** *** 316,326 **** { this.run( this.getPreSampleLastDateTime() , ! 0 , this.getPreSampleDays() , 0 ); } catch( MissingQuoteException ex ) { MessageBox.Show( "The pre sample backtest cannot be " + ! "performed, because there are missing quotes.\n" + ! ex.Message ); } } --- 320,330 ---- { this.run( this.getPreSampleLastDateTime() , ! 0 , this.getPreSampleDays() , 0 ); } catch( MissingQuoteException ex ) { MessageBox.Show( "The pre sample backtest cannot be " + ! "performed, because there are missing quotes.\n" + ! ex.Message ); } } *************** *** 329,333 **** { ArrayList drivingWeightedPositions = ! new ArrayList( this.wFLagChosenPositions.DrivingWeightedPositions.Values ); this.dataGridDrivingPositions.DataSource = drivingWeightedPositions; } --- 333,337 ---- { ArrayList drivingWeightedPositions = ! new ArrayList( this.wFLagWeightedPositions.DrivingWeightedPositions.Values ); this.dataGridDrivingPositions.DataSource = drivingWeightedPositions; } *************** *** 335,339 **** { ArrayList portfolioWeightedPositions = ! new ArrayList( this.wFLagChosenPositions.PortfolioWeightedPositions.Values ); this.dataGridPortfolioPositions.DataSource = portfolioWeightedPositions; } --- 339,343 ---- { ArrayList portfolioWeightedPositions = ! new ArrayList( this.wFLagWeightedPositions.PortfolioWeightedPositions.Values ); this.dataGridPortfolioPositions.DataSource = portfolioWeightedPositions; } |