public override void buildParaSetting(ParameterSettingManager paraSettingManager)
        {
            this.simulationNum_ = paraSettingManager.SimulationNumber_.ToString();

            this.excel_underlyingCalcInfo_paraViewModel_.buildParaSetting(paraSettingManager);
            this.excel_discountCurve_paraViewModel_.buildParaSetting(paraSettingManager);
        }
        public void buildParaSetting(ParameterSettingManager paraSettingManager)
        {
            this.excel_correlation_paraViewModel_
                = paraSettingManager.UnderlyingParaSetting_.CorrelationParaSetting_.corrInfo(
                      paraSettingManager.Excel_InstrumentViewModel_.Excel_interfaceViewModel_.getExcel_underlyingCalcInfoViewModel());

            this.dimension_ = paraSettingManager.Excel_InstrumentViewModel_.Excel_interfaceViewModel_.getExcel_underlyingCalcInfoViewModel().Excel_underlyingInfoViewModel_.Count;
        }
示例#3
0
        public UnderlyingParaSetting(ParameterSettingManager parameterSettingManager)
        {
            // TODO: Complete member initialization
            this.owner_parameterSettingManager_ = parameterSettingManager;

            this.StockParaSetting_        = new GBMSetting();
            this.InterestRateParaSetting_ = new HullWhiteSetting();

            this.CorrelationParaSetting_ = new Constant_CorrelationParaSetting(parameterSettingManager);
        }
        public UnderlyingParaSetting(ParameterSettingManager parameterSettingManager)
        {
            // TODO: Complete member initialization
            this.owner_parameterSettingManager_ = parameterSettingManager;

            this.StockParaSetting_ = new GBMSetting();
            this.InterestRateParaSetting_= new HullWhiteSetting();

            this.CorrelationParaSetting_ = new Constant_CorrelationParaSetting(parameterSettingManager);

        }
        public override void parameterLoad(ParameterSettingManager parameterSettingManager)
        {
            MarketDataLoader loader = new MarketDataLoader();

            //string code = "";

            //this.CurrentValue_ = (loader.loadData(this.code_, ProgramVariable.ReferenceDate_)).ToString();
            //this.Drift_ = parameterSettingManager.gbmSetting_.drift();
            //this.Dividend_ = parameterSettingManager.gbmSetting_.dividend();
            //this.Volatility_ = parameterSettingManager.gbmSetting_.volatility();
        }
        public void buildParaSetting(Excel_underlyingInfoViewModel e_uivm, ParameterSettingManager paraSettingManager)
        {
            this.Excel_type_     = e_uivm.Excel_type_;
            this.KrCode_         = e_uivm.KrCode_;
            this.UnderNameTrans_ = e_uivm.NameTrans_;
            this.BasePrice_      = e_uivm.BasePrice_;
            this.Tenor_          = e_uivm.Tenor_;
            this.Sub_type_       = e_uivm.Sub_type_;
            this.LinkedCurve_    = e_uivm.LinkedCurveCode_;

            //this.CurrentValue_ = ? // model에서 setting 을 통해 set됨

            this.excel_underlyingModel_paraViewModel_ =
                paraSettingManager.UnderlyingParaSetting_.underModel(e_uivm);
        }
        public static ParameterSettingManager makeParaSettingManager(string settingID,DateTime refDate,Excel_instrumentViewModel e_instVM)
        {
            ParameterSettingManager psm = new ParameterSettingManager(refDate, e_instVM);

            // simulation Number
            psm.SimulationNumber_ = 10000;

            // underlying
            {
                UnderlyingParaSetting ups = new UnderlyingParaSetting(psm);

                // stock

                GBMSetting gbmSetting = new GBMSetting();

                gbmSetting.GBMDriftSetting_ = new GBM_Const_DriftSetting("0.0289");
                gbmSetting.GBMDividendSetting_ = new GBM_Const_DividendSetting("0.019");
                gbmSetting.GBMVolatilitySetting_ = new GBM_Const_VolatilitySetting("0.3");

                ups.StockParaSetting_ = new GBMSetting();

                // ir

                HullWhiteSetting hwSetting = new HullWhiteSetting();

                hwSetting.HullWhite_AlphaSetting_ = new HullWhite_Const_AlphaSetting("");
                hwSetting.HullWhite_SigmaSetting_ = new HullWhite_Const_SigmaSetting("");
                hwSetting.HullWhite_FittingCurveSetting_ = new HullWhite_Const_FittingCurveSetting("");

                ups.InterestRateParaSetting_ = hwSetting;

                // fx


                // corr

                ups.CorrelationParaSetting_ = new Constant_CorrelationParaSetting(psm);
            }

            // discount
            {
                DiscountCurveParaSetting dcps = new DiscountCurveParaSetting(psm);

                psm.DiscountCurveParaSetting_ = dcps;
            }

            return psm;
        }
        public static ParameterSettingManager makeParaSettingManager(string settingID, DateTime refDate, Excel_instrumentViewModel e_instVM)
        {
            ParameterSettingManager psm = new ParameterSettingManager(refDate, e_instVM);

            // simulation Number
            psm.SimulationNumber_ = 10000;

            // underlying
            {
                UnderlyingParaSetting ups = new UnderlyingParaSetting(psm);

                // stock

                GBMSetting gbmSetting = new GBMSetting();

                gbmSetting.GBMDriftSetting_      = new GBM_Const_DriftSetting("0.0289");
                gbmSetting.GBMDividendSetting_   = new GBM_Const_DividendSetting("0.019");
                gbmSetting.GBMVolatilitySetting_ = new GBM_Const_VolatilitySetting("0.3");

                ups.StockParaSetting_ = new GBMSetting();

                // ir

                HullWhiteSetting hwSetting = new HullWhiteSetting();

                hwSetting.HullWhite_AlphaSetting_        = new HullWhite_Const_AlphaSetting("");
                hwSetting.HullWhite_SigmaSetting_        = new HullWhite_Const_SigmaSetting("");
                hwSetting.HullWhite_FittingCurveSetting_ = new HullWhite_Const_FittingCurveSetting("");

                ups.InterestRateParaSetting_ = hwSetting;

                // fx


                // corr

                ups.CorrelationParaSetting_ = new Constant_CorrelationParaSetting(psm);
            }

            // discount
            {
                DiscountCurveParaSetting dcps = new DiscountCurveParaSetting(psm);

                psm.DiscountCurveParaSetting_ = dcps;
            }

            return(psm);
        }
