public class FxSingleBarrierOptionTradeCalculations extends Object
This provides a high-level entry point for FX single barrier option pricing and risk measures. Pricing is performed using the Black method.
Each method takes a ResolvedFxSingleBarrierOptionTrade, whereas application code will
typically work with FxSingleBarrierOptionTrade. Call
FxSingleBarrierOptionTrade::resolve(ReferenceData)
to convert FxSingleBarrierOptionTrade to ResolvedFxSingleBarrierOptionTrade.
| Modifier and Type | Field and Description |
|---|---|
static FxSingleBarrierOptionTradeCalculations |
DEFAULT
Default implementation.
|
| Constructor and Description |
|---|
FxSingleBarrierOptionTradeCalculations(BlackFxSingleBarrierOptionTradePricer blackPricer,
ImpliedTrinomialTreeFxSingleBarrierOptionTradePricer trinomialTreePricer)
Creates an instance.
|
public static final FxSingleBarrierOptionTradeCalculations DEFAULT
public FxSingleBarrierOptionTradeCalculations(BlackFxSingleBarrierOptionTradePricer blackPricer, ImpliedTrinomialTreeFxSingleBarrierOptionTradePricer trinomialTreePricer)
In most cases, applications should use the DEFAULT instance.
blackPricer - the pricer for ResolvedFxSingleBarrierOptionTrade using BlacktrinomialTreePricer - the pricer for ResolvedFxSingleBarrierOptionTrade using Trinomial-Treepublic MultiCurrencyScenarioArray presentValue(ResolvedFxSingleBarrierOptionTrade trade, RatesMarketDataLookup ratesLookup, FxOptionMarketDataLookup fxLookup, ScenarioMarketData marketData, FxSingleBarrierOptionMethod method)
trade - the traderatesLookup - the lookup used to query the market datafxLookup - the lookup used to query the option market datamarketData - the market datamethod - the pricing methodpublic MultiCurrencyAmount presentValue(ResolvedFxSingleBarrierOptionTrade trade, RatesProvider ratesProvider, FxOptionVolatilities volatilities, FxSingleBarrierOptionMethod method)
trade - the traderatesProvider - the market datavolatilities - the option volatilitiesmethod - the pricing methodpublic MultiCurrencyScenarioArray pv01RatesCalibratedSum(ResolvedFxSingleBarrierOptionTrade trade, RatesMarketDataLookup ratesLookup, FxOptionMarketDataLookup fxLookup, ScenarioMarketData marketData, FxSingleBarrierOptionMethod method)
This is the sensitivity of present value to a one basis point shift in the calibrated curves. The result is the sum of the sensitivities of all affected curves.
trade - the traderatesLookup - the lookup used to query the market datafxLookup - the lookup used to query the option market datamarketData - the market datamethod - the pricing methodpublic MultiCurrencyAmount pv01RatesCalibratedSum(ResolvedFxSingleBarrierOptionTrade trade, RatesProvider ratesProvider, FxOptionVolatilities volatilities, FxSingleBarrierOptionMethod method)
This is the sensitivity of present value to a one basis point shift in the calibrated curves. The result is the sum of the sensitivities of all affected curves.
trade - the traderatesProvider - the market datavolatilities - the option volatilitiesmethod - the pricing methodpublic ScenarioArray<CurrencyParameterSensitivities> pv01RatesCalibratedBucketed(ResolvedFxSingleBarrierOptionTrade trade, RatesMarketDataLookup ratesLookup, FxOptionMarketDataLookup fxLookup, ScenarioMarketData marketData, FxSingleBarrierOptionMethod method)
This is the sensitivity of present value to a one basis point shift in the calibrated curves. The result is provided for each affected curve and currency, bucketed by curve node.
trade - the traderatesLookup - the lookup used to query the market datafxLookup - the lookup used to query the option market datamarketData - the market datamethod - the pricing methodpublic CurrencyParameterSensitivities pv01RatesCalibratedBucketed(ResolvedFxSingleBarrierOptionTrade trade, RatesProvider ratesProvider, FxOptionVolatilities volatilities, FxSingleBarrierOptionMethod method)
This is the sensitivity of present value to a one basis point shift in the calibrated curves. The result is provided for each affected curve and currency, bucketed by curve node.
trade - the traderatesProvider - the market datavolatilities - the option volatilitiesmethod - the pricing methodpublic MultiCurrencyScenarioArray pv01RatesMarketQuoteSum(ResolvedFxSingleBarrierOptionTrade trade, RatesMarketDataLookup ratesLookup, FxOptionMarketDataLookup fxLookup, ScenarioMarketData marketData, FxSingleBarrierOptionMethod method)
This is the sensitivity of present value to a one basis point shift in the market quotes used to calibrate the curves. The result is the sum of the sensitivities of all affected curves.
trade - the traderatesLookup - the lookup used to query the market datafxLookup - the lookup used to query the option market datamarketData - the market datamethod - the pricing methodpublic MultiCurrencyAmount pv01RatesMarketQuoteSum(ResolvedFxSingleBarrierOptionTrade trade, RatesProvider ratesProvider, FxOptionVolatilities volatilities, FxSingleBarrierOptionMethod method)
This is the sensitivity of present value to a one basis point shift in the market quotes used to calibrate the curves. The result is the sum of the sensitivities of all affected curves.
trade - the traderatesProvider - the market datavolatilities - the option volatilitiesmethod - the pricing methodpublic ScenarioArray<CurrencyParameterSensitivities> pv01RatesMarketQuoteBucketed(ResolvedFxSingleBarrierOptionTrade trade, RatesMarketDataLookup ratesLookup, FxOptionMarketDataLookup fxLookup, ScenarioMarketData marketData, FxSingleBarrierOptionMethod method)
This is the sensitivity of present value to a one basis point shift in the market quotes used to calibrate the curves. The result is provided for each affected curve and currency, bucketed by curve node.
trade - the traderatesLookup - the lookup used to query the market datamarketData - the market datafxLookup - the lookup used to query the option market datamethod - the pricing methodpublic CurrencyParameterSensitivities pv01RatesMarketQuoteBucketed(ResolvedFxSingleBarrierOptionTrade trade, RatesProvider ratesProvider, FxOptionVolatilities volatilities, FxSingleBarrierOptionMethod method)
This is the sensitivity of present value to a one basis point shift in the market quotes used to calibrate the curves. The result is provided for each affected curve and currency, bucketed by curve node.
trade - the traderatesProvider - the market datavolatilities - the option volatilitiesmethod - the pricing methodpublic ScenarioArray<CurrencyParameterSensitivities> vegaMarketQuoteBucketed(ResolvedFxSingleBarrierOptionTrade trade, RatesMarketDataLookup ratesLookup, FxOptionMarketDataLookup fxLookup, ScenarioMarketData marketData, FxSingleBarrierOptionMethod method)
This is the sensitivity of present value to the implied volatilities used to calibrate the curves.
trade - the traderatesLookup - the lookup used to query the market datamarketData - the market datafxLookup - the lookup used to query the option market datamethod - the pricing methodpublic CurrencyParameterSensitivities vegaMarketQuoteBucketed(ResolvedFxSingleBarrierOptionTrade trade, RatesProvider ratesProvider, FxOptionVolatilities volatilities, FxSingleBarrierOptionMethod method)
This is the sensitivity of present value of the implied volatilities used to calibrate the curves.
trade - the traderatesProvider - the market datavolatilities - the option volatilitiesmethod - the pricing methodpublic MultiCurrencyScenarioArray currencyExposure(ResolvedFxSingleBarrierOptionTrade trade, RatesMarketDataLookup ratesLookup, FxOptionMarketDataLookup fxLookup, ScenarioMarketData marketData, FxSingleBarrierOptionMethod method)
The currency risk, expressed as the equivalent amount in each currency.
trade - the traderatesLookup - the lookup used to query the market datafxLookup - the lookup used to query the option market datamarketData - the market datamethod - the pricing methodpublic MultiCurrencyAmount currencyExposure(ResolvedFxSingleBarrierOptionTrade trade, RatesProvider ratesProvider, FxOptionVolatilities volatilities, FxSingleBarrierOptionMethod method)
The currency risk, expressed as the equivalent amount in each currency.
trade - the traderatesProvider - the market datavolatilities - the option volatilitiesmethod - the pricing methodpublic CurrencyScenarioArray currentCash(ResolvedFxSingleBarrierOptionTrade trade, RatesMarketDataLookup ratesLookup, FxOptionMarketDataLookup fxLookup, ScenarioMarketData marketData, FxSingleBarrierOptionMethod method)
The sum of all cash flows paid on the valuation date.
trade - the traderatesLookup - the lookup used to query the market datafxLookup - the lookup used to query the option market datamarketData - the market datamethod - the pricing methodpublic CurrencyAmount currentCash(ResolvedFxSingleBarrierOptionTrade trade, RatesProvider ratesProvider, FxOptionVolatilities volatilities, FxSingleBarrierOptionMethod method)
The sum of all cash flows paid on the valuation date.
trade - the traderatesProvider - the market datavolatilities - the option volatilitiesmethod - the pricing methodCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.