Example #1
0
        /// <summary>
        /// Method used to retrieve the MarkitSurface for a given date (new format, single date).
        /// </summary>
        private MarkitSurface Get_newFileFormat(DateTime valuationDate)
        {
            // Load data using reader
            MarkitVolatilityReader myReader = new MarkitVolatilityReader(_underlying);

            data        = myReader.Get(indexName, valuationDate, true);
            currentYear = valuationDate.Year;

            return(data[valuationDate]);
        }
Example #2
0
        /// <summary>
        /// Method used ton instanciate the Markit Equity IV in-memory cache (singleton).
        /// </summary>
        public void Load()
        {
            // Clear old data (potential)
            _data        = null;
            _currentYear = 0.0;

            // Load data using reader
            MarkitVolatilityReader myReader = new MarkitVolatilityReader(_underlying);

            data        = myReader.Get(indexName);
            currentYear = Double.NaN;
        }
Example #3
0
        // ************************************************************
        // CONSTRUCTORS
        // ************************************************************

        #region

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


        // Constructor 2 : Index name built-in

        /*
         * public Markit_Equity_IV(String argIndexName)
         * {
         *  indexName = argIndexName;
         * }
         *
         */

        #endregion



        // ************************************************************
        // METHODS : ACCESSING DATA
        // ************************************************************

        #region

        /// <summary>
        /// Method used ton instanciate the Markit Equity IV in-memory cache (singleton).
        /// </summary>
        private void LoadData(DateTime valuationDate)
        {
            // Skip if data already loaded
            if (valuationDate.Year == currentYear)
            {
                return;
            }

            // Clear old data (potential)
            _data        = null;
            _currentYear = 0.0;

            // Load data using reader
            MarkitVolatilityReader myReader = new MarkitVolatilityReader(_underlying);

            data        = myReader.Get(indexName, valuationDate);
            currentYear = valuationDate.Year;
        }