T
- the type of the market data handled by the perturbationpublic interface ScenarioPerturbation<T>
A perturbation is used to change market data in some way. It applies to a single piece of data, such as a discount curve or volatility surface. For example, a 5 basis point parallel shift of a curve, or a 10% increase in the quoted price of a security.
Implementations must be immutable and thread-safe beans.
Modifier and Type | Method and Description |
---|---|
MarketDataBox<T> |
applyTo(MarketDataBox<T> marketData,
ReferenceData refData)
Applies this perturbation to the market data in a box, returning a box containing new, modified data.
|
Class<T> |
getMarketDataType()
Returns the market data type that the perturbation changes.
|
int |
getScenarioCount()
Returns the number of scenarios for which this perturbation generates data.
|
static <T> ScenarioPerturbation<T> |
none()
Returns an instance that does not perturb the input.
|
static <T> ScenarioPerturbation<T> none()
This is useful for creating base scenarios where none of the market data is perturbed.
T
- the type of the market data handled by the perturbationMarketDataBox<T> applyTo(MarketDataBox<T> marketData, ReferenceData refData)
The original market data must not be altered. Instead a perturbed copy must be returned.
marketData
- the market data to perturbrefData
- the reference dataRuntimeException
- if unable to perform the perturbationint getScenarioCount()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.