示例#9
0
        public virtual void buildParameterFromInstrumentWithOutData(DateTime refDate)
        {
            Excel_parameterViewModel e_pvm = Excel_parameterLoader.Load(this.booking_type_);

            e_pvm.IssueDate_ = this.excel_interfaceViewModel_.Excel_issueInfoViewModel_.EffectiveDate_;

            e_pvm.ItemCode_ = this.masterInformationViewModel_.Item_code_;

            //ParameterSettingManager parameterSettingManager = new ParameterSettingManager(refDate,this);
            ParameterSettingManager parameterSettingManager
                = ParameterSettingManagerBuilder.makeParaSettingManager("default", refDate, this);

            e_pvm.buildParaSetting(parameterSettingManager);

            this.excel_parameterViewModel_ = e_pvm;
        }
示例#10
0
        public override void buildParameterFromInstrument(DateTime refDate)
        {
            Excel_standardHifiveParaViewModel e_spvm = new Excel_standardHifiveParaViewModel();

            e_spvm.IssueDate_ = this.excel_interfaceViewModel_.Excel_issueInfoViewModel_.EffectiveDate_;

            e_spvm.ReferenceDate_ = refDate;

            e_spvm.ItemCode_ = this.masterInformationViewModel_.Item_code_;

            ParameterSettingManager parameterSettingManager
                = ParameterSettingManagerBuilder.makeParaSettingManager("default", refDate, this);

            e_spvm.buildParaSetting(parameterSettingManager);

            this.excel_parameterViewModel_ = e_spvm;
        }
        public void buildParaSetting(ParameterSettingManager paraSettingManager)
        {
            this.excel_underlyingInfo_paraViewModel_.Clear();

            Excel_underlyingCalcInfoViewModel e_ucvm = paraSettingManager.Excel_InstrumentViewModel_.Excel_interfaceViewModel_.getExcel_underlyingCalcInfoViewModel();

            foreach (var item in e_ucvm.Excel_underlyingInfoViewModel_)
            {
                Excel_underlyingInfo_paraViewModel e_uparavm = new Excel_underlyingInfo_paraViewModel();

                e_uparavm.buildParaSetting(item, paraSettingManager);

                this.excel_underlyingInfo_paraViewModel_.Add(e_uparavm);
            }

            this.excel_correlationInfo_paraViewModel_.buildParaSetting(paraSettingManager);
        }
        public override void buildParameterFromInstrument(DateTime refDate)
        {
            // createParameterVM 으로 setting에서 받아 ㄱㄱ해야함.

            Excel_singleAssetCompositeOptionStandParaWithEngineViewModel e_para = new Excel_singleAssetCompositeOptionStandParaWithEngineViewModel();

            e_para.IssueDate_ = this.excel_interfaceViewModel_.Excel_issueInfoViewModel_.EffectiveDate_;

            e_para.ReferenceDate_ = refDate;

            e_para.ItemCode_ = this.masterInformationViewModel_.Item_code_;

            ParameterSettingManager parameterSettingManager
                = ParameterSettingManagerBuilder.makeParaSettingManager("default", refDate, this);

            e_para.buildParaSetting(parameterSettingManager);

            this.excel_parameterViewModel_ = e_para;
        }
        public void buildParaSetting(ParameterSettingManager paraSettingManager)
        {
            this.excel_yieldCurveViewModel_.Clear();

            Excel_interfaceViewModel e_ivm = paraSettingManager.Excel_InstrumentViewModel_.Excel_interfaceViewModel_;

            List <CurrencyViewModel> currencyList = e_ivm.currencyList();

            List <CurrencyViewModel> removedCurrencyList = new List <CurrencyViewModel>();

            foreach (var item in currencyList)
            {
                bool exist = false;

                foreach (var item2 in removedCurrencyList)
                {
                    if (item2.CurrencyCode_ == item.CurrencyCode_)
                    {
                        exist = true;
                        break;
                    }
                }

                if (!exist)
                {
                    removedCurrencyList.Add(item);
                }
            }

            foreach (var item in removedCurrencyList)
            {
                Excel_yieldCurveViewModel e_ycvm =
                    paraSettingManager.DiscountCurveParaSetting_.discountCurve(paraSettingManager.ReferenceDate_, item);

                this.excel_yieldCurveViewModel_.Add(e_ycvm);
            }
        }
 public Constant_CorrelationParaSetting(ParameterSettingManager parameterSettingManager)
     : base(parameterSettingManager)
 {
 }
 public override void parameterLoad(ParameterSettingManager parameterSettingManager)
 {
     //this.alpha_ = parameterSettingManager.hullWhiteSetting_.alpha();
     //this.volatility_ = parameterSettingManager.hullWhiteSetting_.volatility();
     //this.fittingYieldCurveName_ = parameterSettingManager.hullWhiteSetting_.fittingCurve();
 }
 public MRO_CorrelationParaSetting(ParameterSettingManager parameterSettingManager)
 : base(parameterSettingManager)
 {
 }
 public override void buildParaSetting(ParameterSettingManager paraSettingManager)
 {
     throw new NotImplementedException();
 }
 public override void parameterLoad(ParameterSettingManager parameterSettingManager)
 {
     //this.alpha_ = parameterSettingManager.hullWhiteSetting_.alpha();
     //this.volatility_ = parameterSettingManager.hullWhiteSetting_.volatility();
     //this.fittingYieldCurveName_ = parameterSettingManager.hullWhiteSetting_.fittingCurve();
 }
