FOURIER_MODEL1.getGreeks(ITM_CALL, BLACK_DATA, Sets.newHashSet(Greek.DELTA, Greek.GAMMA));
}
@Test
public void testPricing() {
GreekResultCollection fourierPrice = FOURIER_MODEL1.getGreeks(ITM_CALL, BLACK_DATA, GREEKS);
double bsmPrice = BSM_MODEL.getGreeks(ITM_CALL, BSM_DATA, GREEKS).get(Greek.FAIR_PRICE);
assertEquals(fourierPrice.size(), 1);
assertEquals(fourierPrice.get(Greek.FAIR_PRICE), bsmPrice, EPS);
fourierPrice = FOURIER_MODEL2.getGreeks(ITM_CALL, BLACK_DATA, GREEKS);
assertEquals(fourierPrice.size(), 1);
assertEquals(fourierPrice.get(Greek.FAIR_PRICE), bsmPrice, EPS);
fourierPrice = FOURIER_MODEL3.getGreeks(ITM_CALL, BLACK_DATA, GREEKS);
assertEquals(fourierPrice.size(), 1);
assertEquals(fourierPrice.get(Greek.FAIR_PRICE), bsmPrice, EPS);
fourierPrice = FOURIER_MODEL4.getGreeks(ITM_CALL, BLACK_DATA, GREEKS);
assertEquals(fourierPrice.size(), 1);
assertEquals(fourierPrice.get(Greek.FAIR_PRICE), bsmPrice, EPS);
fourierPrice = FOURIER_MODEL1.getGreeks(OTM_CALL, BLACK_DATA, GREEKS);
bsmPrice = BSM_MODEL.getGreeks(OTM_CALL, BSM_DATA, GREEKS).get(Greek.FAIR_PRICE);
assertEquals(fourierPrice.size(), 1);
assertEquals(fourierPrice.get(Greek.FAIR_PRICE), bsmPrice, EPS);
fourierPrice = FOURIER_MODEL2.getGreeks(OTM_CALL, BLACK_DATA, GREEKS);
assertEquals(fourierPrice.size(), 1);
assertEquals(fourierPrice.get(Greek.FAIR_PRICE), bsmPrice, EPS);
fourierPrice = FOURIER_MODEL3.getGreeks(OTM_CALL, BLACK_DATA, GREEKS);
assertEquals(fourierPrice.size(), 1);
assertEquals(fourierPrice.get(Greek.FAIR_PRICE), bsmPrice, EPS);
fourierPrice = FOURIER_MODEL4.getGreeks(OTM_CALL, BLACK_DATA, GREEKS);
assertEquals(fourierPrice.size(), 1);
assertEquals(fourierPrice.get(Greek.FAIR_PRICE), bsmPrice, EPS);
fourierPrice = FOURIER_MODEL1.getGreeks(ITM_PUT, BLACK_DATA, GREEKS);
bsmPrice = BSM_MODEL.getGreeks(ITM_PUT, BSM_DATA, GREEKS).get(Greek.FAIR_PRICE);
assertEquals(fourierPrice.size(), 1);
assertEquals(fourierPrice.get(Greek.FAIR_PRICE), bsmPrice, EPS);
fourierPrice = FOURIER_MODEL2.getGreeks(ITM_PUT, BLACK_DATA, GREEKS);
assertEquals(fourierPrice.size(), 1);
assertEquals(fourierPrice.get(Greek.FAIR_PRICE), bsmPrice, EPS);
fourierPrice = FOURIER_MODEL3.getGreeks(ITM_PUT, BLACK_DATA, GREEKS);
assertEquals(fourierPrice.size(), 1);
assertEquals(fourierPrice.get(Greek.FAIR_PRICE), bsmPrice, EPS);
fourierPrice = FOURIER_MODEL4.getGreeks(ITM_PUT, BLACK_DATA, GREEKS);
assertEquals(fourierPrice.size(), 1);
assertEquals(fourierPrice.get(Greek.FAIR_PRICE), bsmPrice, EPS);
fourierPrice = FOURIER_MODEL1.getGreeks(OTM_PUT, BLACK_DATA, GREEKS);
bsmPrice = BSM_MODEL.getGreeks(OTM_PUT, BSM_DATA, GREEKS).get(Greek.FAIR_PRICE);
assertEquals(fourierPrice.size(), 1);
assertEquals(fourierPrice.get(Greek.FAIR_PRICE), bsmPrice, EPS);
fourierPrice = FOURIER_MODEL2.getGreeks(OTM_PUT, BLACK_DATA, GREEKS);
assertEquals(fourierPrice.size(), 1);
assertEquals(fourierPrice.get(Greek.FAIR_PRICE), bsmPrice, EPS);
fourierPrice = FOURIER_MODEL3.getGreeks(OTM_PUT, BLACK_DATA, GREEKS);
assertEquals(fourierPrice.size(), 1);
assertEquals(fourierPrice.get(Greek.FAIR_PRICE), bsmPrice, EPS);
fourierPrice = FOURIER_MODEL4.getGreeks(OTM_PUT, BLACK_DATA, GREEKS);
assertEquals(fourierPrice.size(), 1);
assertEquals(fourierPrice.get(Greek.FAIR_PRICE), bsmPrice, EPS);
}