Class SwaptionTradeCalculations
- java.lang.Object
- 
- com.opengamma.strata.measure.swaption.SwaptionTradeCalculations
 
- 
 public class SwaptionTradeCalculations extends Object Calculates pricing and risk measures for swaption trades.This provides a high-level entry point for swaption pricing and risk measures. Each method takes a ResolvedSwaptionTrade, whereas application code will typically work withSwaptionTrade. CallSwaptionTrade::resolve(ReferenceData)to convertSwaptionTradetoResolvedSwaptionTrade.
- 
- 
Field SummaryFields Modifier and Type Field Description static SwaptionTradeCalculationsDEFAULTDefault implementation.
 - 
Constructor SummaryConstructors Constructor Description SwaptionTradeCalculations(VolatilitySwaptionTradePricer tradePricer, SabrSwaptionTradePricer sabrTradePricer)Creates an instance.
 - 
Method Summary
 
- 
- 
- 
Field Detail- 
DEFAULTpublic static final SwaptionTradeCalculations DEFAULT Default implementation.
 
- 
 - 
Constructor Detail- 
SwaptionTradeCalculationspublic SwaptionTradeCalculations(VolatilitySwaptionTradePricer tradePricer, SabrSwaptionTradePricer sabrTradePricer) Creates an instance.In most cases, applications should use the DEFAULTinstance.- Parameters:
- tradePricer- the pricer for- ResolvedSwaptionTrade
- sabrTradePricer- the pricer for- ResolvedSwaptionTradeSABR
 
 
- 
 - 
Method Detail- 
presentValuepublic CurrencyScenarioArray presentValue(ResolvedSwaptionTrade trade, RatesMarketDataLookup ratesLookup, SwaptionMarketDataLookup swaptionLookup, ScenarioMarketData marketData) Calculates present value across one or more scenarios.- Parameters:
- trade- the trade
- ratesLookup- the lookup used to query the market data
- swaptionLookup- the lookup used to query the swaption market data
- marketData- the market data
- Returns:
- the present value, one entry per scenario
 
 - 
presentValuepublic CurrencyAmount presentValue(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SwaptionVolatilities volatilities) Calculates present value for a single set of market data.- Parameters:
- trade- the trade
- ratesProvider- the market data
- volatilities- the swaption volatilities
- Returns:
- the present value
 
 - 
