// cleanup //SavedSettings backup; // setup public CommonVars() { conventions = new SwaptionMarketConventions(); conventions.setConventions(); atm = new AtmVolatility(); atm.setMarketData(); atmVolMatrix = new RelinkableHandle <SwaptionVolatilityStructure> (new SwaptionVolatilityMatrix(conventions.calendar, conventions.optionBdc, atm.tenors.options, atm.tenors.swaps, atm.volsHandle, conventions.dayCounter)); termStructure = new RelinkableHandle <YieldTermStructure>(); termStructure.linkTo((new FlatForward(0, conventions.calendar, 0.05, new Actual365Fixed()))); }
public CommonVars() { Settings.setEvaluationDate(new Date(16, Month.September, 2015)); conventions.setConventions(); // ATM swaptionvolmatrix atm.setMarketData(); atmVolMatrix = new RelinkableHandle <SwaptionVolatilityStructure>( new SwaptionVolatilityMatrix(conventions.calendar, conventions.optionBdc, atm.tenors.options, atm.tenors.swaps, atm.volsHandle, conventions.dayCounter)); // Swaptionvolcube cube.setMarketData(); termStructure.linkTo(Utilities.flatRate(0.05, new Actual365Fixed())); swapIndexBase = new EuriborSwapIsdaFixA(new Period(2, TimeUnit.Years), termStructure); shortSwapIndexBase = new EuriborSwapIsdaFixA(new Period(1, TimeUnit.Years), termStructure); vegaWeighedSmileFit = false; }