[Quantproject-developers] QuantProject/b7_Scripts/WalkForwardTesting/LinearRegression/InSampleChoos
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2011-08-03 22:33:29
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/LinearRegression/InSampleChoosers/FitnessEvaluation In directory vz-cvs-3.sog:/tmp/cvs-serv7734/b7_Scripts/WalkForwardTesting/LinearRegression/InSampleChoosers/FitnessEvaluation Modified Files: LinearRegressionFitnessEvaluator.cs Log Message: bug fixed: now the method GetIndependentVariablesValues() is computed properly Index: LinearRegressionFitnessEvaluator.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/LinearRegression/InSampleChoosers/FitnessEvaluation/LinearRegressionFitnessEvaluator.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** LinearRegressionFitnessEvaluator.cs 13 Feb 2011 19:39:47 -0000 1.4 --- LinearRegressionFitnessEvaluator.cs 3 Aug 2011 22:33:27 -0000 1.5 *************** *** 187,192 **** double[] independentVariablesValues = // new double[ weightedPositions.Count - 2 + 1 ]; // one is added for the constant ! new double[ linearRegressionTestingPositions.SignalingPortfolios.Length + 1 ]; // one is added for the constant ! independentVariablesValues[ 0 ] = 0; // regressors include the constant and the constant's return is zero ReturnsManager returnsManager = new ReturnsManager( new ReturnIntervals( returnInterval ) , historicalMarketValueProvider ); --- 187,193 ---- double[] independentVariablesValues = // new double[ weightedPositions.Count - 2 + 1 ]; // one is added for the constant ! // new double[ linearRegressionTestingPositions.SignalingPortfolios.Length + 1 ]; // one is added for the constant ! new double[ linearRegressionTestingPositions.SignalingPortfolios.Length ]; ! // independentVariablesValues[ 0 ] = 0; // regressors include the constant and the constant's return is zero ReturnsManager returnsManager = new ReturnsManager( new ReturnIntervals( returnInterval ) , historicalMarketValueProvider ); *************** *** 195,199 **** WeightedPositions portfolioForCurrentIndependentVariable = linearRegressionTestingPositions.SignalingPortfolios[ j ]; ! independentVariablesValues[ j + 1 ] = portfolioForCurrentIndependentVariable.GetReturn( 0 , returnsManager ); } --- 196,201 ---- WeightedPositions portfolioForCurrentIndependentVariable = linearRegressionTestingPositions.SignalingPortfolios[ j ]; ! // independentVariablesValues[ j + 1 ] = ! independentVariablesValues[ j ] = portfolioForCurrentIndependentVariable.GetReturn( 0 , returnsManager ); } |