示例#1
0
        // ************************************************************
        // CONSTRUCTORS
        // ************************************************************

        #region

        // Constructor 1 : From given date, no data
        //public EquityIndexOption(DateTime pricingDate) : base(pricingDate: pricingDate) { }


        // Constructor 2: For given date & Markit Volatility surface
        public EquityIndexOption(DateTime pricingDate, DateTime strikeDate, DateTime forwardStartDate,
                                 DateTime expiryDate, Double strikeLevel, MarkitSurface surfaceObject)

            : base(pricingDate: pricingDate, strikeDate: strikeDate, forwardStartDate: forwardStartDate,
                   expiryDate: expiryDate, strikeLevel: strikeLevel, surfaceObject: surfaceObject)
        {
        }
示例#2
0
        // ************************************************************
        // CONSTRUCTORS
        // ************************************************************

        #region

        // Constructor 1 : Generic
        // public BaseIndexOption() { }


        // Constructor 2 : From given date
        // spublic BaseIndexOption(DateTime pricingDate)  { }


        // Constructor 3 : From a Markit volatility surface
        public BaseIndexOption(DateTime pricingDate, DateTime strikeDate, DateTime forwardStartDate,
                               DateTime expiryDate, Double strikeLevel, MarkitSurface surfaceObject)
        {
            // Dates
            this.pricingDate      = pricingDate;
            this.strikeDate       = strikeDate;
            this.expiryDate       = expiryDate;
            this.forwardStartDate = forwardStartDate;

            // Strikes
            this.strikeLevel = strikeLevel;

            // Volatility
            this.impliedVolatilitySurface = surfaceObject;
        }
示例#3
0
        // ************************************************************
        // INDEXER METHODS
        // ************************************************************

        #region

        public MarkitSurface this[DateTime i]
        {
            get
            {
                if (!readerData.ContainsKey(i))
                {
                    readerData[i] = new MarkitSurface(i);
                }

                return(readerData[i]);
            }

            protected set
            {
                readerData[i] = value;
            }
        }
示例#4
0
        private void Parse_OldFormat(List <string> line)
        {
            DateTime      thisPricingDate = this.ParseDate(line[1]);
            MarkitSurface thisSurface     = this[thisPricingDate];

            thisSurface.SetName(line[3]);
            thisSurface.SetImpliedSpot(line[9]);
            thisSurface.SetReferenceLevel(line[6]);

            DateTime thisForwardDate = this.ParseDate(line[7]);

            thisSurface.SetForward(thisPricingDate, thisForwardDate, line[11]);
            thisSurface.SetDiscountFactor(thisPricingDate, thisForwardDate, line[12]);
            //thisSurface.SetDividend(thisPricingDate, thisForwardDate, line[xyz]);


            thisSurface.SetVolatility(thisPricingDate, thisForwardDate, line[8], line[10]);
        }