Hello, my fine filter includes stocks that do not match my coarse requirements.

    public IEnumerable<Symbol> CoarseSelectionFilter(IEnumerable<CoarseFundamental> coarse)
       {
        if(Time.Month == lastMonth) {
         return Universe.Unchanged;
        }
        lastMonth = Time.Month;
        
        //2. Save coarse as _coarse and return an Unchanged Universe
        var _coarse = coarse;

        var filteredByPrice = coarse.Where(x => x.HasFundamentalData & x.Market == Market.USA & x.Price > 5).Select(x => x.Symbol);

        foreach(var finalSymbol in filteredByPrice) {
         if(!finalCoarse.Contains(finalSymbol)) {
          finalCoarse.Add(finalSymbol);
         }
        }
        */
        var filteredByPrice = coarse.Where(x => x.HasFundamentalData & x.Market == Market.USA & x.Price > 5).Select(x => x.Symbol);

        return filteredByPrice;
       }
 

Fine Filter:

   public IEnumerable<Symbol> FineSelectionFunction(IEnumerable<FineFundamental> fine)
       {
        var _fine = fine;
        int cntr = 0;
        
           //   SELECT 2% Dividend Yield & $5B Market Cap
           var CDC_Criteria = fine.Where(x => x.ValuationRatios.TrailingDividendYield >= 0.02m & x.MarketCap > 5e9).Select(x => x.Symbol);
          CDC_Criteria = CDC_Criteria.Take(10);
  }
  
        
        Debug( " ------------------ UNIVERSE FINE SELECTION -------------------------");
        foreach(var fineSymb in CDC_Criteria) {
         cntr = cntr + 1;
         Debug("    " + cntr.ToString() + ": " + fineSymb);
        }
   
          return CDC_Criteria;
       }
 

RESULTS:

 

017-01-01 00:00:00 :1: ABB S3MVQ2U3Z59H2017-01-01 00:00:00 :2: ABBV VCY032R250MD2017-01-01 00:00:00 :3: ABT R735QTJ8XC9X2017-01-01 00:00:00 :4: ACC T142WIKPMLPH2017-01-01 00:00:00 :5: ACL R735QTJ8XC9X2017-01-01 00:00:00 :6: ACP R735QTJ8XC9X2017-01-01 00:00:00 :7: ADM R735QTJ8XC9X2017-01-01 00:00:00 :8: ADI R735QTJ8XC9X2017-01-01 00:00:00 :9: AES R735QTJ8XC9X2017-01-01 00:00:00 :10: AEE R735QTJ8XC9X

 

ACL was changed to AXDX:US from ACL:GR – Greek exchange, not US.

Please help me understand if the fine is actually applied to the Coarse.  If it is, one would not expect the Greek stock to appear.


 

Author