private static void populateVolatilitySurfaceSpecifications( final ConfigMaster configMaster, final Currency target, final String name) { final SurfaceInstrumentProvider<Tenor, Tenor> surfaceInstrumentProvider = new ExampleSwaptionVolatilitySurfaceInstrumentProvider( target.toString(), "ATMSWAPTION", false, true, ""); final String fullName = name + SEPARATOR + target.toString() + SEPARATOR + InstrumentTypeProperties.SWAPTION_ATM; final VolatilitySurfaceSpecification specification = new VolatilitySurfaceSpecification( fullName, target, SurfaceAndCubeQuoteType.EXPIRY_MATURITY_ATM, surfaceInstrumentProvider); ConfigMasterUtils.storeByName(configMaster, makeConfigDocument(specification)); }
private static void populateVolatilitySurfaceDefinitions( final ConfigMaster configMaster, final Currency target, final String name) { final Tenor[] swaptionExpiries = new Tenor[] { Tenor.THREE_MONTHS, Tenor.SIX_MONTHS, Tenor.ONE_YEAR, Tenor.TWO_YEARS, Tenor.THREE_YEARS, Tenor.FIVE_YEARS, Tenor.TEN_YEARS }; final Tenor[] swapMaturities = new Tenor[] { Tenor.ONE_YEAR, Tenor.TWO_YEARS, Tenor.THREE_YEARS, Tenor.FIVE_YEARS, Tenor.SEVEN_YEARS, Tenor.TEN_YEARS, Tenor.ofYears(12), Tenor.ofYears(15), Tenor.ofYears(20), Tenor.ofYears(30) }; final String fullName = name + SEPARATOR + target.toString() + SEPARATOR + InstrumentTypeProperties.SWAPTION_ATM; final VolatilitySurfaceDefinition<Tenor, Tenor> definition = new VolatilitySurfaceDefinition<>(fullName, target, swapMaturities, swaptionExpiries); ConfigMasterUtils.storeByName(configMaster, makeConfigDocument(definition)); }