[Quantproject-developers] QuantProject/b4_Business/a2_Strategies SignedTicker.cs, 1.3, 1.4
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2006-07-02 19:04:55
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a2_Strategies In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25195/b4_Business/a2_Strategies Modified Files: SignedTicker.cs Log Message: Conflict resolution Index: SignedTicker.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a2_Strategies/SignedTicker.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SignedTicker.cs 29 Jun 2006 17:51:31 -0000 1.3 --- SignedTicker.cs 2 Jul 2006 19:04:49 -0000 1.4 *************** *** 191,209 **** } ! /// <summary> ! /// Gets portfolio's return for a given period, for given tickers ! /// </summary> ! /// <param name="signedTickers">Array of signed tickers that compose the portfolio (each ticker has the same weight)</param> ! /// <param name="startDate">Start date for the period for which return has to be computed</param> ! /// <param name="endDate">End date for the period for which return has to be computed</param> ! public static double GetCloseToClosePortfolioReturn(string[] signedTickers, ! DateTime startDate, ! DateTime endDate ) ! { ! double[] tickersWeights = new double[signedTickers.Length]; ! for(int i = 0; i<signedTickers.Length; i++) ! tickersWeights[i] = 1.0/signedTickers.Length; ! ! return GetCloseToClosePortfolioReturn( signedTickers,tickersWeights, startDate, endDate); --- 191,209 ---- } ! /// <summary> ! /// Gets portfolio's return for a given period, for the given tickers ! /// </summary> ! /// <param name="signedTickers">Array of signed tickers that compose the portfolio (each ticker has the same weight)</param> ! /// <param name="startDate">Start date for the period for which return has to be computed</param> ! /// <param name="endDate">End date for the period for which return has to be computed</param> ! public static double GetCloseToClosePortfolioReturn(string[] signedTickers, ! DateTime startDate, ! DateTime endDate ) ! { ! double[] tickersWeights = new double[signedTickers.Length]; ! for(int i = 0; i<signedTickers.Length; i++) ! tickersWeights[i] = 1.0/signedTickers.Length; ! ! return GetCloseToClosePortfolioReturn( signedTickers,tickersWeights, startDate, endDate); *************** *** 301,306 **** public static void ChangeSignOfEachTicker( string[] signedTickers ) { ! for(int i = 0; i<signedTickers.Length; i++) ! signedTickers[i] = GetOppositeSignedTicker(signedTickers[i]); } } --- 301,309 ---- public static void ChangeSignOfEachTicker( string[] signedTickers ) { ! for(int i = 0; i<signedTickers.Length; i++) ! { ! if(signedTickers[i] != null) ! signedTickers[i] = GetOppositeSignedTicker(signedTickers[i]); ! } } } |