public override Excel_multiAsset_compositeOption_subtypeViewModel Clone() { Excel_multiAsset_vanillaCallPutViewModel clone = new Excel_multiAsset_vanillaCallPutViewModel(); clone.Excel_underlyingCalcInfoViewModel_ = this.excel_underlyingCalcInfoViewModel_; clone.BaseCoupon_ = this.baseCoupon_; clone.Excel_underlyingCalcIDViewModel_ = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(this.Excel_underlyingCalcIDViewModel_.Excel_type_); clone.Excel_underlyingCalcIDViewModel_.setUnderlying(this.excel_underlyingCalcInfoViewModel_); clone.PartiRate_ = this.partiRate_; clone.Description_ = this.description_; clone.CallPut_ = this.callPut_; clone.ExerciseDate_ = this.exerciseDate_; clone.PayoffDate_ = this.payoffDate_; clone.Strike_ = this.strike_; //clone.StrikeValue_ = this.strikeValue_; this.descriptionUpdate(); clone.Description_ = this.description_; return(clone); }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_couponSchedule serial_Excel_couponSchedule = serial_Class as FpmlSerializedCSharp.Excel_couponSchedule; FpmlSerializedCSharp.Excel_vanillaFloatingCouponSchedule serial_Excel_vanillaFloatingCouponSchedule = serial_Excel_couponSchedule.Excel_vanillaFloatingCouponSchedule_; base.setFromSerial(serial_Excel_couponSchedule.Excel_additionalOption_); this.eventDate_ = StringConverter.xmlDateToDateTime(serial_Excel_vanillaFloatingCouponSchedule.EventDate_.ValueStr); this.payoffDate_ = StringConverter.xmlDateToDateTime(serial_Excel_vanillaFloatingCouponSchedule.PayoffDate_.ValueStr); this.calculationStartDate_ = StringConverter.xmlDateToDateTime(serial_Excel_vanillaFloatingCouponSchedule.CalculationStartDate_.ValueStr); this.calculationEndDate_ = StringConverter.xmlDateToDateTime(serial_Excel_vanillaFloatingCouponSchedule.CalculationEndDate_.ValueStr); this.description_ = serial_Excel_vanillaFloatingCouponSchedule.Description_.ValueStr; this.vba_description_ = serial_Excel_vanillaFloatingCouponSchedule.Vba_description_.ValueStr; this.gearing_ = serial_Excel_vanillaFloatingCouponSchedule.Gearing_.ValueStr; this.spread_ = serial_Excel_vanillaFloatingCouponSchedule.Spread_.ValueStr; this.outGearing_ = serial_Excel_vanillaFloatingCouponSchedule.OutGearing_.ValueStr; this.outSpread_ = serial_Excel_vanillaFloatingCouponSchedule.OutSpread_.ValueStr; this.cap_ = serial_Excel_vanillaFloatingCouponSchedule.Cap_.ValueStr; this.floor_ = serial_Excel_vanillaFloatingCouponSchedule.Floor_.ValueStr; FpmlSerializedCSharp.Excel_underlyingCalcID serial_excel_underlyingCalcID = serial_Excel_vanillaFloatingCouponSchedule.Excel_underlyingCalcID_; string excel_underlyingCalcIDtype = serial_excel_underlyingCalcID.Excel_type_.ValueStr; this.excel_underlyingCalcIDViewModel_ = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(excel_underlyingCalcIDtype); this.excel_underlyingCalcIDViewModel_.setFromSerial(serial_excel_underlyingCalcID); }
public override Excel_multiAsset_compositeOption_subtypeViewModel Clone() { Excel_multiAsset_upInOutCallViewModel clone = new Excel_multiAsset_upInOutCallViewModel(); clone.Excel_underlyingCalcInfoViewModel_ = this.excel_underlyingCalcInfoViewModel_; clone.ExerciseDate_ = this.exerciseDate_; clone.PayoffDate_ = this.payoffDate_; clone.InOut_ = this.inOut_; //clone.BaseUnderlyingValue_ = this.baseUnderlyingValue_; clone.partiRate_ = this.partiRate_; clone.BaseCoupon_ = this.baseCoupon_; clone.Strike_ = this.strike_; //clone.StrikeValue_ = this.strikeValue_; clone.Barrier_ = this.barrier_; //clone.BarrierValue_ = this.BarrierValue_; clone.RebateCoupon_ = this.rebateCoupon_; clone.RebateCouponValue_ = this.rebateCouponValue_; clone.ReturnUnderlyingCalcIDViewModel_ = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(this.returnUnderlyingCalcIDViewModel_.Excel_type_); clone.ReturnUnderlyingCalcIDViewModel_.setUnderlying(this.excel_underlyingCalcInfoViewModel_); clone.BarrierUnderlyingCalcIDViewModel_ = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(this.barrierUnderlyingCalcIDViewModel_.Excel_type_); clone.BarrierUnderlyingCalcIDViewModel_.setUnderlying(this.excel_underlyingCalcInfoViewModel_); clone.ObservationStartDate_ = this.observationStartDate_; clone.ObservationEndDate_ = this.observationEndDate_; this.descriptionUpdate(); clone.Description_ = this.description_; return(clone); }
public void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_multi_rangeND serial_Excel_multi_rangeND = serial_Class as FpmlSerializedCSharp.Excel_multi_rangeND; this.joint_type_ = serial_Excel_multi_rangeND.Joint_type_.ValueStr; List <FpmlSerializedCSharp.Range1D> serial_range1D = serial_Excel_multi_rangeND.Range1D_; this.range1DViewModel_ = new ObservableCollection <Range1DViewModel>(); foreach (var item in serial_range1D) { string type = item.Excel_type_.ValueStr; Range1DViewModel viewModel = Range1DViewModel.CreateRange1D(type); viewModel.setFromSerial(item); this.range1DViewModel_.Add(viewModel); } List <FpmlSerializedCSharp.Excel_underlyingCalcID> serial_excel_underlyingCalcID = serial_Excel_multi_rangeND.Excel_underlyingCalcID_; this.excel_underlyingCalcIDViewModel_ = new ObservableCollection <Excel_underlyingCalcIDViewModel>(); foreach (var item in serial_excel_underlyingCalcID) { string type = item.Excel_type_.ValueStr; Excel_underlyingCalcIDViewModel viewModel = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(type); viewModel.setFromSerial(item); this.excel_underlyingCalcIDViewModel_.Add(viewModel); } }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_multiAsset_compositeOption_subtype serial_Excel_multiAsset_compositeOption_subtype = serial_Class as FpmlSerializedCSharp.Excel_multiAsset_compositeOption_subtype; FpmlSerializedCSharp.Excel_multiAsset_vanillaCallPut serial_Excel_multiAsset_vanillaCallPut = serial_Excel_multiAsset_compositeOption_subtype.Excel_multiAsset_vanillaCallPut_; this.payoffDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_vanillaCallPut.PayoffDate_.ValueStr); this.exerciseDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_vanillaCallPut.ExerciseDate_.ValueStr); this.baseUnderlyingValue_ = serial_Excel_multiAsset_vanillaCallPut.BaseUnderlyingValue_.ValueStr; this.callPut_ = serial_Excel_multiAsset_vanillaCallPut.CallPut_.ValueStr; this.baseCoupon_ = serial_Excel_multiAsset_vanillaCallPut.BaseCoupon_.ValueStr; this.strike_ = serial_Excel_multiAsset_vanillaCallPut.Strike_.ValueStr; this.strikeValue_ = serial_Excel_multiAsset_vanillaCallPut.StrikeValue_.ValueStr; this.partiRate_ = serial_Excel_multiAsset_vanillaCallPut.PartiRate_.ValueStr; FpmlSerializedCSharp.Excel_underlyingCalcID serial_excel_underlyingCalcID = serial_Excel_multiAsset_vanillaCallPut.Excel_underlyingCalcID_; string excel_underlyingCalcIDtype = serial_excel_underlyingCalcID.Excel_type_.ValueStr; this.excel_underlyingCalcIDViewModel_ = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(excel_underlyingCalcIDtype); this.excel_underlyingCalcIDViewModel_.setFromSerial(serial_excel_underlyingCalcID); }
public void initialize(Excel_underlyingCalcIDViewModel e_ucidvm) { this.underCalcIDTypeCombBox_.SelectedIndex = this.comboBoxNum(e_ucidvm.Excel_type_); this.underCalcIDTypeCombBox_.SelectionChanged += new SelectionChangedEventHandler(ComboBox_SelectionChanged); //view는 loaderView에서 적용했음. // 이건 submit했을때 적용할거 저장함. this.selectedUnderCalcIDTypeViewModel_ = e_ucidvm; }
public override void defaultSetting() { Excel_maximumUnderlyingCalcIDViewModel e_mucidvm = new Excel_maximumUnderlyingCalcIDViewModel(); e_mucidvm.AverageDays_ = "1"; this.excel_underlyingCalcIDViewModel_ = e_mucidvm; }
public override void DefaultSetting(Excel_multiAssetCompositeOptionViewModel e_mcovm) { this.callPut_ = CallPutEnum.Call; this.partiRate_ = "100.0"; this.strike_ = "100.0"; this.baseCoupon_ = "0.0"; //this.strikeValue_ = Convert.ToDouble(this.strike_) * this.baseUnderlyingValue_; this.excel_underlyingCalcIDViewModel_ = new Excel_maximumUnderlyingCalcIDViewModel(); }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_couponSchedule serial_Excel_couponSchedule = serial_Class as FpmlSerializedCSharp.Excel_couponSchedule; FpmlSerializedCSharp.Excel_multiCondi_structuredAccrualCouponSchedule serial_Excel_multiCondi_structuredAccrualCouponSchedule = serial_Excel_couponSchedule.Excel_multiCondi_structuredAccrualCouponSchedule_; this.eventDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiCondi_structuredAccrualCouponSchedule.EventDate_.ValueStr); this.payoffDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiCondi_structuredAccrualCouponSchedule.PayoffDate_.ValueStr); this.calculationStartDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiCondi_structuredAccrualCouponSchedule.CalculationStartDate_.ValueStr); this.calculationEndDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiCondi_structuredAccrualCouponSchedule.CalculationEndDate_.ValueStr); this.description_ = serial_Excel_multiCondi_structuredAccrualCouponSchedule.Description_.ValueStr; this.vba_description_ = serial_Excel_multiCondi_structuredAccrualCouponSchedule.Vba_description_.ValueStr; List <FpmlSerializedCSharp.Range1D> serial_range1D = serial_Excel_multiCondi_structuredAccrualCouponSchedule.Range1D_; this.range1DViewModel_ = new ObservableCollection <Range1DViewModel>(); foreach (var item in serial_range1D) { string type = item.Excel_type_.ValueStr; Range1DViewModel viewModel = Range1DViewModel.CreateRange1D(type); viewModel.setFromSerial(item); this.range1DViewModel_.Add(viewModel); } List <FpmlSerializedCSharp.Excel_underlyingCalcID> serial_excel_underlyingCalcID = serial_Excel_multiCondi_structuredAccrualCouponSchedule.Excel_underlyingCalcID_; this.excel_underlyingCalcIDViewModel_ = new ObservableCollection <Excel_underlyingCalcIDViewModel>(); foreach (var item in serial_excel_underlyingCalcID) { string type = item.Excel_type_.ValueStr; Excel_underlyingCalcIDViewModel viewModel = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(type); viewModel.setFromSerial(item); this.excel_underlyingCalcIDViewModel_.Add(viewModel); } List <FpmlSerializedCSharp.Excel_returnCalcInfo> serial_excel_returnCalcInfo = serial_Excel_multiCondi_structuredAccrualCouponSchedule.Excel_returnCalcInfo_; this.excel_returnCalcInfoViewModel_ = new ObservableCollection <Excel_returnCalcInfoViewModel>(); foreach (var item in serial_excel_returnCalcInfo) { string type = item.Excel_type_.ValueStr; Excel_returnCalcInfoViewModel viewModel = Excel_returnCalcInfoViewModel.CreateExcel_returnCalcInfo(type); viewModel.setFromSerial(item); this.excel_returnCalcInfoViewModel_.Add(viewModel); } this.dayCounter_ = serial_Excel_multiCondi_structuredAccrualCouponSchedule.DayCounter_.ValueStr; this.detailScheduleType_ = serial_Excel_multiCondi_structuredAccrualCouponSchedule.DetailScheduleType_.ValueStr; }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_couponSchedule serial_Excel_couponSchedule = serial_Class as FpmlSerializedCSharp.Excel_couponSchedule; FpmlSerializedCSharp.Excel_vanillaFloatingCouponSchedule serial_Excel_vanillaFloatingCouponSchedule = serial_Excel_couponSchedule.Excel_vanillaFloatingCouponSchedule_; this.gearing_ = serial_Excel_vanillaFloatingCouponSchedule.Gearing_.ValueStr; this.spread_ = serial_Excel_vanillaFloatingCouponSchedule.Spread_.ValueStr; FpmlSerializedCSharp.Excel_underlyingCalcID serial_excel_underlyingCalcID = serial_Excel_vanillaFloatingCouponSchedule.Excel_underlyingCalcID_; string excel_underlyingCalcIDtype = serial_excel_underlyingCalcID.Excel_type_.ValueStr; this.excel_underlyingCalcIDViewModel_ = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(excel_underlyingCalcIDtype); this.excel_underlyingCalcIDViewModel_.setFromSerial(serial_excel_underlyingCalcID); }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_returnCalcInfo serial_Excel_returnCalcInfo = serial_Class as FpmlSerializedCSharp.Excel_returnCalcInfo; FpmlSerializedCSharp.Excel_vanillaReturnCal serial_Excel_vanillaReturnCal = serial_Excel_returnCalcInfo.Excel_vanillaReturnCal_; this.gearing_ = serial_Excel_vanillaReturnCal.Gearing_.ValueStr; this.spread_ = serial_Excel_vanillaReturnCal.Spread_.ValueStr; FpmlSerializedCSharp.Excel_underlyingCalcID serial_excel_underlyingCalcID = serial_Excel_vanillaReturnCal.Excel_underlyingCalcID_; string excel_underlyingCalcIDtype = serial_excel_underlyingCalcID.Excel_type_.ValueStr; this.excel_underlyingCalcIDViewModel_ = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(excel_underlyingCalcIDtype); this.excel_underlyingCalcIDViewModel_.setFromSerial(serial_excel_underlyingCalcID); }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_eventCalcInfo serial_Excel_eventCalcInfo = serial_Class as FpmlSerializedCSharp.Excel_eventCalcInfo; FpmlSerializedCSharp.Excel_dualRangeEventCal serial_Excel_dualRangeEventCal = serial_Excel_eventCalcInfo.Excel_dualRangeEventCal_; this.lowerRng_ = serial_Excel_dualRangeEventCal.LowerRng_.ValueStr; this.upperRng_ = serial_Excel_dualRangeEventCal.UpperRng_.ValueStr; FpmlSerializedCSharp.Excel_underlyingCalcID serial_excel_underlyingCalcID = serial_Excel_dualRangeEventCal.Excel_underlyingCalcID_; string excel_underlyingCalcIDtype = serial_excel_underlyingCalcID.Excel_type_.ValueStr; this.excel_underlyingCalcIDViewModel_ = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(excel_underlyingCalcIDtype); this.excel_underlyingCalcIDViewModel_.setFromSerial(serial_excel_underlyingCalcID); }
public override void setUnderlying(Excel_underlyingCalcInfoViewModel excel_under) { this.excel_underlyingCalcInfoViewModel_ = excel_under; int underCount = excel_under.Excel_underlyingInfoViewModel_.Count; if (underCount > 1) { if (this.returnUnderlyingCalcIDViewModel_ == null) { this.returnUnderlyingCalcIDViewModel_ = new Excel_maximumUnderlyingCalcIDViewModel(); } this.returnUnderlyingCalcIDViewModel_.setUnderlying(excel_under); } }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_eventCalcInfo serial_Excel_eventCalcInfo = serial_Class as FpmlSerializedCSharp.Excel_eventCalcInfo; FpmlSerializedCSharp.Excel_singleBarrierEventCal serial_Excel_singleBarrierEventCal = serial_Excel_eventCalcInfo.Excel_singleBarrierEventCal_; this.lowerTrigger_ = serial_Excel_singleBarrierEventCal.LowerTrigger_.ValueStr; this.upperTrigger_ = serial_Excel_singleBarrierEventCal.UpperTrigger_.ValueStr; FpmlSerializedCSharp.Excel_underlyingCalcID serial_excel_underlyingCalcID = serial_Excel_singleBarrierEventCal.Excel_underlyingCalcID_; string excel_underlyingCalcIDtype = serial_excel_underlyingCalcID.Excel_type_.ValueStr; this.excel_underlyingCalcIDViewModel_ = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(excel_underlyingCalcIDtype); this.excel_underlyingCalcIDViewModel_.setFromSerial(serial_excel_underlyingCalcID); this.observationStartDate_ = StringConverter.xmlDateToDateTime(serial_Excel_singleBarrierEventCal.ObservationStartDate_.ValueStr); this.observationEndDate_ = StringConverter.xmlDateToDateTime(serial_Excel_singleBarrierEventCal.ObservationEndDate_.ValueStr); }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_multiAsset_compositeOption_subtype serial_Excel_multiAsset_compositeOption_subtype = serial_Class as FpmlSerializedCSharp.Excel_multiAsset_compositeOption_subtype; FpmlSerializedCSharp.Excel_multiAsset_upInOutCall serial_Excel_multiAsset_upInOutCall = serial_Excel_multiAsset_compositeOption_subtype.Excel_multiAsset_upInOutCall_; this.payoffDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.PayoffDate_.ValueStr); this.exerciseDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.ExerciseDate_.ValueStr); this.inOut_ = serial_Excel_multiAsset_upInOutCall.InOut_.ValueStr; this.baseUnderlyingValue_ = serial_Excel_multiAsset_upInOutCall.BaseUnderlyingValue_.ValueStr; this.baseCoupon_ = serial_Excel_multiAsset_upInOutCall.BaseCoupon_.ValueStr; this.strike_ = serial_Excel_multiAsset_upInOutCall.Strike_.ValueStr; this.strikeValue_ = serial_Excel_multiAsset_upInOutCall.StrikeValue_.ValueStr; this.partiRate_ = serial_Excel_multiAsset_upInOutCall.PartiRate_.ValueStr; this.barrier_ = serial_Excel_multiAsset_upInOutCall.Barrier_.ValueStr; this.barrierValue_ = serial_Excel_multiAsset_upInOutCall.BarrierValue_.ValueStr; this.rebateCoupon_ = serial_Excel_multiAsset_upInOutCall.RebateCoupon_.ValueStr; this.rebateCouponValue_ = serial_Excel_multiAsset_upInOutCall.RebateCouponValue_.ValueStr; List <FpmlSerializedCSharp.Excel_underlyingCalcID> serial_excel_underlyingCalcID = serial_Excel_multiAsset_upInOutCall.Excel_underlyingCalcID_; this.excel_underlyingCalcIDViewModel_ = new ObservableCollection <Excel_underlyingCalcIDViewModel>(); foreach (var item in serial_excel_underlyingCalcID) { string type = item.Excel_type_.ValueStr; Excel_underlyingCalcIDViewModel viewModel = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(type); viewModel.setFromSerial(item); this.excel_underlyingCalcIDViewModel_.Add(viewModel); } this.observationStartDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.ObservationStartDate_.ValueStr); this.observationEndDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.ObservationEndDate_.ValueStr); }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_multiAsset_compositeOption_subtype serial_Excel_multiAsset_compositeOption_subtype = serial_Class as FpmlSerializedCSharp.Excel_multiAsset_compositeOption_subtype; FpmlSerializedCSharp.Excel_multiAsset_upInOutCall serial_Excel_multiAsset_upInOutCall = serial_Excel_multiAsset_compositeOption_subtype.Excel_multiAsset_upInOutCall_; this.inOut_ = Enum.Parse(typeof(InOutEnum), serial_Excel_multiAsset_upInOutCall.InOut_.ValueStr) as InOutEnum?; this.exerciseDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.ExerciseDate_.ValueStr); //this.baseUnderlyingValue_ = serial_Excel_multiAsset_upInOutCall.BaseUnderlyingValue_.DoubleValue(); this.baseCoupon_ = (serial_Excel_multiAsset_upInOutCall.BaseCoupon_.DoubleValue() * 100.0).ToString(); this.strike_ = (serial_Excel_multiAsset_upInOutCall.Strike_.DoubleValue() * 100.0).ToString(); //this.strikeValue_ = serial_Excel_multiAsset_upInOutCall.StrikeValue_.ValueStr; this.partiRate_ = (serial_Excel_multiAsset_upInOutCall.PartiRate_.DoubleValue() * 100.0).ToString(); this.barrier_ = (serial_Excel_multiAsset_upInOutCall.Barrier_.DoubleValue() * 100.0).ToString(); //this.barrierValue_ = serial_Excel_multiAsset_upInOutCall.BarrierValue_.ValueStr; this.rebateCoupon_ = (serial_Excel_multiAsset_upInOutCall.RebateCoupon_.DoubleValue() * 100.0).ToString(); this.rebateCouponValue_ = serial_Excel_multiAsset_upInOutCall.RebateCouponValue_.ValueStr; List <FpmlSerializedCSharp.Excel_underlyingCalcID> serial_excel_underlyingCalcID = serial_Excel_multiAsset_upInOutCall.Excel_underlyingCalcID_; //this.excel_underlyingCalcIDViewModel_ = new ObservableCollection<Excel_underlyingCalcIDViewModel>(); string barrierType = serial_excel_underlyingCalcID[0].Excel_type_.ValueStr; Excel_underlyingCalcIDViewModel barrier_viewModel = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(barrierType); barrier_viewModel.setFromSerial(serial_excel_underlyingCalcID[0]); //this.excel_underlyingCalcIDViewModel_.Add(barrier_viewModel); barrierUnderlyingCalcIDViewModel_ = barrier_viewModel; //returnCalcID string returnType = serial_excel_underlyingCalcID[1].Excel_type_.ValueStr; Excel_underlyingCalcIDViewModel return_viewModel = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(returnType); return_viewModel.setFromSerial(serial_excel_underlyingCalcID[1]); //this.excel_underlyingCalcIDViewModel_.Add(return_viewModel); returnUnderlyingCalcIDViewModel_ = return_viewModel; this.observationStartDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.ObservationStartDate_.ValueStr); this.observationEndDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.ObservationEndDate_.ValueStr); this.descriptionUpdate(); }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_multiAsset_compositeOption_subtype serial_Excel_multiAsset_compositeOption_subtype = serial_Class as FpmlSerializedCSharp.Excel_multiAsset_compositeOption_subtype; FpmlSerializedCSharp.Excel_multiAsset_vanillaCallPut serial_Excel_multiAsset_vanillaCallPut = serial_Excel_multiAsset_compositeOption_subtype.Excel_multiAsset_vanillaCallPut_; this.exerciseDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_vanillaCallPut.ExerciseDate_.ValueStr); this.payoffDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_vanillaCallPut.PayoffDate_.ValueStr); //this.baseUnderlyingValue_ = serial_Excel_multiAsset_vanillaCallPut.BaseUnderlyingValue_.DoubleValue(); this.callPut_ = Enum.Parse(typeof(CallPutEnum), serial_Excel_multiAsset_vanillaCallPut.CallPut_.ValueStr) as CallPutEnum?; this.baseCoupon_ = (serial_Excel_multiAsset_vanillaCallPut.BaseCoupon_.DoubleValue() * 100.0).ToString(); this.strike_ = (serial_Excel_multiAsset_vanillaCallPut.Strike_.DoubleValue() * 100.0).ToString(); //this.strikeValue_ = serial_Excel_multiAsset_vanillaCallPut.StrikeValue_.DoubleValue(); this.partiRate_ = (serial_Excel_multiAsset_vanillaCallPut.PartiRate_.DoubleValue() * 100.0).ToString(); //this.underlyingCalcType_ = serial_Excel_multiAsset_vanillaCallPut.UnderlyingCalcType_.ValueStr; FpmlSerializedCSharp.Excel_underlyingCalcID serial_returnUnderlyingCalcID = serial_Excel_multiAsset_vanillaCallPut.Excel_underlyingCalcID_; string returnUnderlyingCalcIDtype = serial_returnUnderlyingCalcID.Excel_type_.ValueStr; this.excel_underlyingCalcIDViewModel_ = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(returnUnderlyingCalcIDtype); this.excel_underlyingCalcIDViewModel_.setFromSerial(serial_returnUnderlyingCalcID); }
// 여기서 데이터 입출력을 하고 BARRIER 랑 RETURN에서 처리함 //#region Excel_underlyingCalcIDViewModel_ //private ObservableCollection<Excel_underlyingCalcIDViewModel> excel_underlyingCalcIDViewModel_; //public ObservableCollection<Excel_underlyingCalcIDViewModel> Excel_underlyingCalcIDViewModel_ //{ // get { return this.excel_underlyingCalcIDViewModel_; } // set // { // if (this.excel_underlyingCalcIDViewModel_ != value) // { // this.excel_underlyingCalcIDViewModel_ = value; // this.NotifyPropertyChanged("Excel_underlyingCalcIDViewModel_"); // } // } //} //#endregion public override void DefaultSetting(Excel_multiAssetCompositeOptionViewModel e_mcovm) { this.inOut_ = InOutEnum.Out; this.baseCoupon_ = "0.0"; this.strike_ = "100.0"; this.returnUnderlyingCalcIDViewModel_ = new Excel_minimumUnderlyingCalcIDViewModel(); //this.returnUnderlyingCalcIDViewModel_.setUnderlying(this.excel_underlyingCalcInfoViewModel_); //this.strikeValue_ = Convert.ToDouble(this.strike_) * this.baseUnderlyingValue_ / 100.0; this.partiRate_ = "100.0"; this.barrier_ = "120.0"; this.barrierUnderlyingCalcIDViewModel_ = new Excel_maximumUnderlyingCalcIDViewModel(); //this.barrierUnderlyingCalcIDViewModel_.setUnderlying(this.excel_underlyingCalcInfoViewModel_); //this.barrierValue_ = Convert.ToDouble(this.barrier_) * this.baseUnderlyingValue_ / 100.0; this.rebateCoupon_ = "0.0"; this.rebateCouponValue_ = "0.0"; this.observationStartDate_ = e_mcovm.Excel_issueInfoViewModel_.EffectiveDate_; this.observationEndDate_ = e_mcovm.Excel_issueInfoViewModel_.MaturityDate_; }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_couponSchedule serial_Excel_couponSchedule = serial_Class as FpmlSerializedCSharp.Excel_couponSchedule; FpmlSerializedCSharp.Excel_vanillaFloatingCouponSchedule serial_Excel_vanillaFloatingCouponSchedule = serial_Excel_couponSchedule.Excel_vanillaFloatingCouponSchedule_; this.eventDate_ = StringConverter.xmlDateToDateTime(serial_Excel_vanillaFloatingCouponSchedule.EventDate_.ValueStr); this.payoffDate_ = StringConverter.xmlDateToDateTime(serial_Excel_vanillaFloatingCouponSchedule.PayoffDate_.ValueStr); this.calculationStartDate_ = StringConverter.xmlDateToDateTime(serial_Excel_vanillaFloatingCouponSchedule.CalculationStartDate_.ValueStr); this.calculationEndDate_ = StringConverter.xmlDateToDateTime(serial_Excel_vanillaFloatingCouponSchedule.CalculationEndDate_.ValueStr); this.description_ = serial_Excel_vanillaFloatingCouponSchedule.Description_.ValueStr; this.vba_description_ = serial_Excel_vanillaFloatingCouponSchedule.Vba_description_.ValueStr; this.gearing_ = serial_Excel_vanillaFloatingCouponSchedule.Gearing_.ValueStr; this.spread_ = serial_Excel_vanillaFloatingCouponSchedule.Spread_.ValueStr; this.outGearing_ = serial_Excel_vanillaFloatingCouponSchedule.OutGearing_.ValueStr; this.outSpread_ = serial_Excel_vanillaFloatingCouponSchedule.OutSpread_.ValueStr; this.cap_ = serial_Excel_vanillaFloatingCouponSchedule.Cap_.ValueStr; this.floor_ = serial_Excel_vanillaFloatingCouponSchedule.Floor_.ValueStr; FpmlSerializedCSharp.Excel_underlyingCalcID serial_excel_underlyingCalcID = serial_Excel_vanillaFloatingCouponSchedule.Excel_underlyingCalcID_; string excel_underlyingCalcIDtype = serial_excel_underlyingCalcID.Excel_type_.ValueStr; this.excel_underlyingCalcIDViewModel_ = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(excel_underlyingCalcIDtype); this.excel_underlyingCalcIDViewModel_.setFromSerial(serial_excel_underlyingCalcID); }
public override void defaultSetting() { this.gearing_ = "1.0"; this.spread_ = "0.0"; this.returnUnderlyingCalcIDViewModel_ = new Excel_maximumUnderlyingCalcIDViewModel(); }
private Excel_simpleCalculationViewModel excel_simpleCalculationVMBuild(Excel_stepDownKI_subScheduleViewModel scheduleData) { Excel_simpleCalculationViewModel e_cvm = new Excel_simpleCalculationViewModel(); e_cvm.Excel_underlyingCalcInfoViewModel_ = this.Excel_underlyingCalcInfoViewModel_; e_cvm.EventDate_ = scheduleData.EventDate_; e_cvm.PayoffDate_ = this.scheduleGeneratorVM_.addDays(scheduleData.EventDate_, this.settlementDays_); #region EventCal //--------------------------------------------------------------- { //Excel_eventCalcInfoViewModel e_ecivm = new Excel_eventCalcInfoViewModel(); Excel_singleRangeEventCalViewModel e_srecvm = new Excel_singleRangeEventCalViewModel(); e_srecvm.Excel_underlyingCalcInfoViewModel_ = this.Excel_underlyingCalcInfoViewModel_; e_srecvm.LowerRng_ = (Convert.ToDouble(scheduleData.Trigger_) / 100.0).ToString(); e_srecvm.UpperRng_ = "1000"; // 우선 max를 사용함 Excel_underlyingCalcIDViewModel e_mucidvm = Excel_stepDownKI_subScheduleViewModel.CreateExcel_underlyingCalcID(scheduleData); e_mucidvm.setUnderlying(this.Excel_underlyingCalcInfoViewModel_); e_srecvm.Excel_underlyingCalcIDViewModel_ = e_mucidvm; //e_ecivm.Excel_eventCalcViewModel_.Add(e_srecvm); e_cvm.Excel_eventCalcInfoViewModel_ = e_srecvm; //info 에 드가는 곱하기라던지 floor라던지 postCalculation 같은게 붙어야함 } #endregion #region ReturnCal //--------------------------------------------------------------- { //Excel_returnCalcInfoViewModel e_rcivm = new Excel_returnCalcInfoViewModel(); Excel_constReturnCalViewModel e_crcvm = new Excel_constReturnCalViewModel(); e_crcvm.Excel_underlyingCalcInfoViewModel_ = this.Excel_underlyingCalcInfoViewModel_; e_crcvm.ConstReturn_ = (Convert.ToDouble(scheduleData.Coupon_) / 100).ToString(); //e_rcivm.Excel_returnCalcViewModel_.Add(e_crcvm); e_cvm.Excel_returnCalcInfoViewModel_ = e_crcvm; //info 에 드가는 곱하기라던지 floor라던지 postCalculation 같은게 붙어야함 } #endregion #region ComplementReturnCal { Excel_complementReturnCalcViewModel e_comp_rcvm = new Excel_complementReturnCalcViewModel(); Excel_constReturnCalViewModel e_crcvm = new Excel_constReturnCalViewModel(); e_crcvm.Excel_underlyingCalcInfoViewModel_ = this.Excel_underlyingCalcInfoViewModel_; e_crcvm.ConstReturn_ = "0.0"; e_comp_rcvm.Excel_returnCalcInfoViewModel_ = e_crcvm; e_cvm.Excel_complementReturnCalcViewModel_ = e_comp_rcvm; } #endregion #region AutoCall_Event //--------------------------------------------------------------- { Excel_eventCalcInfo_CallViewModel e_ecicvm = new Excel_eventCalcInfo_CallViewModel(); Excel_singleRangeEventCalViewModel e_srecvm = new Excel_singleRangeEventCalViewModel(); e_srecvm.Excel_underlyingCalcInfoViewModel_ = this.Excel_underlyingCalcInfoViewModel_; e_srecvm.LowerRng_ = (Convert.ToDouble(scheduleData.Trigger_) / 100.0).ToString(); e_srecvm.UpperRng_ = "1000"; //처음꺼만 사용함 Excel_underlyingCalcIDViewModel e_mucidvm = Excel_stepDownKI_subScheduleViewModel.CreateExcel_underlyingCalcID(scheduleData); e_mucidvm.setUnderlying(this.Excel_underlyingCalcInfoViewModel_); e_srecvm.Excel_underlyingCalcIDViewModel_ = e_mucidvm; e_ecicvm.Excel_eventCalcInfoViewModel_ = e_srecvm; e_cvm.Excel_eventCalcInfo_CallViewModel_ = e_ecicvm; //info 에 드가는 곱하기라던지 floor라던지 postCalculation 같은게 붙어야함 } #endregion #region AutoCall_ReturnCal //--------------------------------------------------------------- { Excel_returnCalcInfo_CallViewModel e_rcicvm = new Excel_returnCalcInfo_CallViewModel(); Excel_constReturnCalViewModel e_crcvm = new Excel_constReturnCalViewModel(); e_crcvm.Excel_underlyingCalcInfoViewModel_ = this.Excel_underlyingCalcInfoViewModel_; e_crcvm.ConstReturn_ = "1.0"; // 원금 e_rcicvm.Excel_returnCalcInfoViewModel_ = e_crcvm; e_cvm.Excel_returnCalcInfo_CallViewModel_ = e_rcicvm; //info 에 드가는 곱하기라던지 floor라던지 postCalculation 같은게 붙어야함 } #endregion return(e_cvm); }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_multiAsset_compositeOption_subtype serial_Excel_multiAsset_compositeOption_subtype = serial_Class as FpmlSerializedCSharp.Excel_multiAsset_compositeOption_subtype; FpmlSerializedCSharp.Excel_multiAsset_vanillaCallPut serial_Excel_multiAsset_vanillaCallPut = serial_Excel_multiAsset_compositeOption_subtype.Excel_multiAsset_vanillaCallPut_; this.exerciseDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_vanillaCallPut.ExerciseDate_.ValueStr); this.payoffDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_vanillaCallPut.PayoffDate_.ValueStr); //this.baseUnderlyingValue_ = serial_Excel_multiAsset_vanillaCallPut.BaseUnderlyingValue_.DoubleValue(); this.callPut_ = Enum.Parse(typeof(CallPutEnum), serial_Excel_multiAsset_vanillaCallPut.CallPut_.ValueStr) as CallPutEnum?; this.baseCoupon_ = ( serial_Excel_multiAsset_vanillaCallPut.BaseCoupon_.DoubleValue() * 100.0).ToString(); this.strike_ = ( serial_Excel_multiAsset_vanillaCallPut.Strike_.DoubleValue() * 100.0).ToString(); //this.strikeValue_ = serial_Excel_multiAsset_vanillaCallPut.StrikeValue_.DoubleValue(); this.partiRate_ = ( serial_Excel_multiAsset_vanillaCallPut.PartiRate_.DoubleValue() * 100.0).ToString(); //this.underlyingCalcType_ = serial_Excel_multiAsset_vanillaCallPut.UnderlyingCalcType_.ValueStr; FpmlSerializedCSharp.Excel_underlyingCalcID serial_returnUnderlyingCalcID = serial_Excel_multiAsset_vanillaCallPut.Excel_underlyingCalcID_; string returnUnderlyingCalcIDtype = serial_returnUnderlyingCalcID.Excel_type_.ValueStr; this.excel_underlyingCalcIDViewModel_ = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(returnUnderlyingCalcIDtype); this.excel_underlyingCalcIDViewModel_.setFromSerial(serial_returnUnderlyingCalcID); }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_multiAsset_compositeOption_subtype serial_Excel_multiAsset_compositeOption_subtype = serial_Class as FpmlSerializedCSharp.Excel_multiAsset_compositeOption_subtype; FpmlSerializedCSharp.Excel_multiAsset_upInOutCall serial_Excel_multiAsset_upInOutCall = serial_Excel_multiAsset_compositeOption_subtype.Excel_multiAsset_upInOutCall_; this.inOut_ = Enum.Parse(typeof(InOutEnum), serial_Excel_multiAsset_upInOutCall.InOut_.ValueStr) as InOutEnum?; this.exerciseDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.ExerciseDate_.ValueStr); //this.baseUnderlyingValue_ = serial_Excel_multiAsset_upInOutCall.BaseUnderlyingValue_.DoubleValue(); this.baseCoupon_ = ( serial_Excel_multiAsset_upInOutCall.BaseCoupon_.DoubleValue() * 100.0).ToString(); this.strike_ = ( serial_Excel_multiAsset_upInOutCall.Strike_.DoubleValue() * 100.0).ToString(); //this.strikeValue_ = serial_Excel_multiAsset_upInOutCall.StrikeValue_.ValueStr; this.partiRate_ = ( serial_Excel_multiAsset_upInOutCall.PartiRate_.DoubleValue() * 100.0).ToString(); this.barrier_ = ( serial_Excel_multiAsset_upInOutCall.Barrier_.DoubleValue() * 100.0).ToString(); //this.barrierValue_ = serial_Excel_multiAsset_upInOutCall.BarrierValue_.ValueStr; this.rebateCoupon_ = (serial_Excel_multiAsset_upInOutCall.RebateCoupon_.DoubleValue() * 100.0).ToString(); this.rebateCouponValue_ = serial_Excel_multiAsset_upInOutCall.RebateCouponValue_.ValueStr; List<FpmlSerializedCSharp.Excel_underlyingCalcID> serial_excel_underlyingCalcID = serial_Excel_multiAsset_upInOutCall.Excel_underlyingCalcID_; //this.excel_underlyingCalcIDViewModel_ = new ObservableCollection<Excel_underlyingCalcIDViewModel>(); string barrierType = serial_excel_underlyingCalcID[0].Excel_type_.ValueStr; Excel_underlyingCalcIDViewModel barrier_viewModel = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(barrierType); barrier_viewModel.setFromSerial(serial_excel_underlyingCalcID[0]); //this.excel_underlyingCalcIDViewModel_.Add(barrier_viewModel); barrierUnderlyingCalcIDViewModel_ = barrier_viewModel; //returnCalcID string returnType = serial_excel_underlyingCalcID[1].Excel_type_.ValueStr; Excel_underlyingCalcIDViewModel return_viewModel = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(returnType); return_viewModel.setFromSerial(serial_excel_underlyingCalcID[1]); //this.excel_underlyingCalcIDViewModel_.Add(return_viewModel); returnUnderlyingCalcIDViewModel_ = return_viewModel; this.observationStartDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.ObservationStartDate_.ValueStr); this.observationEndDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.ObservationEndDate_.ValueStr); this.descriptionUpdate(); }