Class ImpliedTrinomialTreeFxSingleBarrierOptionTradePricer
- java.lang.Object
-
- com.opengamma.strata.pricer.fxopt.ImpliedTrinomialTreeFxSingleBarrierOptionTradePricer
-
public class ImpliedTrinomialTreeFxSingleBarrierOptionTradePricer extends Object
Pricer for FX barrier option trades under implied trinomial tree.This function provides the ability to price an
ResolvedFxSingleBarrierOptionTrade
.
-
-
Field Summary
Fields Modifier and Type Field Description static ImpliedTrinomialTreeFxSingleBarrierOptionTradePricer
DEFAULT
Default implementation.
-
Constructor Summary
Constructors Constructor Description ImpliedTrinomialTreeFxSingleBarrierOptionTradePricer(ImpliedTrinomialTreeFxSingleBarrierOptionProductPricer productPricer, DiscountingPaymentPricer paymentPricer)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiCurrencyAmount
currencyExposure(ResolvedFxSingleBarrierOptionTrade trade, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
Calculates the currency exposure of the FX barrier option trade.CurrencyAmount
currentCash(ResolvedFxSingleBarrierOptionTrade trade, LocalDate valuationDate)
Calculates the current of the FX barrier option trade.MultiCurrencyAmount
presentValue(ResolvedFxSingleBarrierOptionTrade trade, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
Calculates the present value of the FX barrier option trade.CurrencyParameterSensitivities
presentValueSensitivityRates(ResolvedFxSingleBarrierOptionTrade trade, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
Calculates the present value sensitivity of the FX barrier option trade.
-
-
-
Field Detail
-
DEFAULT
public static final ImpliedTrinomialTreeFxSingleBarrierOptionTradePricer DEFAULT
Default implementation.
-
-
Constructor Detail
-
ImpliedTrinomialTreeFxSingleBarrierOptionTradePricer
public ImpliedTrinomialTreeFxSingleBarrierOptionTradePricer(ImpliedTrinomialTreeFxSingleBarrierOptionProductPricer productPricer, DiscountingPaymentPricer paymentPricer)
Creates an instance.- Parameters:
productPricer
- the pricer forResolvedFxSingleBarrierOption
paymentPricer
- the pricer forPayment
-
-
Method Detail
-
presentValue
public MultiCurrencyAmount presentValue(ResolvedFxSingleBarrierOptionTrade trade, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
Calculates the present value of the FX barrier option trade.The present value of the trade is the value on the valuation date.
The trinomial tree is first calibrated to Black volatilities, then the price is computed based on the calibrated tree.
- Parameters:
trade
- the option traderatesProvider
- the rates providervolatilities
- the Black volatility provider- Returns:
- the present value of the trade
-
presentValueSensitivityRates
public CurrencyParameterSensitivities presentValueSensitivityRates(ResolvedFxSingleBarrierOptionTrade trade, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
Calculates the present value sensitivity of the FX barrier option trade.The present value sensitivity of the trade is the sensitivity of the present value to the underlying curves.
The sensitivity is computed by bump and re-price, returning
CurrencyParameterSensitivities
, notPointSensitivities
.The trinomial tree is first calibrated to Black volatilities, then the price is computed based on the calibrated tree.
- Parameters:
trade
- the option traderatesProvider
- the rates providervolatilities
- the Black volatility provider- Returns:
- the present value curve sensitivity of the trade
-
currencyExposure
public MultiCurrencyAmount currencyExposure(ResolvedFxSingleBarrierOptionTrade trade, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
Calculates the currency exposure of the FX barrier option trade.The trinomial tree is first calibrated to Black volatilities, then the price is computed based on the calibrated tree.
- Parameters:
trade
- the option traderatesProvider
- the rates providervolatilities
- the Black volatility provider- Returns:
- the currency exposure
-
currentCash
public CurrencyAmount currentCash(ResolvedFxSingleBarrierOptionTrade trade, LocalDate valuationDate)
Calculates the current of the FX barrier option trade.- Parameters:
trade
- the option tradevaluationDate
- the valuation date- Returns:
- the current cash amount
-
-