protected static StockPerformanceForecastType parseForecastType(string str) { StockPerformanceForecastType type = StockPerformanceForecastType.PFT_Alert; if (str == "预增") { type = StockPerformanceForecastType.PFT_Increase; } else if (str == "预升") { type = StockPerformanceForecastType.PFT_Advance; } else if (str == "预盈") { type = StockPerformanceForecastType.PFT_Profit; } else if (str == "预亏") { type = StockPerformanceForecastType.PFT_Loss; } else if (str == "预减") { type = StockPerformanceForecastType.PFT_Recede; } else if (str == "预降") { type = StockPerformanceForecastType.PFT_Decrease; } else if (str == "预警") { type = StockPerformanceForecastType.PFT_Alert; } return(type); }
public override bool filterMethod(string stockID) { StockPerformanceForecastType pft = StockPerformanceForecastType.PFT_Alert; if (getStockForecastType(stockID, m_targetYear, m_targetSeason, out pft)) { if (pft >= m_forecastType) { return(true); } } return(false); }
public static bool getStockForecastType(string stockID, string year, string season, out StockPerformanceForecastType type) { string ty = null; string tq = null; DateUtil.getNextQuarter(year, season, out ty, out tq); type = StockPerformanceForecastType.PFT_Alert; StockForecastData data = StockDBVisitor.getInstance().getStockForecastData(stockID, ty, tq); if (data == null) { return(false); } type = data.type; return(true); }
public ForecastFilter(string year, string season, StockPerformanceForecastType type) { m_targetYear = year; m_targetSeason = season; m_forecastType = type; }