示例#19
0
 public MRO_CorrelationParaSetting(ParameterSettingManager parameterSettingManager)
     : base(parameterSettingManager)
 {
 }
        public override void parameterLoad(ParameterSettingManager parameterSettingManager)
        {
            MarketDataLoader loader = new MarketDataLoader();

            //string code = "";

            //this.CurrentValue_ = (loader.loadData(this.code_, ProgramVariable.ReferenceDate_)).ToString();
            //this.Drift_ = parameterSettingManager.gbmSetting_.drift();
            //this.Dividend_ = parameterSettingManager.gbmSetting_.dividend();
            //this.Volatility_ = parameterSettingManager.gbmSetting_.volatility();
        }
        public void buildParaSetting(ParameterSettingManager paraSettingManager)
        {
            this.excel_yieldCurveViewModel_.Clear();

            Excel_interfaceViewModel e_ivm = paraSettingManager.Excel_InstrumentViewModel_.Excel_interfaceViewModel_;

            List<CurrencyViewModel> currencyList = e_ivm.currencyList();

            List<CurrencyViewModel> removedCurrencyList = new List<CurrencyViewModel>();

            foreach (var item in currencyList)
            {
                bool exist = false;

                foreach (var item2 in removedCurrencyList)
	            {
                    if (item2.CurrencyCode_ == item.CurrencyCode_)
                    {
                        exist = true;
                        break;
                    }
	            }

                if (!exist)
                {
                    removedCurrencyList.Add(item);
                }

            }

            foreach (var item in removedCurrencyList)
            {
                Excel_yieldCurveViewModel e_ycvm =
                    paraSettingManager.DiscountCurveParaSetting_.discountCurve(paraSettingManager.ReferenceDate_, item);

                this.excel_yieldCurveViewModel_.Add(e_ycvm);
            }

        }
        public void buildParaSetting(Excel_underlyingInfoViewModel e_uivm, ParameterSettingManager paraSettingManager)
        {
            this.Excel_type_ = e_uivm.Excel_type_;
            this.KrCode_ = e_uivm.KrCode_;
            this.UnderNameTrans_ = e_uivm.NameTrans_;
            this.BasePrice_ = e_uivm.BasePrice_;
            this.Tenor_ = e_uivm.Tenor_;
            this.Sub_type_ = e_uivm.Sub_type_;
            this.LinkedCurve_ = e_uivm.LinkedCurveCode_;

            //this.CurrentValue_ = ? // model에서 setting 을 통해 set됨

            this.excel_underlyingModel_paraViewModel_ =
                paraSettingManager.UnderlyingParaSetting_.underModel(e_uivm);


        }
        public void buildParaSetting(ParameterSettingManager paraSettingManager)
        {
            this.excel_correlation_paraViewModel_
                = paraSettingManager.UnderlyingParaSetting_.CorrelationParaSetting_.corrInfo(
                paraSettingManager.Excel_InstrumentViewModel_.Excel_interfaceViewModel_.getExcel_underlyingCalcInfoViewModel());

            this.dimension_ = paraSettingManager.Excel_InstrumentViewModel_.Excel_interfaceViewModel_.getExcel_underlyingCalcInfoViewModel().Excel_underlyingInfoViewModel_.Count;
        }
        public void buildParaSetting(ParameterSettingManager paraSettingManager)
        {
            this.excel_underlyingInfo_paraViewModel_.Clear();

            Excel_underlyingCalcInfoViewModel e_ucvm = paraSettingManager.Excel_InstrumentViewModel_.Excel_interfaceViewModel_.getExcel_underlyingCalcInfoViewModel();

            foreach (var item in e_ucvm.Excel_underlyingInfoViewModel_)
            {
                Excel_underlyingInfo_paraViewModel e_uparavm = new Excel_underlyingInfo_paraViewModel();

                e_uparavm.buildParaSetting(item,paraSettingManager);

                this.excel_underlyingInfo_paraViewModel_.Add(e_uparavm);

            }

            this.excel_correlationInfo_paraViewModel_.buildParaSetting(paraSettingManager);
        }
 public abstract void buildParaSetting(ParameterSettingManager paraSettingManager);
 public abstract void parameterLoad(ParameterSettingManager parameterSettingManager);
 public CorrelationParaSetting(ParameterSettingManager parameterSettingManager)
 {
     this.owner_parameterSettingManager_ = parameterSettingManager;
 }
 public override void buildParaSetting(ParameterSettingManager paraSettingManager)
 {
     this.excel_underlyingCalcInfo_paraViewModel_.buildParaSetting(paraSettingManager);
     this.excel_discountCurve_paraViewModel_.buildParaSetting(paraSettingManager);
 }
 public DiscountCurveParaSetting(ParameterSettingManager parameterSettingManager)
 {
     // TODO: Complete member initialization
     this.owner_parameterSettingManager_ = parameterSettingManager;
 }
 public override void buildParaSetting(ParameterSettingManager paraSettingManager)
 {
     throw new NotImplementedException();
 }
示例#31
0
 public abstract void buildParaSetting(ParameterSettingManager paraSettingManager);
        public override void buildParaSetting(ParameterSettingManager paraSettingManager)
        {
            this.simulationNum_ = paraSettingManager.SimulationNumber_.ToString();

            this.excel_underlyingCalcInfo_paraViewModel_.buildParaSetting(paraSettingManager);
            this.excel_discountCurve_paraViewModel_.buildParaSetting(paraSettingManager);
        }
 public Constant_CorrelationParaSetting(ParameterSettingManager parameterSettingManager)
 : base(parameterSettingManager)
 {
 }
 public abstract void parameterLoad(ParameterSettingManager parameterSettingManager);
 public override void buildParaSetting(ParameterSettingManager paraSettingManager)
 {
     this.excel_underlyingCalcInfo_paraViewModel_.buildParaSetting(paraSettingManager);
     this.excel_discountCurve_paraViewModel_.buildParaSetting(paraSettingManager);
 }
示例#36
0
 public CorrelationParaSetting(ParameterSettingManager parameterSettingManager)
 {
     this.owner_parameterSettingManager_ = parameterSettingManager;
 }