public class DsfTradeCalculations extends Object
This provides a high-level entry point for DSF pricing and risk measures.
Each method takes a ResolvedDsfTrade, whereas application code will
typically work with DsfTrade. Call
DsfTrade::resolve(ReferenceData)
to convert DsfTrade to ResolvedDsfTrade.
(100 + percentPv), or 0.182% in this example.
Strata uses decimal prices for DSFs in the trade model, pricers and market data. The decimal price is based on the decimal multiplier equivalent to the implied percentage. Thus the market price of 100.182 is represented in Strata by 1.00182.
| Modifier and Type | Field and Description |
|---|---|
static DsfTradeCalculations |
DEFAULT
Default implementation.
|
| Constructor and Description |
|---|
DsfTradeCalculations(DiscountingDsfTradePricer tradePricer)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
MultiCurrencyScenarioArray |
currencyExposure(ResolvedDsfTrade trade,
RatesMarketDataLookup lookup,
ScenarioMarketData marketData)
Calculates currency exposure across one or more scenarios.
|
MultiCurrencyAmount |
currencyExposure(ResolvedDsfTrade trade,
RatesProvider ratesProvider)
Calculates currency exposure for a single set of market data.
|
CurrencyScenarioArray |
presentValue(ResolvedDsfTrade trade,
RatesMarketDataLookup lookup,
ScenarioMarketData marketData)
Calculates present value across one or more scenarios.
|
CurrencyAmount |
presentValue(ResolvedDsfTrade trade,
RatesProvider ratesProvider)
Calculates present value for a single set of market data.
|
ScenarioArray<CurrencyParameterSensitivities> |
pv01CalibratedBucketed(ResolvedDsfTrade trade,
RatesMarketDataLookup lookup,
ScenarioMarketData marketData)
Calculates present value sensitivity across one or more scenarios.
|
CurrencyParameterSensitivities |
pv01CalibratedBucketed(ResolvedDsfTrade trade,
RatesProvider ratesProvider)
Calculates present value sensitivity for a single set of market data.
|
MultiCurrencyScenarioArray |
pv01CalibratedSum(ResolvedDsfTrade trade,
RatesMarketDataLookup lookup,
ScenarioMarketData marketData)
Calculates present value sensitivity across one or more scenarios.
|
MultiCurrencyAmount |
pv01CalibratedSum(ResolvedDsfTrade trade,
RatesProvider ratesProvider)
Calculates present value sensitivity for a single set of market data.
|
ScenarioArray<CurrencyParameterSensitivities> |
pv01MarketQuoteBucketed(ResolvedDsfTrade trade,
RatesMarketDataLookup lookup,
ScenarioMarketData marketData)
Calculates present value sensitivity across one or more scenarios.
|
CurrencyParameterSensitivities |
pv01MarketQuoteBucketed(ResolvedDsfTrade trade,
RatesProvider ratesProvider)
Calculates present value sensitivity for a single set of market data.
|
MultiCurrencyScenarioArray |
pv01MarketQuoteSum(ResolvedDsfTrade trade,
RatesMarketDataLookup lookup,
ScenarioMarketData marketData)
Calculates present value sensitivity across one or more scenarios.
|
MultiCurrencyAmount |
pv01MarketQuoteSum(ResolvedDsfTrade trade,
RatesProvider ratesProvider)
Calculates present value sensitivity for a single set of market data.
|
DoubleScenarioArray |
unitPrice(ResolvedDsfTrade trade,
RatesMarketDataLookup lookup,
ScenarioMarketData marketData)
Calculates unit price across one or more scenarios.
|
double |
unitPrice(ResolvedDsfTrade trade,
RatesProvider ratesProvider)
Calculates unit price for a single set of market data.
|
public static final DsfTradeCalculations DEFAULT
public DsfTradeCalculations(DiscountingDsfTradePricer tradePricer)
In most cases, applications should use the DEFAULT instance.
tradePricer - the pricer for ResolvedDsfTradepublic CurrencyScenarioArray presentValue(ResolvedDsfTrade trade, RatesMarketDataLookup lookup, ScenarioMarketData marketData)
trade - the tradelookup - the lookup used to query the market datamarketData - the market datapublic CurrencyAmount presentValue(ResolvedDsfTrade trade, RatesProvider ratesProvider)
trade - the traderatesProvider - the market datapublic MultiCurrencyScenarioArray pv01CalibratedSum(ResolvedDsfTrade trade, RatesMarketDataLookup lookup, ScenarioMarketData marketData)
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 tradelookup - the lookup used to query the market datamarketData - the market datapublic MultiCurrencyAmount pv01CalibratedSum(ResolvedDsfTrade trade, RatesProvider ratesProvider)
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 datapublic ScenarioArray<CurrencyParameterSensitivities> pv01CalibratedBucketed(ResolvedDsfTrade trade, RatesMarketDataLookup lookup, ScenarioMarketData marketData)
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 tradelookup - the lookup used to query the market datamarketData - the market datapublic CurrencyParameterSensitivities pv01CalibratedBucketed(ResolvedDsfTrade trade, RatesProvider ratesProvider)
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 datapublic MultiCurrencyScenarioArray pv01MarketQuoteSum(ResolvedDsfTrade trade, RatesMarketDataLookup lookup, ScenarioMarketData marketData)
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 tradelookup - the lookup used to query the market datamarketData - the market datapublic MultiCurrencyAmount pv01MarketQuoteSum(ResolvedDsfTrade trade, RatesProvider ratesProvider)
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 datapublic ScenarioArray<CurrencyParameterSensitivities> pv01MarketQuoteBucketed(ResolvedDsfTrade trade, RatesMarketDataLookup lookup, ScenarioMarketData marketData)
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 tradelookup - the lookup used to query the market datamarketData - the market datapublic CurrencyParameterSensitivities pv01MarketQuoteBucketed(ResolvedDsfTrade trade, RatesProvider ratesProvider)
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 datapublic DoubleScenarioArray unitPrice(ResolvedDsfTrade trade, RatesMarketDataLookup lookup, ScenarioMarketData marketData)
This is the price of a single unit of the security.
Strata uses decimal prices for DSFs in the trade model, pricers and market data. The decimal price is based on the decimal multiplier equivalent to the implied percentage. Thus the market price of 100.182 is represented in Strata by 1.00182.
trade - the tradelookup - the lookup used to query the market datamarketData - the market datapublic double unitPrice(ResolvedDsfTrade trade, RatesProvider ratesProvider)
This is the price of a single unit of the security.
Strata uses decimal prices for DSFs in the trade model, pricers and market data. The decimal price is based on the decimal multiplier equivalent to the implied percentage. Thus the market price of 100.182 is represented in Strata by 1.00182.
trade - the traderatesProvider - the market datapublic MultiCurrencyScenarioArray currencyExposure(ResolvedDsfTrade trade, RatesMarketDataLookup lookup, ScenarioMarketData marketData)
The currency risk, expressed as the equivalent amount in each currency.
trade - the tradelookup - the lookup used to query the market datamarketData - the market datapublic MultiCurrencyAmount currencyExposure(ResolvedDsfTrade trade, RatesProvider ratesProvider)
The currency risk, expressed as the equivalent amount in each currency.
trade - the traderatesProvider - the market dataCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.