[Quantproject-developers] QuantProject/b4_Business/a1_Financial/a2_Accounting Portfolio.cs,1.8,1.9
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2005-11-26 23:57:27
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23541/b4_Business/a1_Financial/a2_Accounting Modified Files: Portfolio.cs Log Message: IsLong method and IsShort method have been overloaded to work with a ticker (string) as a parameter Index: Portfolio.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/Portfolio.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Portfolio.cs 15 Oct 2005 18:15:43 -0000 1.8 --- Portfolio.cs 26 Nov 2005 23:57:20 -0000 1.9 *************** *** 78,90 **** } ! public bool IsLong( Instrument instrument ) ! { ! return this.Contains( instrument ) && (((Position)this[ instrument.Key ]).Quantity > 0); ! } ! public bool IsShort( Instrument instrument ) ! { ! return this.Contains( instrument ) && (((Position)this[ instrument.Key ]).Quantity < 0); ! } --- 78,98 ---- } ! public bool IsLong( string ticker ) ! { ! return this.Contains( ticker ) && (((Position)this[ ticker ]).Quantity > 0); ! } ! public bool IsLong( Instrument instrument ) ! { ! return IsLong( instrument.Key ); ! } ! public bool IsShort( string ticker ) ! { ! return this.Contains( ticker ) && (((Position)this[ ticker ]).Quantity < 0); ! } ! public bool IsShort( Instrument instrument ) ! { ! return this.IsShort( instrument.Key ); ! } |