Class CapitalIndexedBondTradeCalculations
- java.lang.Object
 - 
- com.opengamma.strata.measure.bond.CapitalIndexedBondTradeCalculations
 
 
- 
public class CapitalIndexedBondTradeCalculations extends Object
Calculates pricing and risk measures for forward rate agreement (capital indexed bond) trades.This provides a high-level entry point for capital indexed bond pricing and risk measures.
Each method takes a
ResolvedCapitalIndexedBondTrade, whereas application code will typically work withCapitalIndexedBondTrade. CallCapitalIndexedBondTrade::resolve(ReferenceData)to convertCapitalIndexedBondTradetoResolvedCapitalIndexedBondTrade.Price
Strata uses decimal prices for bonds in the trade model, pricers and market data. For example, a price of 99.32% is represented in Strata by 0.9932. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static CapitalIndexedBondTradeCalculationsDEFAULTDefault implementation. 
- 
Constructor Summary
Constructors Constructor Description CapitalIndexedBondTradeCalculations(DiscountingCapitalIndexedBondTradePricer tradePricer)Creates an instance. 
- 
Method Summary
 
 - 
 
- 
- 
Field Detail
- 
DEFAULT
public static final CapitalIndexedBondTradeCalculations DEFAULT
Default implementation. 
 - 
 
- 
Constructor Detail
- 
CapitalIndexedBondTradeCalculations
public CapitalIndexedBondTradeCalculations(DiscountingCapitalIndexedBondTradePricer tradePricer)
Creates an instance.In most cases, applications should use the
DEFAULTinstance.- Parameters:
 tradePricer- the pricer forResolvedCapitalIndexedBondTrade
 
 - 
 
- 
Method Detail
- 
presentValue
public CurrencyScenarioArray presentValue(ResolvedCapitalIndexedBondTrade trade, RatesMarketDataLookup ratesLookup, LegalEntityDiscountingMarketDataLookup legalEntityLookup, ScenarioMarketData marketData)
Calculates present value across one or more scenarios.- Parameters:
 trade- the traderatesLookup- the lookup used to query the market datalegalEntityLookup- the lookup used to query the market datamarketData- the market data- Returns:
 - the present value, one entry per scenario
 
 
- 
presentValue
public CurrencyAmount presentValue(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider legalEntityProvider)
Calculates present value for a single set of market data.- Parameters:
 trade- the traderatesProvider- the market datalegalEntityProvider- the market data- Returns:
 - the present value
 
 
- 
pv01CalibratedSum
public MultiCurrencyScenarioArray pv01CalibratedSum(ResolvedCapitalIndexedBondTrade trade, RatesMarketDataLookup ratesLookup, LegalEntityDiscountingMarketDataLookup legalEntityLookup, 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 traderatesLookup- the lookup used to query the market datalegalEntityLookup- the lookup used to query the market datamarketData- the market data- Returns:
 - the present value sensitivity, one entry per scenario
 
 
- 
pv01CalibratedSum
public MultiCurrencyAmount pv01CalibratedSum(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider legalEntityProvider)
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 traderatesProvider- the market datalegalEntityProvider- the market data- Returns:
 - the present value sensitivity
 
 
- 
pv01CalibratedBucketed
public ScenarioArray<CurrencyParameterSensitivities> pv01CalibratedBucketed(ResolvedCapitalIndexedBondTrade trade, RatesMarketDataLookup ratesLookup, LegalEntityDiscountingMarketDataLookup legalEntityLookup, 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 traderatesLookup- the lookup used to query the market datalegalEntityLookup- the lookup used to query the market datamarketData- the market data- Returns:
 - the present value sensitivity, one entry per scenario
 
 
- 
pv01CalibratedBucketed
public CurrencyParameterSensitivities pv01CalibratedBucketed(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider legalEntityProvider)
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 traderatesProvider- the market datalegalEntityProvider- the market data- Returns:
 - the present value sensitivity
 
 
- 
currencyExposure
public MultiCurrencyScenarioArray currencyExposure(ResolvedCapitalIndexedBondTrade trade, RatesMarketDataLookup ratesLookup, LegalEntityDiscountingMarketDataLookup legalEntityLookup, ScenarioMarketData marketData)
Calculates currency exposure across one or more scenarios.The currency risk, expressed as the equivalent amount in each currency.
- Parameters:
 trade- the traderatesLookup- the lookup used to query the market datalegalEntityLookup- the lookup used to query the market datamarketData- the market data- Returns:
 - the currency exposure, one entry per scenario
 
 
- 
currencyExposure
public MultiCurrencyAmount currencyExposure(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider legalEntityProvider)
Calculates currency exposure for a single set of market data.The currency risk, expressed as the equivalent amount in each currency.
- Parameters:
 trade- the traderatesProvider- the market datalegalEntityProvider- the market data- Returns:
 - the currency exposure
 
 
- 
currentCash
public CurrencyScenarioArray currentCash(ResolvedCapitalIndexedBondTrade trade, RatesMarketDataLookup ratesLookup, LegalEntityDiscountingMarketDataLookup legalEntityLookup, ScenarioMarketData marketData)
Calculates current cash across one or more scenarios.The sum of all cash flows paid on the valuation date.
- Parameters:
 trade- the traderatesLookup- the lookup used to query the market datalegalEntityLookup- the lookup used to query the market datamarketData- the market data- Returns:
 - the current cash, one entry per scenario
 
 
- 
currentCash
public CurrencyAmount currentCash(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider legalEntityProvider)
Calculates current cash for a single set of market data.The sum of all cash flows paid on the valuation date.
- Parameters:
 trade- the traderatesProvider- the market datalegalEntityProvider- the market data- Returns:
 - the current cash
 
 
 - 
 
 -