[Quantproject-developers] QuantProject/b2_DataAccess/Tables Quotes.cs, 1.36, 1.37
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2009-08-04 21:57:49
|
Update of /cvsroot/quantproject/QuantProject/b2_DataAccess/Tables In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7626/b2_DataAccess/Tables Modified Files: Quotes.cs Log Message: Some bugs have been fixed Index: Quotes.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b2_DataAccess/Tables/Quotes.cs,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** Quotes.cs 1 Jan 2009 13:42:36 -0000 1.36 --- Quotes.cs 4 Aug 2009 21:57:32 -0000 1.37 *************** *** 504,508 **** { string sql = "SELECT TOP " + maxNumOfReturnedTickers + " tickers.tiTicker, tickers.tiCompanyName, " + ! "StDev(quotes.quAdjustedCloseToCloseRatio) AS AdjCloseToCloseStandDev " + "FROM quotes INNER JOIN (tickers INNER JOIN tickers_tickerGroups " + "ON tickers.tiTicker = tickers_tickerGroups.ttTiId) " + --- 504,509 ---- { string sql = "SELECT TOP " + maxNumOfReturnedTickers + " tickers.tiTicker, tickers.tiCompanyName, " + ! SQLBuilder.GetStandardDeviationFunctionName() + ! "(quotes.quAdjustedCloseToCloseRatio) AS AdjCloseToCloseStandDev " + "FROM quotes INNER JOIN (tickers INNER JOIN tickers_tickerGroups " + "ON tickers.tiTicker = tickers_tickerGroups.ttTiId) " + *************** *** 513,517 **** SQLBuilder.GetDateConstant(lastQuoteDate) + "GROUP BY tickers.tiTicker, tickers.tiCompanyName " + ! "ORDER BY StDev(quotes.quAdjustedCloseToCloseRatio)"; string sortDirection = " DESC"; if(orderInASCMode) --- 514,520 ---- SQLBuilder.GetDateConstant(lastQuoteDate) + "GROUP BY tickers.tiTicker, tickers.tiCompanyName " + ! "ORDER BY " + ! SQLBuilder.GetStandardDeviationFunctionName() + ! "(quotes.quAdjustedCloseToCloseRatio)"; string sortDirection = " DESC"; if(orderInASCMode) *************** *** 530,534 **** { string sql = "SELECT TOP " + maxNumOfReturnedTickers + " tickers.tiTicker, tickers.tiCompanyName, " + ! "StDev(quotes.quClose/quotes.quOpen - 1) AS OpenToCloseStandDev " + "FROM quotes INNER JOIN (tickers INNER JOIN tickers_tickerGroups " + "ON tickers.tiTicker = tickers_tickerGroups.ttTiId) " + --- 533,538 ---- { string sql = "SELECT TOP " + maxNumOfReturnedTickers + " tickers.tiTicker, tickers.tiCompanyName, " + ! SQLBuilder.GetStandardDeviationFunctionName() + ! "(quotes.quClose/quotes.quOpen - 1) AS OpenToCloseStandDev " + "FROM quotes INNER JOIN (tickers INNER JOIN tickers_tickerGroups " + "ON tickers.tiTicker = tickers_tickerGroups.ttTiId) " + *************** *** 539,543 **** SQLBuilder.GetDateConstant(lastQuoteDate) + "GROUP BY tickers.tiTicker, tickers.tiCompanyName " + ! "ORDER BY StDev(quotes.quClose/quotes.quOpen - 1)"; string sortDirection = " DESC"; if(orderInASCMode) --- 543,549 ---- SQLBuilder.GetDateConstant(lastQuoteDate) + "GROUP BY tickers.tiTicker, tickers.tiCompanyName " + ! "ORDER BY " + ! SQLBuilder.GetStandardDeviationFunctionName() + ! "(quotes.quClose/quotes.quOpen - 1)"; string sortDirection = " DESC"; if(orderInASCMode) *************** *** 640,644 **** { string sql = "SELECT TOP " + maxNumOfReturnedTickers + " quotes.quTicker, tickers.tiCompanyName, " + ! "Avg(quotes.quOpen) AS AverageRawOpenPrice, StDev(quotes.quOpen) AS StdDevRawOpenPrice " + "FROM (quotes INNER JOIN tickers ON quotes.quTicker=tickers.tiTicker) " + "INNER JOIN tickers_tickerGroups ON tickers.tiTicker=tickers_tickerGroups.ttTiId " + --- 646,652 ---- { string sql = "SELECT TOP " + maxNumOfReturnedTickers + " quotes.quTicker, tickers.tiCompanyName, " + ! "Avg(quotes.quOpen) AS AverageRawOpenPrice, " + ! SQLBuilder.GetStandardDeviationFunctionName() + ! "(quotes.quOpen) AS StdDevRawOpenPrice " + "FROM (quotes INNER JOIN tickers ON quotes.quTicker=tickers.tiTicker) " + "INNER JOIN tickers_tickerGroups ON tickers.tiTicker=tickers_tickerGroups.ttTiId " + *************** *** 648,652 **** "GROUP BY quotes.quTicker, tickers.tiCompanyName " + "HAVING Avg(quotes.quOpen) BETWEEN " + minPrice + " AND " + maxPrice + " " + ! "AND StDev(quotes.quOpen) BETWEEN " + minStdDeviation + " AND " + maxStdDeviation + " " + "ORDER BY Avg(quotes.quOpen)"; string sortDirection = " DESC"; --- 656,662 ---- "GROUP BY quotes.quTicker, tickers.tiCompanyName " + "HAVING Avg(quotes.quOpen) BETWEEN " + minPrice + " AND " + maxPrice + " " + ! "AND " + ! SQLBuilder.GetStandardDeviationFunctionName() + ! "(quotes.quOpen) BETWEEN " + minStdDeviation + " AND " + maxStdDeviation + " " + "ORDER BY Avg(quotes.quOpen)"; string sortDirection = " DESC"; *************** *** 788,792 **** DataTable dt; string sql = "SELECT quotes.quTicker, " + ! "StDev(quotes.quAdjustedCloseToCloseRatio) AS AdjCloseToCloseStandDev " + "FROM quotes WHERE quTicker ='" + ticker + "' " + --- 798,803 ---- DataTable dt; string sql = "SELECT quotes.quTicker, " + ! SQLBuilder.GetStandardDeviationFunctionName() + ! "(quotes.quAdjustedCloseToCloseRatio) AS AdjCloseToCloseStandDev " + "FROM quotes WHERE quTicker ='" + ticker + "' " + *************** *** 843,847 **** DataTable dt; string sql = "SELECT quotes.quTicker, " + ! "StDev(quotes.quClose/quotes.quOpen) AS CloseToOpenStandDev " + "FROM quotes WHERE quTicker ='" + ticker + "' " + --- 854,859 ---- DataTable dt; string sql = "SELECT quotes.quTicker, " + ! SQLBuilder.GetStandardDeviationFunctionName() + ! "(quotes.quClose/quotes.quOpen) AS CloseToOpenStandDev " + "FROM quotes WHERE quTicker ='" + ticker + "' " + |