public class FxSingleTradeCalculations extends Object
This provides a high-level entry point for FX pricing and risk measures.
Each method takes a ResolvedFxSingleTrade, whereas application code will
typically work with FxSingleTrade. Call
FxSingleTrade::resolve(ReferenceData)
to convert FxSingleTrade to ResolvedFxSingleTrade.
| Modifier and Type | Field and Description |
|---|---|
static FxSingleTradeCalculations |
DEFAULT
Default implementation.
|
| Constructor and Description |
|---|
FxSingleTradeCalculations(DiscountingFxSingleTradePricer tradePricer)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
MultiCurrencyScenarioArray |
currencyExposure(ResolvedFxSingleTrade trade,
RatesMarketDataLookup lookup,
ScenarioMarketData marketData)
Calculates currency exposure across one or more scenarios.
|
MultiCurrencyAmount |
currencyExposure(ResolvedFxSingleTrade trade,
RatesProvider ratesProvider)
Calculates currency exposure for a single set of market data.
|
MultiCurrencyScenarioArray |
currentCash(ResolvedFxSingleTrade trade,
RatesMarketDataLookup lookup,
ScenarioMarketData marketData)
Calculates current cash across one or more scenarios.
|
MultiCurrencyAmount |
currentCash(ResolvedFxSingleTrade trade,
RatesProvider ratesProvider)
Calculates current cash for a single set of market data.
|
ScenarioArray<FxRate> |
forwardFxRate(ResolvedFxSingleTrade trade,
RatesMarketDataLookup lookup,
ScenarioMarketData marketData)
Calculates the forward FX rate across one or more scenarios.
|
FxRate |
forwardFxRate(ResolvedFxSingleTrade trade,
RatesProvider ratesProvider)
Calculates the forward FX rate for a single set of market data.
|
DoubleScenarioArray |
parSpread(ResolvedFxSingleTrade trade,
RatesMarketDataLookup lookup,
ScenarioMarketData marketData)
Calculates par spread across one or more scenarios.
|
double |
parSpread(ResolvedFxSingleTrade trade,
RatesProvider ratesProvider)
Calculates par spread for a single set of market data.
|
MultiCurrencyScenarioArray |
presentValue(ResolvedFxSingleTrade trade,
RatesMarketDataLookup lookup,
ScenarioMarketData marketData)
Calculates present value across one or more scenarios.
|
MultiCurrencyAmount |
presentValue(ResolvedFxSingleTrade trade,
RatesProvider ratesProvider)
Calculates present value for a single set of market data.
|
ScenarioArray<CurrencyParameterSensitivities> |
pv01CalibratedBucketed(ResolvedFxSingleTrade trade,
RatesMarketDataLookup lookup,
ScenarioMarketData marketData)
Calculates present value sensitivity across one or more scenarios.
|
CurrencyParameterSensitivities |
pv01CalibratedBucketed(ResolvedFxSingleTrade trade,
RatesProvider ratesProvider)
Calculates present value sensitivity for a single set of market data.
|
MultiCurrencyScenarioArray |
pv01CalibratedSum(ResolvedFxSingleTrade trade,
RatesMarketDataLookup lookup,
ScenarioMarketData marketData)
Calculates present value sensitivity across one or more scenarios.
|
MultiCurrencyAmount |
pv01CalibratedSum(ResolvedFxSingleTrade trade,
RatesProvider ratesProvider)
Calculates present value sensitivity for a single set of market data.
|
ScenarioArray<CurrencyParameterSensitivities> |
pv01MarketQuoteBucketed(ResolvedFxSingleTrade trade,
RatesMarketDataLookup lookup,
ScenarioMarketData marketData)
Calculates present value sensitivity across one or more scenarios.
|
CurrencyParameterSensitivities |
pv01MarketQuoteBucketed(ResolvedFxSingleTrade trade,
RatesProvider ratesProvider)
Calculates present value sensitivity for a single set of market data.
|
MultiCurrencyScenarioArray |
pv01MarketQuoteSum(ResolvedFxSingleTrade trade,
RatesMarketDataLookup lookup,
ScenarioMarketData marketData)
Calculates present value sensitivity across one or more scenarios.
|
MultiCurrencyAmount |
pv01MarketQuoteSum(ResolvedFxSingleTrade trade,
RatesProvider ratesProvider)
Calculates present value sensitivity for a single set of market data.
|
public static final FxSingleTradeCalculations DEFAULT
public FxSingleTradeCalculations(DiscountingFxSingleTradePricer tradePricer)
In most cases, applications should use the DEFAULT instance.
tradePricer - the pricer for ResolvedFxSingleTradepublic MultiCurrencyScenarioArray presentValue(ResolvedFxSingleTrade trade, RatesMarketDataLookup lookup, ScenarioMarketData marketData)
trade - the tradelookup - the lookup used to query the market datamarketData - the market datapublic MultiCurrencyAmount presentValue(ResolvedFxSingleTrade trade, RatesProvider ratesProvider)
trade - the traderatesProvider - the market datapublic MultiCurrencyScenarioArray pv01CalibratedSum(ResolvedFxSingleTrade 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(ResolvedFxSingleTrade 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(ResolvedFxSingleTrade 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(ResolvedFxSingleTrade 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(ResolvedFxSingleTrade 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(ResolvedFxSingleTrade 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(ResolvedFxSingleTrade 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(ResolvedFxSingleTrade 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 parSpread(ResolvedFxSingleTrade trade, RatesMarketDataLookup lookup, ScenarioMarketData marketData)
trade - the tradelookup - the lookup used to query the market datamarketData - the market datapublic double parSpread(ResolvedFxSingleTrade trade, RatesProvider ratesProvider)
trade - the traderatesProvider - the market datapublic MultiCurrencyScenarioArray currencyExposure(ResolvedFxSingleTrade 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(ResolvedFxSingleTrade trade, RatesProvider ratesProvider)
The currency risk, expressed as the equivalent amount in each currency.
trade - the traderatesProvider - the market datapublic MultiCurrencyScenarioArray currentCash(ResolvedFxSingleTrade trade, RatesMarketDataLookup lookup, ScenarioMarketData marketData)
The sum of all cash flows paid on the valuation date.
trade - the tradelookup - the lookup used to query the market datamarketData - the market datapublic MultiCurrencyAmount currentCash(ResolvedFxSingleTrade trade, RatesProvider ratesProvider)
The sum of all cash flows paid on the valuation date.
trade - the traderatesProvider - the market datapublic ScenarioArray<FxRate> forwardFxRate(ResolvedFxSingleTrade trade, RatesMarketDataLookup lookup, ScenarioMarketData marketData)
trade - the tradelookup - the lookup used to query the market datamarketData - the market datapublic FxRate forwardFxRate(ResolvedFxSingleTrade trade, RatesProvider ratesProvider)
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.