public void ReadyData() { // Load data MarketData mdKospi = new MarketData(Input.StartDate, Input.EndDate, "KM1 R:00_0_R Index"); MarketData mdBond = new MarketData(Input.StartDate, Input.EndDate, "KE1 R:00_0_R Comdty"); MarketData mdDollar = new MarketData(Input.StartDate, Input.EndDate, "KU1 R:00_0_R Curncy"); mdKospi.LoadDataFromDB(); mdBond.LoadDataFromDB(); mdDollar.LoadDataFromDB(); // Ready data List<MarketData> l = new List<MarketData>(); l.Add(mdKospi); l.Add(mdBond); l.Add(mdDollar); List<MarketData> alignedData = DataUtil.FillByPivotData(mdKospi, l); Boolean arranged = DataUtil.IsArrangedDateAndIndex(alignedData); Trace.Assert(arranged); //Set data this._readyData.Add(MarketDataSetKey.KospiFuture, alignedData[0]); this._readyData.Add(MarketDataSetKey.KtbFuture, alignedData[1]); this._readyData.Add(MarketDataSetKey.DollarFuture, alignedData[2]); this._readyData.RegisterPivotData(alignedData[0]); }
static MarketData LoadDataAndAddToList(String ticker, DateTime startDate, DateTime endDate, List<MarketData> l) { MarketData md = new MarketData(startDate, endDate, ticker); md.LoadDataFromDB(); l.Add(md); return md; }