// 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()))); }