[Quantproject-developers] QuantProject/b7_Scripts/WalkForwardTesting/LinearRegression/InSampleChoos
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2011-01-06 19:24:26
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/LinearRegression/InSampleChoosers/FitnessEvaluation In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv25966/b7_Scripts/WalkForwardTesting/LinearRegression/InSampleChoosers/FitnessEvaluation Modified Files: LinearRegressionFitnessEvaluator.cs Log Message: - unused code have been removed - now the interface QuantProject.ADT.Econometrics.ILinearRegression is reference, instead of an implementing class Index: LinearRegressionFitnessEvaluator.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/LinearRegression/InSampleChoosers/FitnessEvaluation/LinearRegressionFitnessEvaluator.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LinearRegressionFitnessEvaluator.cs 28 Mar 2010 16:08:00 -0000 1.1 --- LinearRegressionFitnessEvaluator.cs 6 Jan 2011 19:24:19 -0000 1.2 *************** *** 92,96 **** } ! public QuantProject.ADT.Econometrics.LinearRegression SetUpAndRunLinearRegression( LinearRegressionTestingPositions testingPositions ) { --- 92,96 ---- } ! public QuantProject.ADT.Econometrics.ILinearRegression SetUpAndRunLinearRegression( LinearRegressionTestingPositions testingPositions ) { *************** *** 100,103 **** --- 100,105 ---- this.returnsManagerForTradingTickers , this.returnsManagerForSignalingTickers ); + // QuantProject.ADT.Econometrics.LinearRegression linearRegression = + // new QuantProject.ADT.Econometrics.LinearRegressionWithoutCovarianceMatrix(); QuantProject.ADT.Econometrics.LinearRegression linearRegression = new QuantProject.ADT.Econometrics.LinearRegression(); *************** *** 128,156 **** #region getFitnessValue - private double getFitnessValue( - WeightedPositions tradingPortfolio , - WeightedPositions[] signalingPortfolios ) - { - ILinearRegressionValues linearRegressionValues = - this.linearRegressionSetupManger.SetUpTheLinearRegressionValues( - tradingPortfolio , signalingPortfolios , - this.returnsManagerForTradingTickers , - this.returnsManagerForSignalingTickers ); - // this.getFitnessValue_checkWeightedPositions( weightedPositions ); - // QuantProject.ADT.Econometrics.LinearRegression linearRegression = - // this.setupAndRunTheLinearRegression( - // tradingPortfolio , signalingPortfolios , returnsManager ); - QuantProject.ADT.Econometrics.LinearRegression linearRegression = - new QuantProject.ADT.Econometrics.LinearRegression(); - linearRegression.RunRegression( - linearRegressionValues.Regressand , - linearRegressionValues.Regressors ); - // linearRegressionValues.RegressorWeights ); - double fitnessValue = linearRegression.CenteredRSquare; - return fitnessValue; - } private double getFitnessValue( LinearRegressionTestingPositions testingPositions ) { ! QuantProject.ADT.Econometrics.LinearRegression linearRegression = this.SetUpAndRunLinearRegression( testingPositions ); double fitnessValue = linearRegression.CenteredRSquare; --- 130,136 ---- #region getFitnessValue private double getFitnessValue( LinearRegressionTestingPositions testingPositions ) { ! QuantProject.ADT.Econometrics.ILinearRegression linearRegression = this.SetUpAndRunLinearRegression( testingPositions ); double fitnessValue = linearRegression.CenteredRSquare; *************** *** 177,184 **** fitnessValue = this.getFitnessValue( (LinearRegressionTestingPositions)meaning ); ! // this.hasReturnsManagerForTradingTickersBeenSetSinceLastGetFitnessValueRequest = ! // false; ! // this.hasReturnsManagerForSignalingTickersBeenSetSinceLastGetFitnessValueRequest = ! // false; return fitnessValue; } --- 157,164 ---- fitnessValue = this.getFitnessValue( (LinearRegressionTestingPositions)meaning ); ! if ( fitnessValue < -0.03 && fitnessValue > -2 ) ! { ! string forBreakpoint; // for breakpoint ! } return fitnessValue; } |