public final class CalculationRules extends Object implements org.joda.beans.ImmutableBean
CalculationRunner provides the ability to perform calculations on many targets,
such as trades and positions. It returns a grid of results, with the targets as rows.
Each individual calculation is controlled by three things:
CalculationRules operates in association with Column.
The column is used to define the measure. It can also be used to specify column-specific parameters.
The rules contain the complete set of functions and the default set of parameters.| Modifier and Type | Class and Description |
|---|---|
static class |
CalculationRules.Meta
The meta-bean for
CalculationRules. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
CalculationFunctions |
getFunctions()
Gets the calculation functions.
|
CalculationParameters |
getParameters()
Gets the calculation parameters, used to control the how the calculation is performed.
|
ReportingCurrency |
getReportingCurrency()
Gets the reporting currency, used to control currency conversion.
|
int |
hashCode() |
static CalculationRules.Meta |
meta()
The meta-bean for
CalculationRules. |
CalculationRules.Meta |
metaBean() |
static CalculationRules |
of(CalculationFunctions functions,
CalculationParameter... parameters)
Obtains an instance specifying the functions to use and some additional parameters.
|
static CalculationRules |
of(CalculationFunctions functions,
CalculationParameters parameters)
Obtains an instance specifying the functions to use and some additional parameters.
|
static CalculationRules |
of(CalculationFunctions functions,
Currency reportingCurrency,
CalculationParameter... parameters)
Obtains an instance specifying the functions, reporting currency and additional parameters.
|
static CalculationRules |
of(CalculationFunctions functions,
ReportingCurrency reportingCurrency,
CalculationParameters parameters)
Obtains an instance specifying the functions, reporting currency and additional parameters.
|
String |
toString() |
public static CalculationRules of(CalculationFunctions functions, CalculationParameter... parameters)
The output will uses the "natural" reporting currency.
Most functions require a parameter to control their behavior, such as RatesMarketDataLookup.
functions - the calculation functionsparameters - the parameters that control the calculation, may be emptypublic static CalculationRules of(CalculationFunctions functions, CalculationParameters parameters)
The output will uses the "natural" reporting currency.
Most functions require a parameter to control their behavior, such as RatesMarketDataLookup.
functions - the calculation functionsparameters - the parameters that control the calculation, may be emptypublic static CalculationRules of(CalculationFunctions functions, Currency reportingCurrency, CalculationParameter... parameters)
Most functions require a parameter to control their behavior, such as RatesMarketDataLookup.
functions - the calculation functionsreportingCurrency - the reporting currencyparameters - the parameters that control the calculation, may be emptypublic static CalculationRules of(CalculationFunctions functions, ReportingCurrency reportingCurrency, CalculationParameters parameters)
Most functions require a parameter to control their behavior, such as RatesMarketDataLookup.
functions - the calculation functionsreportingCurrency - the reporting currencyparameters - the parameters that control the calculation, may be emptypublic static CalculationRules.Meta meta()
CalculationRules.public CalculationRules.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic CalculationFunctions getFunctions()
Functions provide the logic of the calculation. Each type of target must have an associated function in order for calculations to be performed.
public ReportingCurrency getReportingCurrency()
This is used to specify the currency that the result should be reporting in. If the result is not associated with a currency, such as for "par rate", then the reporting currency will effectively be ignored.
public CalculationParameters getParameters()
Parameters are used to parameterize the Measure to be calculated.
They may be specified in two places - here and in the Column.
The parameters specified here are the defaults that apply to all columns.
If a parameter is defined here and in the column with the same query type, then the column parameter takes precedence.
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.