pv01RatesCalibratedSumpublic MultiCurrencyScenarioArray pv01RatesCalibratedSum(ResolvedSwaptionTrade trade, RatesMarketDataLookup ratesLookup, SwaptionMarketDataLookup swaptionLookup, 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 trade
- ratesLookup- the lookup used to query the market data
- swaptionLookup- the lookup used to query the swaption market data
- marketData- the market data
- Returns:
- the present value sensitivity, one entry per scenario
 
 - 
pv01RatesCalibratedSumpublic MultiCurrencyAmount pv01RatesCalibratedSum(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SwaptionVolatilities 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 trade
- ratesProvider- the market data
- volatilities- the swaption volatilities
- Returns:
- the present value sensitivity
 
 - 
pv01RatesCalibratedBucketedpublic ScenarioArray<CurrencyParameterSensitivities> pv01RatesCalibratedBucketed(ResolvedSwaptionTrade trade, RatesMarketDataLookup ratesLookup, SwaptionMarketDataLookup swaptionLookup, 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 trade
- ratesLookup- the lookup used to query the market data
- swaptionLookup- the lookup used to query the swaption market data
- marketData- the market data
- Returns:
- the present value sensitivity, one entry per scenario
 
 - 
pv01RatesCalibratedBucketedpublic CurrencyParameterSensitivities pv01RatesCalibratedBucketed(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SwaptionVolatilities 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 trade
- ratesProvider- the market data
- volatilities- the swaption volatilities
- Returns:
- the present value sensitivity
 
 - 
pv01RatesMarketQuoteSumpublic MultiCurrencyScenarioArray pv01RatesMarketQuoteSum(ResolvedSwaptionTrade trade, RatesMarketDataLookup ratesLookup, SwaptionMarketDataLookup swaptionLookup, 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 market quotes used to calibrate the curves. The result is the sum of the sensitivities of all affected curves. - Parameters:
- trade- the trade
- ratesLookup- the lookup used to query the market data
- swaptionLookup- the lookup used to query the swaption market data
- marketData- the market data
- Returns:
- the present value sensitivity, one entry per scenario
 
 - 
pv01RatesMarketQuoteSumpublic MultiCurrencyAmount pv01RatesMarketQuoteSum(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SwaptionVolatilities 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 market quotes used to calibrate the curves. The result is the sum of the sensitivities of all affected curves. - Parameters:
- trade- the trade
- ratesProvider- the market data
- volatilities- the swaption volatilities
- Returns:
- the present value sensitivity
 
 - 
pv01RatesMarketQuoteBucketedpublic ScenarioArray<CurrencyParameterSensitivities> pv01RatesMarketQuoteBucketed(ResolvedSwaptionTrade trade, RatesMarketDataLookup ratesLookup, SwaptionMarketDataLookup swaptionLookup, 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 market quotes used to calibrate the curves. The result is provided for each affected curve and currency, bucketed by curve node. - Parameters:
- trade- the trade
- ratesLookup- the lookup used to query the market data
- marketData- the market data
- swaptionLookup- the lookup used to query the swaption market data
- Returns:
- the present value sensitivity, one entry per scenario
 
 - 
pv01RatesMarketQuoteBucketedpublic CurrencyParameterSensitivities pv01RatesMarketQuoteBucketed(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SwaptionVolatilities 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 market quotes used to calibrate the curves. The result is provided for each affected curve and currency, bucketed by curve node. - Parameters:
- trade- the trade
- ratesProvider- the market data
- volatilities- the swaption volatilities
- Returns:
- the present value sensitivity
 
 - 
vegaMarketQuoteBucketedpublic ScenarioArray<CurrencyParameterSensitivities> vegaMarketQuoteBucketed(ResolvedSwaptionTrade trade, RatesMarketDataLookup ratesLookup, SwaptionMarketDataLookup swaptionLookup, ScenarioMarketData marketData) Calculates present value vega sensitivity across one or more scenarios.This is the sensitivity of present value to the normal implied volatilities used to calibrate the curves. - Parameters:
- trade- the trade
- ratesLookup- the lookup used to query the market data
- marketData- the market data
- swaptionLookup- the lookup used to query the swaption market data
- Returns:
- the present value sensitivity, one entry per scenario
 
 - 
vegaMarketQuoteBucketedpublic CurrencyParameterSensitivities vegaMarketQuoteBucketed(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SwaptionVolatilities volatilities) Calculates present value vega sensitivity for a single set of market data.This is the sensitivity of present value of the normal implied volatilities used to calibrate the curves. - Parameters:
- trade- the trade
- ratesProvider- the market data
- volatilities- the swaption volatilities
- Returns:
- the present value sensitivity
 
 - 
currencyExposurepublic MultiCurrencyScenarioArray currencyExposure(ResolvedSwaptionTrade trade, RatesMarketDataLookup ratesLookup, SwaptionMarketDataLookup swaptionLookup, ScenarioMarketData marketData) Calculates currency exposure across one or more scenarios.The currency risk, expressed as the equivalent amount in each currency. - Parameters:
- trade- the trade
- ratesLookup- the lookup used to query the market data
- swaptionLookup- the lookup used to query the swaption market data
- marketData- the market data
- Returns:
- the currency exposure, one entry per scenario
 
 - 
currencyExposurepublic MultiCurrencyAmount currencyExposure(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SwaptionVolatilities 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 trade
- ratesProvider- the market data
- volatilities- the swaption volatilities
- Returns:
- the currency exposure
 
 - 
currentCashpublic CurrencyScenarioArray currentCash(ResolvedSwaptionTrade trade, RatesMarketDataLookup ratesLookup, SwaptionMarketDataLookup swaptionLookup, ScenarioMarketData marketData) Calculates current cash across one or more scenarios.The sum of all cash flows paid on the valuation date. - Parameters:
- trade- the trade
- ratesLookup- the lookup used to query the market data
- swaptionLookup- the lookup used to query the swaption market data
- marketData- the market data
- Returns:
- the current cash, one entry per scenario
 
 - 
currentCashpublic CurrencyAmount currentCash(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SwaptionVolatilities volatilities) Calculates current cash for a single set of market data.The sum of all cash flows paid on the valuation date. - Parameters:
- trade- the trade
- ratesProvider- the market data
- volatilities- the swaption volatilities
- Returns:
- the current cash
 
 
- 
 
-