public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_parameter serial_Excel_parameter = serial_Class as FpmlSerializedCSharp.Excel_parameter; FpmlSerializedCSharp.Excel_standardCreditPara serial_Excel_standardCreditPara = serial_Excel_parameter.Excel_standardCreditPara_; this.referenceDate_ = StringConverter.xmlDateToDateTime(serial_Excel_standardCreditPara.ReferenceDate_.ValueStr); this.simulationNum_ = serial_Excel_standardCreditPara.SimulationNum_.ValueStr; FpmlSerializedCSharp.Excel_underlyingCalcInfo_para serial_excel_underlyingCalcInfo_para = serial_Excel_standardCreditPara.Excel_underlyingCalcInfo_para_; string excel_underlyingCalcInfo_paratype = serial_excel_underlyingCalcInfo_para.Excel_type_.ValueStr; this.excel_underlyingCalcInfo_paraViewModel_ = Excel_underlyingCalcInfo_paraViewModel.CreateExcel_underlyingCalcInfo_para(excel_underlyingCalcInfo_paratype); this.excel_underlyingCalcInfo_paraViewModel_.setFromSerial(serial_excel_underlyingCalcInfo_para); FpmlSerializedCSharp.Excel_referenceCalcInfo_para serial_excel_referenceCalcInfo_para = serial_Excel_standardCreditPara.Excel_referenceCalcInfo_para_; string excel_referenceCalcInfo_paratype = serial_excel_referenceCalcInfo_para.Excel_type_.ValueStr; this.excel_referenceCalcInfo_paraViewModel_ = Excel_referenceCalcInfo_paraViewModel.CreateExcel_referenceCalcInfo_para(excel_referenceCalcInfo_paratype); this.excel_referenceCalcInfo_paraViewModel_.setFromSerial(serial_excel_referenceCalcInfo_para); FpmlSerializedCSharp.Excel_discountCurve_para serial_excel_discountCurve_para = serial_Excel_standardCreditPara.Excel_discountCurve_para_; string excel_discountCurve_paratype = serial_excel_discountCurve_para.Excel_type_.ValueStr; this.excel_discountCurve_paraViewModel_ = Excel_discountCurve_paraViewModel.CreateExcel_discountCurve_para(excel_discountCurve_paratype); this.excel_discountCurve_paraViewModel_.setFromSerial(serial_excel_discountCurve_para); FpmlSerializedCSharp.Excel_defaultCurve_para serial_excel_defaultCurve_para = serial_Excel_standardCreditPara.Excel_defaultCurve_para_; string excel_defaultCurve_paratype = serial_excel_defaultCurve_para.Excel_type_.ValueStr; this.excel_defaultCurve_paraViewModel_ = Excel_defaultCurve_paraViewModel.CreateExcel_defaultCurve_para(excel_defaultCurve_paratype); this.excel_defaultCurve_paraViewModel_.setFromSerial(serial_excel_defaultCurve_para); }
public Excel_stepDownKICustomParaViewModel() { this.excel_underlyingCalcInfo_paraViewModel_ = new Excel_underlyingCalcInfo_paraViewModel(); this.excel_discountCurve_paraViewModel_ = new Excel_discountCurve_paraViewModel(); this.Excel_resultViewModel_ = new Excel_resultViewModel(); //this.view_ = new Excel_stepDownKICustomParaView(); //this.view_.DataContext = this; }
private void ViewModelChanged(object sender, DependencyPropertyChangedEventArgs e) { this.viewModel_ = this.DataContext as Excel_underlyingCalcInfo_paraViewModel; this.UnderlyingParaGrid_.ItemsSource = this.viewModel_.Excel_underlyingInfo_paraViewModel_; this.correlationDataGrid_.ItemsSource = this.viewModel_.Excel_correlationInfo_paraViewModel_.Excel_correlation_paraViewModel_; //this.correlationGrid_.Children.Clear(); //this.correlationGrid_.Children.Add(this.viewModel_.CorrelationInfo_paraViewModel_.View_); }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_parameter serial_Excel_parameter = serial_Class as FpmlSerializedCSharp.Excel_parameter; FpmlSerializedCSharp.Excel_standardHifivePara serial_Excel_standardHifivePara = serial_Excel_parameter.Excel_standardHifivePara_; this.referenceDate_ = StringConverter.xmlDateToDateTime(serial_Excel_standardHifivePara.ReferenceDate_.ValueStr); this.simulationNum_ = serial_Excel_standardHifivePara.SimulationNum_.ValueStr; FpmlSerializedCSharp.Excel_underlyingCalcInfo_para serial_excel_underlyingCalcInfo_para = serial_Excel_standardHifivePara.Excel_underlyingCalcInfo_para_; this.excel_underlyingCalcInfo_paraViewModel_ = new Excel_underlyingCalcInfo_paraViewModel(); this.excel_underlyingCalcInfo_paraViewModel_.setFromSerial(serial_excel_underlyingCalcInfo_para); FpmlSerializedCSharp.Excel_discountCurve_para serial_excel_discountCurve_para = serial_Excel_standardHifivePara.Excel_discountCurve_para_; this.excel_discountCurve_paraViewModel_ = new Excel_discountCurve_paraViewModel(); this.excel_discountCurve_paraViewModel_.setFromSerial(serial_excel_discountCurve_para); }
public override void buildParameterFromInstrument(DateTime refDate) { //xml load //this.excel_interfaceViewModel_.load Excel_standardParaViewModel e_spvm = this.Excel_parameterViewModel_ as Excel_standardParaViewModel; //new Excel_standardParaViewModel(); e_spvm.ItemCode_ = this.masterInformationViewModel_.Item_code_; UnderlyingModelSettingManager umsm = new UnderlyingModelSettingManager(); e_spvm.Excel_underlyingCalcInfo_paraViewModel_.Excel_underlyingInfo_paraViewModel_.Clear(); Excel_underlyingCalcInfo_paraViewModel e_ucivm = umsm.underInfo_para(this.excel_interfaceViewModel_.Excel_underlyingCalcInfoViewModel_); e_spvm.Excel_underlyingCalcInfo_paraViewModel_ = e_ucivm; this.excel_parameterViewModel_ = e_spvm; }
public Excel_underlyingCalcInfo_paraViewModel underInfo_para(Excel_underlyingCalcInfoViewModel underInfo) { Excel_underlyingCalcInfo_paraViewModel e_uc_pvm = new Excel_underlyingCalcInfo_paraViewModel(); Excel_underlyingInfo_paraViewModel e_u_pvm = new Excel_underlyingInfo_paraViewModel(); e_u_pvm.Excel_underlyingModel_paraViewModel_ = new Excel_geometricBMViewModel(); e_u_pvm.CurrentValue_ = "100"; Excel_geometricBMViewModel e_gbmvm = new Excel_geometricBMViewModel(); e_gbmvm.Dividend_ = "0.012"; e_gbmvm.Drift_ = "0.03"; e_gbmvm.Volatility_ = "0.03"; e_u_pvm.Excel_underlyingModel_paraViewModel_ = e_gbmvm; e_uc_pvm.Excel_underlyingInfo_paraViewModel_.Add(e_u_pvm); return e_uc_pvm; }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_parameter serial_Excel_parameter = serial_Class as FpmlSerializedCSharp.Excel_parameter; FpmlSerializedCSharp.Excel_standardSwapPara serial_Excel_standardSwapPara = serial_Excel_parameter.Excel_standardSwapPara_; this.referenceDate_ = StringConverter.xmlDateToDateTime(serial_Excel_standardSwapPara.ReferenceDate_.ValueStr); this.simulationNum_ = serial_Excel_standardSwapPara.SimulationNum_.ValueStr; FpmlSerializedCSharp.Excel_underlyingCalcInfo_para serial_excel_underlyingCalcInfo_para = serial_Excel_standardSwapPara.Excel_underlyingCalcInfo_para_; //string excel_underlyingCalcInfo_paratype = serial_excel_underlyingCalcInfo_para.Excel_type_.ValueStr; this.excel_underlyingCalcInfo_paraViewModel_ = new Excel_underlyingCalcInfo_paraViewModel(); this.excel_underlyingCalcInfo_paraViewModel_.setFromSerial(serial_excel_underlyingCalcInfo_para); FpmlSerializedCSharp.Excel_discountCurve_para serial_excel_discountCurve_para = serial_Excel_standardSwapPara.Excel_discountCurve_para_; //string excel_discountCurve_paratype = serial_excel_discountCurve_para.Excel_type_.ValueStr; this.excel_discountCurve_paraViewModel_ = new Excel_discountCurve_paraViewModel(); this.excel_discountCurve_paraViewModel_.setFromSerial(serial_excel_discountCurve_para); //List<FpmlSerializedCSharp.Excel_underlyingCalcInfo_para> serial_excel_underlyingCalcInfo_para = serial_Excel_standardSwapPara.Excel_underlyingCalcInfo_para_; //this.excel_underlyingCalcInfo_paraViewModel_ = new ObservableCollection<Excel_underlyingCalcInfo_paraViewModel>(); //foreach (var item in serial_excel_underlyingCalcInfo_para) //{ // //string type = item.Excel_type_.ValueStr; // Excel_underlyingCalcInfo_paraViewModel viewModel = new Excel_underlyingCalcInfo_paraViewModel(); // viewModel.setFromSerial(item); // this.excel_underlyingCalcInfo_paraViewModel_.Add(viewModel); //} //List<FpmlSerializedCSharp.Excel_discountCurve_para> serial_excel_discountCurve_para = serial_Excel_standardSwapPara.Excel_discountCurve_para_; //this.excel_discountCurve_paraViewModel_ = new ObservableCollection<Excel_discountCurve_paraViewModel>(); //foreach (var item in serial_excel_discountCurve_para) //{ // //string type = item.Excel_type_.ValueStr; // Excel_discountCurve_paraViewModel viewModel = new Excel_discountCurve_paraViewModel(); // viewModel.setFromSerial(item); // this.excel_discountCurve_paraViewModel_.Add(viewModel); //} }
public Excel_underlyingCalcInfo_paraViewModel underInfo_para(Excel_underlyingCalcInfoViewModel underInfo) { Excel_underlyingCalcInfo_paraViewModel e_uc_pvm = new Excel_underlyingCalcInfo_paraViewModel(); Excel_underlyingInfo_paraViewModel e_u_pvm = new Excel_underlyingInfo_paraViewModel(); e_u_pvm.Excel_underlyingModel_paraViewModel_ = new Excel_geometricBMViewModel(); e_u_pvm.CurrentValue_ = "100"; Excel_geometricBMViewModel e_gbmvm = new Excel_geometricBMViewModel(); e_gbmvm.Dividend_ = "0.012"; e_gbmvm.Drift_ = "0.03"; e_gbmvm.Volatility_ = "0.03"; e_u_pvm.Excel_underlyingModel_paraViewModel_ = e_gbmvm; e_uc_pvm.Excel_underlyingInfo_paraViewModel_.Add(e_u_pvm); return(e_uc_pvm); }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_parameter serial_Excel_parameter = serial_Class as FpmlSerializedCSharp.Excel_parameter; FpmlSerializedCSharp.Excel_standardCreditPara serial_Excel_standardCreditPara = serial_Excel_parameter.Excel_standardCreditPara_; this.referenceDate_ = StringConverter.xmlDateToDateTime(serial_Excel_standardCreditPara.ReferenceDate_.ValueStr); this.simulationNum_ = serial_Excel_standardCreditPara.SimulationNum_.ValueStr; FpmlSerializedCSharp.Excel_underlyingCalcInfo_para serial_excel_underlyingCalcInfo_para = serial_Excel_standardCreditPara.Excel_underlyingCalcInfo_para_; //string excel_underlyingCalcInfo_paratype = serial_excel_underlyingCalcInfo_para.Excel_type_.ValueStr; this.excel_underlyingCalcInfo_paraViewModel_ = new Excel_underlyingCalcInfo_paraViewModel();//.CreateExcel_underlyingCalcInfo_para(excel_underlyingCalcInfo_paratype); this.excel_underlyingCalcInfo_paraViewModel_.setFromSerial(serial_excel_underlyingCalcInfo_para); FpmlSerializedCSharp.Excel_referenceCalcInfo_para serial_excel_referenceCalcInfo_para = serial_Excel_standardCreditPara.Excel_referenceCalcInfo_para_; //string excel_referenceCalcInfo_paratype = serial_excel_referenceCalcInfo_para.Excel_type_.ValueStr; this.excel_referenceCalcInfo_paraViewModel_ = new Excel_referenceCalcInfo_paraViewModel();//.CreateExcel_referenceCalcInfo_para(excel_referenceCalcInfo_paratype); this.excel_referenceCalcInfo_paraViewModel_.setFromSerial(serial_excel_referenceCalcInfo_para); FpmlSerializedCSharp.Excel_discountCurve_para serial_excel_discountCurve_para = serial_Excel_standardCreditPara.Excel_discountCurve_para_; //string excel_discountCurve_paratype = serial_excel_discountCurve_para.Excel_type_.ValueStr; this.excel_discountCurve_paraViewModel_ = new Excel_discountCurve_paraViewModel();//.CreateExcel_discountCurve_para(excel_discountCurve_paratype); this.excel_discountCurve_paraViewModel_.setFromSerial(serial_excel_discountCurve_para); //FpmlSerializedCSharp.Excel_defaultCurve_para serial_excel_defaultCurve_para = serial_Excel_standardCreditPara.Excel_defaultCurve_para_; ////string excel_defaultCurve_paratype = serial_excel_defaultCurve_para.Excel_type_.ValueStr; //this.excel_defaultCurve_paraViewModel_ = new Excel_defaultCurve_paraViewModel(); //this.excel_defaultCurve_paraViewModel_.setFromSerial(serial_excel_defaultCurve_para); }