Beispiel #1
0
        private void EvaluatePoint()
        {
            SortedDictionary <string, stockEquity> equityList = GetStockPercentage.equityList;
            List <string> myKeys = new List <string>();

            foreach (var key in evaluateBonusList)
            {
                myKeys.Add(key.Key);
            }
            foreach (var item in myKeys)
            {
                stockBonus bonus     = evaluateBonusList[item];
                bool       influence = false;
                if ((bonus.firstDate > yesterday || bonus.firstDate == 0) && bonus.firstBonus > 0 && GetStocks.stockList[item].existsDate[GetStocks.stockList[item].existsDate.Count() - 1] > yesterday)
                {
                    List <stockFormat> list = GetStocks.getConstituentStock(bonus.firstDate);
                    if (bonus.firstDate == 0)
                    {
                        list = GetStocks.getConstituentStock(GetStocks.stockList[item].existsDate[GetStocks.stockList[item].existsDate.Count() - 1]);
                    }
                    bonus.firstPoint = GetStockPoint(list, equityList, bonus.code, bonus.firstBonus);
                    influence        = true;
                }
                if ((bonus.secondDate > yesterday || bonus.secondDate == 0) && bonus.secondBonus > 0 && GetStocks.stockList[item].existsDate[GetStocks.stockList[item].existsDate.Count() - 1] > yesterday)
                {
                    List <stockFormat> list = GetStocks.getConstituentStock(bonus.secondDate);
                    if (bonus.secondDate == 0)
                    {
                        list = GetStocks.getConstituentStock(GetStocks.stockList[item].existsDate[GetStocks.stockList[item].existsDate.Count() - 1]);
                    }
                    bonus.secondPoint = GetStockPoint(list, equityList, bonus.code, bonus.secondBonus);
                    influence         = true;
                }
                if (influence == true)
                {
                    evaluatePointList.Add(bonus.code, bonus);
                }
            }
        }
Beispiel #2
0
 static void Main(string[] args)
 {
     GetStocks myList = new GetStocks(20170301, 20171229, "000016.SH");
     GetBonus  bonus  = new GetBonus("000016.SH");
 }