public Handle<YieldTermStructure> dividendCurve(Underlying item)
        {
            double riskFreeRate = 0.06;

            var termStructure = new Handle<YieldTermStructure>(new FlatForward(referenceDate_, riskFreeRate, dayCounter_));
            return termStructure;
        }
        public List<double> volatilityList(DateTime startDate,DateTime endDate, Underlying under, string type)
        {
            HistoryVolCalculator histVolCal = new HistoryVolCalculator();

            OracleDataBaseConnect connect = new OracleDataBaseConnect();
            connect.DBSetting_ = DBSettingInfoManger.dbSetting("MRO");
            string queryName = "Underlying";

            connect.addQuery(queryName,"");
            connect.excute();

            List<double> resultVol = new List<double>();

            foreach (DataRow item in connect.ResultDataSet_.Tables[queryName].Rows)
	        {
		        double vol = Convert.ToDouble(item["Value"].ToString());
                resultVol.Add(vol);
	        }

            histVolCal.ValueList_ = resultVol;
            histVolCal.historyCalVol();

            return histVolCal.ValueList_;

        }
        internal Handle<YieldTermStructure> driftCurve(Underlying item)
        {
            //var flatTermStructure = new Handle<YieldTermStructure>(new FlatForward(today, riskFreeRate, dayCounter));
            //var flatDividendTS = new Handle<YieldTermStructure>(new FlatForward(today, dividendYield, dayCounter));
            //var flatVolTS = new Handle<BlackVolTermStructure>(new BlackConstantVol(today, calendar, volatility, dayCounter));

            throw new NotImplementedException();
        }
        public UnderlyingParameterViewModel(Underlying under)
        {
            // TODO: Complete member initialization
            this.Underlying_ = under;

            //this.drift_ = item.Drift_;
            //this.dividend_ = item.Dividend_;
            //this.volatility_ = item.Vol_;

            this.drift_ = 0.033;
            this.dividend_ = 0.011;
            this.volatility_ = 0.332;
            this.currentPrice_ = new QuoteInfo(10005);
            this.itemCode_ = new CodeManager(under.KRCode_);
            //this.underlyingType_ = item.groupType_;

        }
        // Process1D 생성용 //내부사용함.
        private static StochasticProcess1D buildProcess1D(Underlying under) 
        {
            Date today = Settings.evaluationDate();

            CurveSetting curveSetting = new CurveSetting();
            ProcessSetting processSetting = new ProcessSetting();

            ProcessType proType = processSetting.processType(under);

            StochasticProcess1D process;

            if (proType == ProcessType.BlackScholesMertonProcess)
            {
                Handle<Quote> quite = new Handle<Quote>();//under.quoteValue(today);

                Handle<YieldTermStructure> driftTS = curveSetting.driftCurve(under);
                Handle<YieldTermStructure> dividendTS = curveSetting.dividendCurve(under);
                Handle<BlackVolTermStructure> volTS = curveSetting.volCurve(under);

                process = new BlackScholesMertonProcess(quite,driftTS,dividendTS,volTS);
            }
            else if (proType == ProcessType.GemetricBrownianMotion)
            {
                throw new NotImplementedException();
            }
            else if ( proType == ProcessType.HullWhite )
            {
                throw new NotImplementedException();
            }
            else if (proType == ProcessType.Vasicek)
            {
                throw new NotImplementedException();
            }
            else 
            {
                throw new NotImplementedException();
            }

            return process;

        }
Example #6
0
 internal double Ds(Underlying underlying)
 {
     throw new NotImplementedException();
 }
 internal ProcessFactory.ProcessType processType(Underlying under)
 {
     throw new NotImplementedException();
 }
 public Handle<BlackVolTermStructure> corrCurve(Underlying item)
 {
     throw new NotImplementedException();
 }
 public double volatility(DateTime referenceDate, Underlying under, string type)
 {
     return(0.0);
 }
        //public UnderlyingInfo(List<string> underCode)
        //{
        //    this.underlyings_ = new List<Underlying>();
        //    foreach (string item in underCode)
        //    {
        //        this.underlyings_.Add(new Underlying(item));
        //    }
        //}

        public void addUnderlying(Underlying under)
        {
            this.underlyings_.Add(under);
        }
Example #11
0
 public void setUnderInfo(Underlying under)
 {
     this.Underlying_ = under;
 }
 public Handle <BlackVolTermStructure> corrCurve(Underlying item)
 {
     throw new NotImplementedException();
 }
 public double volatility(DateTime referenceDate, Underlying under, string type)
 {
     return 0.0;
 }
        //public UnderlyingInfo(List<string> underCode) 
        //{
        //    this.underlyings_ = new List<Underlying>();
        //    foreach (string item in underCode)
        //    {
        //        this.underlyings_.Add(new Underlying(item));    
        //    }
        //}

        public void addUnderlying(Underlying under) 
        {
            this.underlyings_.Add(under);

        }
        public void underInfoFromXml(XmlNode node)
        {

            //// product에 종속함. 나중에 어떻게 할지 생각
            //XmlNode instCodeNode = node.SelectSingleNode("issueInformation");
            //string instCode = instCodeNode["krCode"].InnerText;
            //

            //XmlNode underInfoNode = node.SelectSingleNode("ELSStepDownRedemptions/underlyingInformation");

            XmlNodeList underNodeList = node.SelectNodes("underlying");

            this.underlyings_ = new List<Underlying>();

            foreach (XmlNode item in underNodeList)
            {
                Underlying under = new Underlying();
                under.loadFromXml(item);
                //under.InstCode_ = instCode;
                this.underlyings_.Add(under);
            }

        }
        public void setUnderInfo(Underlying under)
        {
            this.Underlying_ = under;

        }