[Quantproject-developers] QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardLag/WFLagDebugger
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2006-07-22 20:32:45
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardLag/WFLagDebugger In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv32679/b7_Scripts/WalkForwardTesting/WalkForwardLag/WFLagDebugger Modified Files: WFLagDebugGenome.cs Log Message: - the WFLagDebugGenome constructor now requires also the number of in sample days and the benchmark; furthermore, the WFLagChosenPositions are passed instead of a WFLagLog Index: WFLagDebugGenome.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardLag/WFLagDebugger/WFLagDebugGenome.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WFLagDebugGenome.cs 22 Jun 2006 21:33:47 -0000 1.2 --- WFLagDebugGenome.cs 22 Jul 2006 20:32:42 -0000 1.3 *************** *** 37,43 **** public class WFLagDebugGenome : System.Windows.Forms.Form { ! DateTime transactionDateTime; ! WFLagLog wFLagLog; WFLagChosenPositions wFLagChosenPositions; private System.Windows.Forms.Button TestPreInSampleAndPost; --- 37,51 ---- public class WFLagDebugGenome : System.Windows.Forms.Form { ! int inSampleDays; ! string benchmark; WFLagChosenPositions wFLagChosenPositions; + + private WFLagChosenPositionsDebugInfo wFLagChosenPositionsDebugInfo; + + public WFLagChosenPositionsDebugInfo WFLagChosenPositionsDebugInfo + { + set { this.wFLagChosenPositionsDebugInfo = value; } + get { return this.wFLagChosenPositionsDebugInfo; } + } private System.Windows.Forms.Button TestPreInSampleAndPost; *************** *** 56,61 **** private System.ComponentModel.Container components = null; ! public WFLagDebugGenome( DateTime transactionDateTime , ! WFLagLog wFLagLog ) { // --- 64,69 ---- private System.ComponentModel.Container components = null; ! public WFLagDebugGenome( WFLagChosenPositions wFLagChosenPositions , ! int inSampleDays , string benchmark ) { // *************** *** 67,72 **** // TODO: Add any constructor code after InitializeComponent call // ! this.transactionDateTime = transactionDateTime; ! this.wFLagLog = wFLagLog; } --- 75,81 ---- // TODO: Add any constructor code after InitializeComponent call // ! this.inSampleDays = inSampleDays; ! this.benchmark = benchmark; ! this.wFLagChosenPositions = wFLagChosenPositions; } *************** *** 208,221 **** #endregion ! private DateTime getInSampleLastDateTime() ! { ! DateTime inSampleLastDateTime = ! this.transactionDateTime.AddDays( - 1 ); ! return inSampleLastDateTime; ! } private DateTime getPreSampleLastDateTime() { DateTime preSampleLastDateTime = ! this.getInSampleLastDateTime().AddDays( -this.wFLagLog.InSampleDays ); return preSampleLastDateTime; } --- 217,230 ---- #endregion ! // private DateTime getInSampleLastDateTime() ! // { ! // DateTime inSampleLastDateTime = ! // this.transactionDateTime.AddDays( - 1 ); ! // return inSampleLastDateTime; ! // } private DateTime getPreSampleLastDateTime() { DateTime preSampleLastDateTime = ! this.wFLagChosenPositions.LastOptimizationDate.AddDays( -this.inSampleDays ); return preSampleLastDateTime; } *************** *** 232,235 **** --- 241,265 ---- return preSampleDays; } + + // private void setChosenPositions_actually() + // { + // if ( this.wFLagChosenPositionsDebugInfo != null ) + // { + // // the form was given a valid WFLagChosenPositionsDebugInfo object + // this.wFLagChosenPositions = this.wFLagChosenPositionsDebugInfo.GetChosenPositions(); + // } + // else + // { + // // the form was given a valid WFLagLog object + // this.wFLagChosenPositions = this.wflagl + // } + // } + // private void setChosenPositions() + // { + // if ( this.wFLagChosenPositions == null ) + // { + // this.setChosenPositions_actually(); + // } + // } private void run( DateTime inSampleLastDateTime , int preSampleDays , int inSampleDays , int postSampleDays ) *************** *** 242,259 **** inSampleLastDateTime , preSampleDays , inSampleDays , postSampleDays , ! this.wFLagLog.Benchmark ); wFLagDebugPositions.Run(); } private void TestPreInSampleAndPost_Click(object sender, System.EventArgs e) { - WFLagChosenPositions wFLagChosenPositions = - this.wFLagLog.GetChosenPositions( - this.transactionDateTime ); WFLagDebugPositions wFLagDebugPositions = ! new WFLagDebugPositions( wFLagChosenPositions , ! this.transactionDateTime.AddDays( - 1 ) , 30 , ! this.wFLagLog.InSampleDays , Convert.ToInt32( this.PostSampleDays.Text ) , ! this.wFLagLog.Benchmark ); wFLagDebugPositions.Run(); } --- 272,286 ---- inSampleLastDateTime , preSampleDays , inSampleDays , postSampleDays , ! this.benchmark ); wFLagDebugPositions.Run(); } private void TestPreInSampleAndPost_Click(object sender, System.EventArgs e) { WFLagDebugPositions wFLagDebugPositions = ! new WFLagDebugPositions( this.wFLagChosenPositions , ! this.wFLagChosenPositions.LastOptimizationDate , 30 , ! this.inSampleDays , Convert.ToInt32( this.PostSampleDays.Text ) , ! this.benchmark ); wFLagDebugPositions.Run(); } *************** *** 261,277 **** private void TestInSample_Click(object sender, System.EventArgs e) { - WFLagChosenPositions wFLagChosenPositions = - this.wFLagLog.GetChosenPositions( - this.transactionDateTime ); WFLagDebugPositions wFLagDebugPositions = ! new WFLagDebugPositions( wFLagChosenPositions , ! this.transactionDateTime.AddDays( - 1 ) , 0 , ! this.wFLagLog.InSampleDays , 0 , ! this.wFLagLog.Benchmark ); wFLagDebugPositions.Run(); } private void TestPostSample_Click(object sender, System.EventArgs e) { ! this.run( this.getInSampleLastDateTime() , 0 , 0 , this.getPostSampleDays() ); } --- 288,301 ---- 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() ); } *************** *** 294,300 **** private void WFLagDebugGenome_Load(object sender, System.EventArgs e) { - this.wFLagChosenPositions = - this.wFLagLog.GetChosenPositions( - this.transactionDateTime ); this.labelDrivingPositionsContent.Text = this.wFLagChosenPositions.DrivingPositions.KeyConcat; --- 318,321 ---- |