示例#1
0
        public List <string> screen()
        {
            List <string> src = StockPool.getInstance().getAllStocks();

            STFilter stFlt = new STFilter();
            IndustryExcludeFilter indFlt = new IndustryExcludeFilter();
            KLinePatternFilter    osFlt  = new KLinePatternFilter(new Oversold2Day());
            PriceScaleFilter      psFlt  = new PriceScaleFilter(0.5);
            List <string>         stocks = psFlt.filter(osFlt.filter(indFlt.filter(stFlt.filter(src))));

            return(stocks);
        }
示例#2
0
        private List <string> filterStocksByPriceScale_PE_Eps(List <string> src, double ratio, double pe, double epsChg)
        {
            List <string> lowStocks = null;

            if (!m_useIntermediate)
            {
                PriceScaleFilter psFilter = new PriceScaleFilter(ratio);
                lowStocks = psFilter.filter(src);
            }
            else
            {
                lowStocks = src;
            }
            PEFilter peFilter = new PEFilter(pe);
            STFilter stFilter = new STFilter();
            IndustryExcludeFilter indFilter = new IndustryExcludeFilter();
            EPSPerfFilter         epsFilter = new EPSPerfFilter(epsChg);

            return(epsFilter.filter(peFilter.filter(indFilter.filter(stFilter.filter(lowStocks)))));
        }
示例#3
0
        private List <string> filterStocksByCostPerf_PricePos_PE(List <string> src, string year, string quarter, double costDiffRatio, double priceRatio, double pe)
        {
            PEFilter peFilter = new PEFilter(pe);
            STFilter stFilter = new STFilter();
            IndustryExcludeFilter indFilter = new IndustryExcludeFilter();
            CostPerfFilter        cpFilter  = new CostPerfFilter(year, quarter, costDiffRatio);
            PriceScaleFilter      psFilter  = new PriceScaleFilter(priceRatio);

            Logger.log("Start filter ....");
            List <string> f1Result = indFilter.filter(stFilter.filter(src));

            Logger.log("Basic filter, count: " + f1Result.Count.ToString());
            List <string> f2Result = peFilter.filter(f1Result);

            Logger.log("PE filter, count: " + f2Result.Count.ToString());
            List <string> f3Result = cpFilter.filter(f2Result);

            Logger.log("Cost filter, count: " + f3Result.Count.ToString());
            List <string> f4Result = psFilter.filter(f3Result);

            Logger.log("Price Pos filter, count: " + f4Result.Count.ToString());
            return(f4Result);
        }