public void setInterestRateInfo(Excel_interestRateViewModel e_irvm)
        {
            Excel_rateInfoViewModel e_rateInfoVM = new Excel_rateInfoViewModel();

            e_rateInfoVM.Tenor_     = e_irvm.Tenor_;
            e_rateInfoVM.LegTenor_  = e_irvm.LegTenor_;
            e_rateInfoVM.IndexType_ = e_irvm.RateType_;
            e_rateInfoVM.Currency_  = e_irvm.Currency_;

            this.Excel_rateInfoViewModel_ = e_rateInfoVM;
        }
        public override Excel_underlyingInfoViewModel underlyingInfoVM()
        {
            Excel_interestRateViewModel e_irvm = new Excel_interestRateViewModel();

            e_irvm.KrCode_ = this.Symbol_; // curve code....

            e_irvm.Tenor_ = this.Tenor_;

            e_irvm.NameTrans_ = new NameTrans(this.name_eng_);

            return(e_irvm);
        }
Exemplo n.º 3
0
        public override Excel_underlyingInfoViewModel underlyingInfoVM()
        {
            Excel_interestRateViewModel e_irvm = new Excel_interestRateViewModel();

            e_irvm.KrCode_    = this.Symbol_;
            e_irvm.Tenor_     = this.Tenor_;
            e_irvm.NameTrans_ = new NameTrans(this.name_eng_);

            e_irvm.Currency_ = this.Currency_;
            e_irvm.LegTenor_ = this.Leg_tenor_;
            e_irvm.RateType_ = this.Rate_type_;

            e_irvm.LinkedCurveCode_ = this.Linkedcurve_;

            return(e_irvm);
        }
        public override Excel_underlyingInfoViewModel underlyingInfoVM()
        {
            Excel_interestRateViewModel e_irvm = new Excel_interestRateViewModel();

            e_irvm.KrCode_ = this.Symbol_;
            e_irvm.Tenor_ = this.Tenor_;
            e_irvm.NameTrans_ = new NameTrans(this.name_eng_);

            e_irvm.Currency_ = this.Currency_;
            e_irvm.LegTenor_ = this.Leg_tenor_;
            e_irvm.RateType_ = this.Rate_type_;

            e_irvm.LinkedCurveCode_ = this.Linkedcurve_;

            return e_irvm;
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
        public override Excel_underlyingModel_paraViewModel underModel(Excel_underlyingInfoViewModel excel_uivm, Excel_instrumentViewModel excel_instrumentViewModel, DateTime dateTime)
        {
            Excel_hullWhiteOneFactorViewModel e_hwofvm = new Excel_hullWhiteOneFactorViewModel();

            Excel_interestRateViewModel e_irvm = excel_uivm as Excel_interestRateViewModel;

            string value = Excel_loaderViewModel.loadMarketData(dateTime, excel_uivm.Excel_type_, excel_uivm.KrCode_);

            e_hwofvm.CurrentValue_ = value;

            e_hwofvm.Alpha_      = this.HullWhite_AlphaSetting_.value(dateTime, excel_instrumentViewModel, excel_uivm);
            e_hwofvm.Volatility_ = this.HullWhite_SigmaSetting_.value(dateTime, excel_instrumentViewModel, excel_uivm);

            e_hwofvm.setInterestRateInfo(e_irvm);

            e_hwofvm.Excel_yieldCurveViewModel_ = this.HullWhite_FittingCurveSetting_.value(dateTime, excel_instrumentViewModel, excel_uivm);

            return(e_hwofvm);
        }
Exemplo n.º 7
0
        public Excel_underlyingInfo_paraViewModel getUnderlyingParameterModel(Excel_underlyingInfoViewModel e_uivm)
        {
            Excel_underlyingInfo_paraViewModel e_uipvm = new Excel_underlyingInfo_paraViewModel();

            if (e_uivm.Excel_type_.ToUpper() == "STOCK")
            {
                e_uipvm.KrCode_ = e_uivm.KrCode_;
                //e_uipvm.UnderName_ = e_uivm.Name_;
                //e_uipvm.Model_ = "GBM";

                Excel_geometricBMViewModel e_gbmvm = new Excel_geometricBMViewModel();

                e_gbmvm.Code_ = e_uivm.KrCode_;

                e_uipvm.Excel_underlyingModel_paraViewModel_ = e_gbmvm;
            }
            else if (e_uivm.Excel_type_.ToUpper() == "INTERESTRATE")
            {
                e_uipvm.KrCode_ = e_uivm.KrCode_;
                //e_uipvm.UnderName_ = e_uivm.Name_;
                //e_uipvm.Model_ = "HullWhiteOne";

                Excel_hullWhiteOneFactorViewModel e_hwofvm = new Excel_hullWhiteOneFactorViewModel();

                Excel_interestRateViewModel e_irvm = e_uivm as Excel_interestRateViewModel;

                e_hwofvm.Code_ = e_uivm.KrCode_;

                e_hwofvm.setInterestRateInfo(e_irvm);

                e_uipvm.Excel_underlyingModel_paraViewModel_ = e_hwofvm;
            }
            else
            {
                throw new NotImplementedException();
            }

            e_uipvm.Excel_underlyingModel_paraViewModel_.parameterLoad(
                this.ParameterSettingManager_);

            return(e_uipvm);
        }
        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 void setInterestRateInfo(Excel_interestRateViewModel e_irvm)
        {
            Excel_rateInfoViewModel e_rateInfoVM = new Excel_rateInfoViewModel();

            e_rateInfoVM.Tenor_ = e_irvm.Tenor_;
            e_rateInfoVM.LegTenor_ = e_irvm.LegTenor_;
            e_rateInfoVM.IndexType_ = e_irvm.RateType_;
            e_rateInfoVM.Currency_ = e_irvm.Currency_;

            this.Excel_rateInfoViewModel_ = e_rateInfoVM;
        }
        public override Excel_underlyingInfoViewModel underlyingInfoVM()
        {
            Excel_interestRateViewModel e_irvm = new Excel_interestRateViewModel();

            e_irvm.KrCode_ = this.Symbol_; // curve code.... 

            e_irvm.Tenor_ = this.Tenor_;

            e_irvm.NameTrans_ = new NameTrans(this.name_eng_);

            return e_irvm;
        }