[Quantproject-developers] QuantProject/b4_Business/a2_Strategies WeightedPositions.cs, 1.10, 1.11
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2007-10-28 18:54:10
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a2_Strategies In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv11465/b4_Business/a2_Strategies Modified Files: WeightedPositions.cs Log Message: - a static property TestInstance has been added, it will be useful for testing purposes - the Type property implementation now uses the new TestInstance static property Index: WeightedPositions.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a2_Strategies/WeightedPositions.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** WeightedPositions.cs 7 Oct 2007 13:20:37 -0000 1.10 --- WeightedPositions.cs 28 Oct 2007 18:54:06 -0000 1.11 *************** *** 47,51 **** public static System.Type Type { ! get { return getType(); } } --- 47,56 ---- public static System.Type Type { ! get ! { ! WeightedPositions weightedPositions = ! WeightedPositions.TestInstance; ! return weightedPositions.GetType(); ! } } *************** *** 115,118 **** --- 120,135 ---- } + public static WeightedPositions TestInstance + { + get + { + double[] weights = {1.0}; + string[] tickers = {"DUMMY"}; + WeightedPositions testInstance = new WeightedPositions( weights , tickers ); + return testInstance; + } + } + + public WeightedPositions( double[] normalizedUnsignedWeightValues, SignedTickers signedTickers ) *************** *** 289,307 **** } #endregion - #region getType - private static WeightedPositions getSimpleDummyInstance() - { - double[] weights = {1.0}; - string[] tickers = {"DUMMY"}; - WeightedPositions dummyInstance = new WeightedPositions( weights , tickers ); - return dummyInstance; - } - private static System.Type getType() - { - WeightedPositions weightedPositions = - WeightedPositions.getSimpleDummyInstance(); - return weightedPositions.GetType(); - } - #endregion #region GetCloseToClosePortfolioReturns private double getCloseToClosePortfolioReturn( --- 306,309 ---- |