Class BondFutureOptionTradeCalculations
- java.lang.Object
-
- com.opengamma.strata.measure.bond.BondFutureOptionTradeCalculations
-
public class BondFutureOptionTradeCalculations extends Object
Calculates pricing and risk measures for trades in an option contract based on an bond future.This provides a high-level entry point for option pricing and risk measures.
Each method takes a
ResolvedBondFutureOptionTrade
, whereas application code will typically work withBondFutureOptionTrade
. CallBondFutureOptionTrade::resolve(ReferenceData)
to convertBondFutureOptionTrade
toResolvedBondFutureOptionTrade
.Price
Strata uses decimal prices for bond futures options in the trade model, pricers and market data. This is coherent with the pricing ofBondFuture
.
-
-
Field Summary
Fields Modifier and Type Field Description static BondFutureOptionTradeCalculations
DEFAULT
Default implementation.
-
Constructor Summary
Constructors Constructor Description BondFutureOptionTradeCalculations(BlackBondFutureOptionMarginedTradePricer tradePricer)
Creates an instance.
-
Method Summary
-
-
-
Field Detail
-
DEFAULT
public static final BondFutureOptionTradeCalculations DEFAULT
Default implementation.
-
-
Constructor Detail
-
BondFutureOptionTradeCalculations
public BondFutureOptionTradeCalculations(BlackBondFutureOptionMarginedTradePricer tradePricer)
Creates an instance.In most cases, applications should use the
DEFAULT
instance.- Parameters:
tradePricer
- the pricer forResolvedBondFutureOptionTrade
-
-
Method Detail
-
presentValue
public CurrencyScenarioArray presentValue(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingMarketDataLookup legalEntityLookup, BondFutureOptionMarketDataLookup volsLookup, ScenarioMarketData marketData)
Calculates present value across one or more scenarios.- Parameters:
trade
- the tradelegalEntityLookup
- the lookup used to query the rates market datavolsLookup
- the lookup used to query the volatility market datamarketData
- the market data- Returns:
- the present value, one entry per scenario
-
presentValue
public CurrencyAmount presentValue(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingProvider discountingProvider, BondFutureVolatilities volatilities)
Calculates present value for a single set of market data.- Parameters:
trade
- the tradediscountingProvider
- the market datavolatilities
- the volatilities- Returns:
- the present value
-
pv01CalibratedSum
public MultiCurrencyScenarioArray pv01CalibratedSum(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingMarketDataLookup legalEntityLookup, BondFutureOptionMarketDataLookup volsLookup, ScenarioMarketData marketData)
Calculates present value sensitivity across one or more scenarios.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.
- Parameters:
trade
- the tradelegalEntityLookup
- the lookup used to query the rates market datavolsLookup
- the lookup used to query the volatility market datamarketData
- the market data- Returns:
- the present value sensitivity, one entry per scenario
-
pv01CalibratedSum
public MultiCurrencyAmount pv01CalibratedSum(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingProvider discountingProvider, BondFutureVolatilities volatilities)
Calculates present value sensitivity for a single set of market data.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.
- Parameters:
trade
- the tradediscountingProvider
- the market datavolatilities
- the volatilities- Returns:
- the present value sensitivity
-
pv01CalibratedBucketed
public ScenarioArray<CurrencyParameterSensitivities> pv01CalibratedBucketed(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingMarketDataLookup legalEntityLookup, BondFutureOptionMarketDataLookup volsLookup, ScenarioMarketData marketData)
Calculates present value sensitivity across one or more scenarios.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.
- Parameters:
trade
- the tradelegalEntityLookup
- the lookup used to query the rates market datavolsLookup
- the lookup used to query the volatility market datamarketData
- the market data- Returns:
- the present value sensitivity, one entry per scenario
-
pv01CalibratedBucketed
public CurrencyParameterSensitivities pv01CalibratedBucketed(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingProvider discountingProvider, BondFutureVolatilities volatilities)
Calculates present value sensitivity for a single set of market data.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.
- Parameters:
trade
- the tradediscountingProvider
- the market datavolatilities
- the volatilities- Returns:
- the present value sensitivity
-
unitPrice
public DoubleScenarioArray unitPrice(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingMarketDataLookup legalEntityLookup, BondFutureOptionMarketDataLookup volsLookup, ScenarioMarketData marketData)
Calculates unit price across one or more scenarios.This is the price of a single unit of the security.
Price
Strata uses decimal prices for bond futures options in the trade model, pricers and market data. This is coherent with the pricing ofBondFuture
.- Parameters:
trade
- the tradelegalEntityLookup
- the lookup used to query the rates market datavolsLookup
- the lookup used to query the volatility market datamarketData
- the market data- Returns:
- the present value, one entry per scenario
-
unitPrice
public double unitPrice(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingProvider discountingProvider, BondFutureVolatilities volatilities)
Calculates unit price for a single set of market data.This is the price of a single unit of the security.
Price
Strata uses decimal prices for bond futures options in the trade model, pricers and market data. This is coherent with the pricing ofBondFuture
.- Parameters:
trade
- the tradediscountingProvider
- the market datavolatilities
- the volatilities- Returns:
- the present value
-
currencyExposure
public MultiCurrencyScenarioArray currencyExposure(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingMarketDataLookup legalEntityLookup, BondFutureOptionMarketDataLookup volsLookup, ScenarioMarketData marketData)
Calculates currency exposure across one or more scenarios.The currency risk, expressed as the equivalent amount in each currency.
- Parameters:
trade
- the tradelegalEntityLookup
- the lookup used to query the rates market datavolsLookup
- the lookup used to query the volatility market datamarketData
- the market data- Returns:
- the currency exposure, one entry per scenario
-
currencyExposure
public MultiCurrencyAmount currencyExposure(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingProvider discountingProvider, BondFutureVolatilities volatilities)
Calculates currency exposure for a single set of market data.The currency risk, expressed as the equivalent amount in each currency.
- Parameters:
trade
- the tradediscountingProvider
- the market datavolatilities
- the volatilities- Returns:
- the currency exposure
-
-