コード例 #1
0
 public void Add(FactsetSecurityDailyResponseItem item)
 {
     if (!_data.ContainsKey(item.Figi))
     {
         _data[item.Figi] = new List <FactsetSecurityDailyResponseItem>();
     }
     _data[item.Figi].Add(item);
 }
コード例 #2
0
        public void GivenTheEquityClosePrices(Table table)
        {
            var rows = TableHelpers.ToEnumerableDictionary(table);

            foreach (var row in rows)
            {
                var item = new FactsetSecurityDailyResponseItem
                {
                    Epoch       = DateTime.Parse(row["Date"], null, DateTimeStyles.AssumeUniversal),
                    ClosePrice  = Convert.ToDecimal(row["ClosePrice"]),
                    Figi        = IdentifierHelpers.ToIsinOrFigi(row["_EquitySecurity"]),
                    Currency    = "GBP",
                    DailyVolume = row.ValueOrNull("DailyVolume") != null?Convert.ToInt64(row.ValueOrNull("DailyVolume")) : 0
                };

                _ruleRunner.EquityClosePriceMock.Add(item);
            }
        }
            public DailySummaryDto(FactsetSecurityDailyResponseItem item)
            {
                if (item == null)
                {
                    return;
                }

                this.Epoch             = item.Epoch;
                this.EpochDate         = item.Epoch.Date;
                this.Figi              = item.Figi;
                this.Currency          = item.Currency;
                this.OpenPrice         = item.OpenPrice;
                this.ClosePrice        = item.ClosePrice;
                this.HighIntradayPrice = item.HighIntradayPrice;
                this.LowIntradayPrice  = item.LowIntradayPrice;
                this.MarketCap         = item.MarketCapitalisation;
                this.DailyVolume       = item.DailyVolume;
            }