public void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.Excel_discountCurve_para serial_Excel_discountCurve_para = serial_Class as FpmlSerializedCSharp.Excel_discountCurve_para;

            List<FpmlSerializedCSharp.Excel_yieldCurve> serial_excel_yieldCurve = serial_Excel_discountCurve_para.Excel_yieldCurve_;
            this.excel_yieldCurveViewModel_ = new ObservableCollection<Excel_yieldCurveViewModel>();
            foreach (var item in serial_excel_yieldCurve)
            {
                //string type = item.Type_.ValueStr;
                Excel_yieldCurveViewModel viewModel = new Excel_yieldCurveViewModel();
                viewModel.setFromSerial(item);
                this.excel_yieldCurveViewModel_.Add(viewModel);
            }
            
        }
        public override Excel_yieldCurveViewModel value(DateTime dateTime, Excel_instrumentViewModel e_instVM, Excel_underlyingInfoViewModel excel_uivm)
        {
            Excel_interestRateViewModel e_irvm = excel_uivm as Excel_interestRateViewModel;

            ObservableCollection<Excel_irCurveDataViewModel> e_ircdvmList = new ObservableCollection<Excel_irCurveDataViewModel>();

            Excel_yieldCurveViewModel e_ycvm = new Excel_yieldCurveViewModel();

            e_ycvm.Excel_interpolationViewModel_ = Excel_interpolationViewModel_;

            e_ycvm.Code_ = "constDefaultCurve";

            e_ycvm.loadCurve(constRate_);

            return e_ycvm;
        }
        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;
        }
        public Excel_yieldCurveViewModel discountYieldCurve(string currencyStr)
        {
            Excel_yieldCurveViewModel e_ycvm = new Excel_yieldCurveViewModel();

            foreach (var item in this.excel_yieldCurveViewModel_)
            {
                if (item.Currency_ == currencyStr)
                {
                    e_ycvm = item;
                }
            }

            if (e_ycvm.Code_ == "")
            {
                OutputLogViewModel.addResult("unknown currency");
            }

            return e_ycvm;

        }
        private void updateButton_Click(object sender, RoutedEventArgs e)
        {
            this.viewModel_.Excel_yieldCurveViewModel_.Clear();

            Excel_yieldCurveViewModel e_ycvm = new Excel_yieldCurveViewModel();

            e_ycvm.Code_ = "testCode";
            e_ycvm.Currency_ = "KRW";
            e_ycvm.Description_ = "testDiscription";
            e_ycvm.Name_ = "KRWBONDCurve";

            e_ycvm.Excel_interpolationViewModel_ = new Excel_interpolationViewModel();

            e_ycvm.loadCurve();

            this.viewModel_.Excel_yieldCurveViewModel_.Add(e_ycvm);


        }
 public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
 {
     FpmlSerializedCSharp.Excel_underlyingModel_para serial_Excel_underlyingModel_para = serial_Class as FpmlSerializedCSharp.Excel_underlyingModel_para;
     FpmlSerializedCSharp.Excel_forwardModel serial_Excel_forwardModel = serial_Excel_underlyingModel_para.Excel_forwardModel_;
 
     this.currentValue_ = serial_Excel_forwardModel.CurrentValue_.ValueStr;
     
     this.tenor_ = serial_Excel_forwardModel.Tenor_.ValueStr;
     
     this.linkedCurveCode_ = serial_Excel_forwardModel.LinkedCurveCode_.ValueStr;
     
     FpmlSerializedCSharp.Excel_yieldCurve serial_excel_yieldCurve = serial_Excel_forwardModel.Excel_yieldCurve_;
     string excel_yieldCurvetype = serial_excel_yieldCurve.Excel_type_.ValueStr;
     this.excel_yieldCurveViewModel_ = Excel_yieldCurveViewModel.CreateExcel_yieldCurve(excel_yieldCurvetype);
     this.excel_yieldCurveViewModel_.setFromSerial(serial_excel_yieldCurve);
     
     this.vba_description_ = serial_Excel_forwardModel.Vba_description_.ValueStr;
     
 }
        public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.Excel_underlyingModel_para serial_Excel_underlyingModel_para = serial_Class as FpmlSerializedCSharp.Excel_underlyingModel_para;
            FpmlSerializedCSharp.Excel_hullWhiteOneFactor serial_Excel_hullWhiteOneFactor = serial_Excel_underlyingModel_para.Excel_hullWhiteOneFactor_;

            this.currentValue_ = serial_Excel_hullWhiteOneFactor.CurrentValue_.ValueStr;
            this.alpha_ = serial_Excel_hullWhiteOneFactor.Alpha_.ValueStr;
            this.volatility_ = serial_Excel_hullWhiteOneFactor.Volatility_.ValueStr;
            this.linkedCurveCode_ = serial_Excel_hullWhiteOneFactor.LinkedCurveCode_.ValueStr;

            FpmlSerializedCSharp.Excel_rateInfo serial_excel_rateInfo = serial_Excel_hullWhiteOneFactor.Excel_rateInfo_;
            this.excel_rateInfoViewModel_ = new Excel_rateInfoViewModel();
            this.excel_rateInfoViewModel_.setFromSerial(serial_excel_rateInfo);
            
            FpmlSerializedCSharp.Excel_yieldCurve serial_excel_yieldCurve = serial_Excel_hullWhiteOneFactor.Excel_yieldCurve_;
            this.excel_yieldCurveViewModel_ = new Excel_yieldCurveViewModel();
            this.excel_yieldCurveViewModel_.setFromSerial(serial_excel_yieldCurve);
  
        }
 public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
 {
     FpmlSerializedCSharp.Excel_underlyingModel_para serial_Excel_underlyingModel_para = serial_Class as FpmlSerializedCSharp.Excel_underlyingModel_para;
     FpmlSerializedCSharp.Excel_hullWhiteOneFactor serial_Excel_hullWhiteOneFactor = serial_Excel_underlyingModel_para.Excel_hullWhiteOneFactor_;
 
     this.currentValue_ = serial_Excel_hullWhiteOneFactor.CurrentValue_.ValueStr;
     
     this.alpha_ = serial_Excel_hullWhiteOneFactor.Alpha_.ValueStr;
     
     this.volatility_ = serial_Excel_hullWhiteOneFactor.Volatility_.ValueStr;
     
     FpmlSerializedCSharp.Excel_rateInfo serial_excel_rateInfo = serial_Excel_hullWhiteOneFactor.Excel_rateInfo_;
     string excel_rateInfotype = serial_excel_rateInfo.Excel_type_.ValueStr;
     this.excel_rateInfoViewModel_ = Excel_rateInfoViewModel.CreateExcel_rateInfo(excel_rateInfotype);
     this.excel_rateInfoViewModel_.setFromSerial(serial_excel_rateInfo);
     
     this.linkedCurveCode_ = serial_Excel_hullWhiteOneFactor.LinkedCurveCode_.ValueStr;
     
     FpmlSerializedCSharp.Excel_yieldCurve serial_excel_yieldCurve = serial_Excel_hullWhiteOneFactor.Excel_yieldCurve_;
     string excel_yieldCurvetype = serial_excel_yieldCurve.Excel_type_.ValueStr;
     this.excel_yieldCurveViewModel_ = Excel_yieldCurveViewModel.CreateExcel_yieldCurve(excel_yieldCurvetype);
     this.excel_yieldCurveViewModel_.setFromSerial(serial_excel_yieldCurve);
     
     this.vba_description_ = serial_Excel_hullWhiteOneFactor.Vba_description_.ValueStr;
     
 }
 public YieldTermStructure()
 {
     this.Excel_yieldCurveViewModel_ = new Excel_yieldCurveViewModel();
 }