public void testSwaptionVolMatrixCoherence()
        {
            // Set evaluation date
            Settings.Instance.setEvaluationDate(Date.Today);

            // Testing swaption volatility matrix
            CommonVars vars = new CommonVars();

            SwaptionVolatilityMatrix vol;
            string description;

            //floating reference date, floating market data
            description = "floating reference date, floating market data";
            vol         = new SwaptionVolatilityMatrix(vars.conventions.calendar,
                                                       vars.conventions.optionBdc,
                                                       vars.atm.tenors.options,
                                                       vars.atm.tenors.swaps,
                                                       vars.atm.volsHandle,
                                                       vars.conventions.dayCounter);

            vars.makeCoherenceTest(description, vol);

            //fixed reference date, floating market data
            description = "fixed reference date, floating market data";
            vol         = new SwaptionVolatilityMatrix(Settings.Instance.evaluationDate(),
                                                       vars.conventions.calendar,
                                                       vars.conventions.optionBdc,
                                                       vars.atm.tenors.options,
                                                       vars.atm.tenors.swaps,
                                                       vars.atm.volsHandle,
                                                       vars.conventions.dayCounter);

            vars.makeCoherenceTest(description, vol);

            // floating reference date, fixed market data
            description = "floating reference date, fixed market data";
            vol         = new SwaptionVolatilityMatrix(vars.conventions.calendar,
                                                       vars.conventions.optionBdc,
                                                       vars.atm.tenors.options,
                                                       vars.atm.tenors.swaps,
                                                       vars.atm.volsHandle,
                                                       vars.conventions.dayCounter);

            vars.makeCoherenceTest(description, vol);

            // fixed reference date, fixed market data
            description = "fixed reference date, fixed market data";
            vol         = new SwaptionVolatilityMatrix(Settings.Instance.evaluationDate(),
                                                       vars.conventions.calendar,
                                                       vars.conventions.optionBdc,
                                                       vars.atm.tenors.options,
                                                       vars.atm.tenors.swaps,
                                                       vars.atm.volsHandle,
                                                       vars.conventions.dayCounter);

            vars.makeCoherenceTest(description, vol);
        }
        public void testSwaptionVolMatrixCoherence()
        {
            //"Testing swaption volatility matrix...");

            CommonVars vars = new CommonVars();

            SwaptionVolatilityMatrix vol;
            string description;

            //floating reference date, floating market data
            description = "floating reference date, floating market data";
            vol = new SwaptionVolatilityMatrix(vars.conventions.calendar,
                                                vars.conventions.optionBdc,
                                                vars.atm.tenors.options,
                                                vars.atm.tenors.swaps,
                                                vars.atm.volsHandle,
                                                vars.conventions.dayCounter);

            vars.makeCoherenceTest(description, vol);

            //fixed reference date, floating market data
            description = "fixed reference date, floating market data";
            vol = new SwaptionVolatilityMatrix(Settings.evaluationDate(),
                                                vars.conventions.calendar,
                                                vars.conventions.optionBdc,
                                                vars.atm.tenors.options,
                                                vars.atm.tenors.swaps,
                                                vars.atm.volsHandle,
                                                vars.conventions.dayCounter);

            vars.makeCoherenceTest(description, vol);

            // floating reference date, fixed market data
            description = "floating reference date, fixed market data";
            vol = new SwaptionVolatilityMatrix(vars.conventions.calendar,
                                                vars.conventions.optionBdc,
                                                vars.atm.tenors.options,
                                                vars.atm.tenors.swaps,
                                                vars.atm.volsHandle,
                                                vars.conventions.dayCounter);

            vars.makeCoherenceTest(description, vol);

            // fixed reference date, fixed market data
            description = "fixed reference date, fixed market data";
            vol = new SwaptionVolatilityMatrix(Settings.evaluationDate(),
                                                vars.conventions.calendar,
                                                vars.conventions.optionBdc,
                                                vars.atm.tenors.options,
                                                vars.atm.tenors.swaps,
                                                vars.atm.volsHandle,
                                                vars.conventions.dayCounter);

            vars.makeCoherenceTest(description, vol);
        }