Update of /cvsroot/quantproject/QuantProject/b4_Business/a2_Strategies
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31835/b4_Business/a2_Strategies
Modified Files:
WeightedPositions.cs
Log Message:
returnsManager.ReturnIntervals.Count is now used instead of returnsManager.TimeLine.Count
Index: WeightedPositions.cs
===================================================================
RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a2_Strategies/WeightedPositions.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** WeightedPositions.cs 5 Sep 2007 22:07:19 -0000 1.7
--- WeightedPositions.cs 16 Sep 2007 22:10:17 -0000 1.8
***************
*** 504,509 ****
ReturnsManager returnsManager )
{
! if ( ( i < 0 ) || ( i > returnsManager.TimeLine.Count - 2 ) )
! throw new Exception( "i is larger than the number of returns" );
}
private float getTickerReturn( string ticker , int i ,
--- 504,509 ----
ReturnsManager returnsManager )
{
! if ( ( i < 0 ) || ( i > returnsManager.ReturnIntervals.Count - 1 ) )
! throw new Exception( "i is larger than the max return index" );
}
private float getTickerReturn( string ticker , int i ,
***************
*** 572,576 ****
{
float[] returns = new float[
! returnsManager.TimeLine.Count - 1 ];
for ( int i = 0 ; i < returnsManager.NumberOfReturns ; i++ )
returns[ i ] = this.GetReturn( i , returnsManager );
--- 572,576 ----
{
float[] returns = new float[
! returnsManager.ReturnIntervals.Count ];
for ( int i = 0 ; i < returnsManager.NumberOfReturns ; i++ )
returns[ i ] = this.GetReturn( i , returnsManager );
|