[Quantproject-developers] QuantProject/b4_Business/a0_Validation/Validators CloseToCloseValidator.cs
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2004-05-27 16:39:16
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation/Validators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3363/b4_Business/a0_Validation/Validators Modified Files: CloseToCloseValidator.cs Log Message: Improved algorithm to check for suspicious close to close ratio (now small changes are not considered suspicious) Index: CloseToCloseValidator.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation/Validators/CloseToCloseValidator.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CloseToCloseValidator.cs 26 May 2004 15:30:08 -0000 1.4 --- CloseToCloseValidator.cs 27 May 2004 16:39:04 -0000 1.5 *************** *** 50,54 **** DataRow quoteRow , double currentValue , double averageValue ) { ! if ( Math.Abs( currentValue / averageValue ) > ConstantsProvider.SuspiciousRatio && ( this.closeToCloseVisuallyValidated.IndexOf( quoteRow[ "quDate" ] ) < 0 ) ) // the current close to close value is suspiciously larger --- 50,56 ---- DataRow quoteRow , double currentValue , double averageValue ) { ! if ( ! ( currentValue > 0.011 ) && ! ( Math.Abs( currentValue / averageValue ) > ConstantsProvider.SuspiciousRatio ) && ( this.closeToCloseVisuallyValidated.IndexOf( quoteRow[ "quDate" ] ) < 0 ) ) // the current close to close value is suspiciously larger *************** *** 88,92 **** validate_currentTicker_set_closeToClose( currentTicker , currentTickerStartingRowIndex , closeToClose ); ! closeToCloseMovingAverage = closeToClose.GetSimpleMovingAverage( 20 ); validate_currentTicker_withHistories( closeToClose , closeToCloseMovingAverage , currentTickerStartingRowIndex , nextTickerStartingRowIndex ); --- 90,95 ---- validate_currentTicker_set_closeToClose( currentTicker , currentTickerStartingRowIndex , closeToClose ); ! closeToCloseMovingAverage = ! closeToClose.GetSimpleMovingAverage( ConstantsProvider.DaysForMovingAverageForSuspiciousRatioValidation ); validate_currentTicker_withHistories( closeToClose , closeToCloseMovingAverage , currentTickerStartingRowIndex , nextTickerStartingRowIndex ); |