public TimeSeries <string> historyCurveSeriesMRO(DateTime sDate, DateTime eDate) { TimeSeries <string> hist = new TimeSeries <string>(); IRCurveMarketDataLoader irCurveLoader = IRCurveMarketDataLoader.CreateMarketDataLoader("MRO"); ObservableCollection <Excel_irCurveDataViewModel> e_ircdvmList = new ObservableCollection <Excel_irCurveDataViewModel>(); irCurveLoader.loadInterval(sDate, eDate, this.LinkedCurveCode_, e_ircdvmList); //TD_MRSTOCKFACTOR_Table_DAOManager dao_m = new TD_MRSTOCKFACTOR_Table_DAOManager(); //dao_m.STOCK_ID_ = this.Code_; //dao_m.selectInterval(DataBaseConnectManager.ConnectionFactory("MRO"), sDate, eDate); int tenorIndex = e_ircdvmList[0].getTenorIndex(this.Tenor_); if (tenorIndex != -1) { foreach (var item in e_ircdvmList) { string value = item.Excel_rateDataViewModelList_[tenorIndex].Value_; hist.Add(new Date(item.ReferenceDate_), value); } } return(hist); }
public YieldTermStructure yieldCurveLoadFromDB(DateTime refDate, string code) { string provider = Excel_marketDataSymbol.getProvider(code); IRCurveMarketDataLoader irLoader = IRCurveMarketDataLoader.CreateMarketDataLoader(provider); this.excel_irCurveDataViewModelList_.Clear(); irLoader.load(refDate, code, this.excel_irCurveDataViewModelList_); return(this.buildQLNet_YieldTS(this.excel_irCurveDataViewModelList_[0])); //mro_irLoader.load(refDate, this.symbol_, this.excel_irCurveDataViewModelList_); //CURVE_DATA_Table_DAOManager daoM = new CURVE_DATA_Table_DAOManager(); //daoM.CURVE_CODE_ = this.symbol_; //daoM.KeyColumn_ = this.symbol_; //// 날짜 select 해서 //daoM.select(DataBaseConnectManager.ConnectionFactory("myDB")); //Excel_irCurveDataViewModel e_icdvm = new Excel_irCurveDataViewModel(); //string refDateStr = refDate.ToString(StringFormat.DbDateFormat_); //e_icdvm.ReferenceDate_ = refDate; //e_icdvm.Curve_code_ = this.symbol_; //e_icdvm.Excel_rateDataViewModelList_.Clear(); //foreach (CURVE_DATA_Table_DAO item in daoM.DAOList_) //{ // Excel_rateDataViewModel e_rdvm = new Excel_rateDataViewModel(); // e_rdvm.Tenor_ = item.TENOR_; // e_rdvm.Value_ = item.VALUE_; // e_rdvm.RateType_ = item.CURVE_TYPE_; // e_icdvm.Excel_rateDataViewModelList_.Add(e_rdvm); //} }
public Excel_yieldCurveViewModel discountCurve(DateTime refDate, string currencyCode) { //조회함 Excel_yieldCurveViewModel e_ycvm = new Excel_yieldCurveViewModel(); DISCOUNTCURVESETTING_Table_DAO dao = new DISCOUNTCURVESETTING_Table_DAO(); //dao.CURRENCY_ = cvm.CurrencyCode_; dao.KeyColumn_ = currencyCode; dao.select(DataBaseConnectManager.ConnectionFactory("myDB")); string provider = dao.PROVIDER_; string curveCode = dao.CURVECODE_; e_ycvm.Code_ = curveCode; e_ycvm.Currency_ = currencyCode; IRCurveMarketDataLoader loader = IRCurveMarketDataLoader.CreateMarketDataLoader(provider); ObservableCollection <Excel_irCurveDataViewModel> e_ircdvmList = new ObservableCollection <Excel_irCurveDataViewModel>(); loader.load(refDate, curveCode, e_ircdvmList); foreach (var item in e_ircdvmList[0].Excel_rateDataViewModelList_) { Excel_rateDataViewModel e_rdvm = new Excel_rateDataViewModel(); e_rdvm.RateType_ = item.RateType_; e_rdvm.Tenor_ = item.Tenor_; e_rdvm.Value_ = item.Value_; e_ycvm.Excel_rateDataViewModel_.Add(e_rdvm); } e_ycvm.Excel_interpolationViewModel_ = new Excel_interpolationViewModel(); //e_ycvm.loadCurve(); return(e_ycvm); }
public override string dataLoad(DateTime refDate, string code) { MARKETDATA_SYMBOL_INFO_Table_DAO dao = new MARKETDATA_SYMBOL_INFO_Table_DAO(); dao.SYMBOL_ = code; dao.select(DataBaseConnectManager.ConnectionFactory("myDB")); this.setFromDAO(dao); IRCurveMarketDataLoader irLoader = IRCurveMarketDataLoader.CreateMarketDataLoader(this.provider_); ObservableCollection <Excel_irCurveDataViewModel> e_ircdvmList = new ObservableCollection <Excel_irCurveDataViewModel>(); irLoader.load(refDate, this.Linkedcurve_, e_ircdvmList); int tenorNum = e_ircdvmList[0].getTenorIndex(this.Tenor_); string value = e_ircdvmList[0].Excel_rateDataViewModelList_[tenorNum].Value_; return(value); }
public override Excel_yieldCurveViewModel value(DateTime dateTime, Excel_instrumentViewModel e_instVM, Excel_underlyingInfoViewModel excel_uivm) { IRCurveMarketDataLoader curveLoader = IRCurveMarketDataLoader.CreateMarketDataLoader("MRO"); Excel_interestRateViewModel e_irvm = excel_uivm as Excel_interestRateViewModel; ObservableCollection <Excel_irCurveDataViewModel> e_ircdvmList = new ObservableCollection <Excel_irCurveDataViewModel>(); curveLoader.load(dateTime, e_irvm.LinkedCurveCode_, e_ircdvmList); //e_icsvm.Symbol_ = excel_uivm.KrCode_; //e_icsvm.dataLoad(dateTime, e_irvm.LinkedCurveCode_); Excel_yieldCurveViewModel e_ycvm = new Excel_yieldCurveViewModel(); e_ycvm.Excel_interpolationViewModel_ = Excel_interpolationViewModel_; e_ycvm.Code_ = e_ircdvmList[0].Curve_code_; e_ycvm.Excel_rateDataViewModel_ = e_ircdvmList[0].Excel_rateDataViewModelList_; return(e_ycvm); }