/** * Returns the volatility for given expiry, tenor, strike and forward rate. * * @param expiryTime time to expiry * @param tenor tenor * @param strike the strike * @param forward the forward * @return the volatility */ public double getVolatility(double expiryTime, double tenor, double strike, double forward) { DoublesPair expiryTenor = DoublesPair.of(expiryTime, tenor); SabrFormulaData data = SabrFormulaData.of( getAlpha(expiryTenor), getBeta(expiryTenor), getRho(expiryTenor), getNu(expiryTenor)); double shift = getShift(expiryTenor); return sabrFunctionProvider.getVolatility(forward + shift, strike + shift, expiryTime, data); }