public final class RatesCurveGroup extends Object implements CurveGroup, org.joda.beans.ImmutableBean, Serializable
This is used to hold a group of related curves, typically forming a logical set. It is often used to hold the results of a curve calibration.
Curve groups can also be created from a set of existing curves.
| Modifier and Type | Class and Description |
|---|---|
static class |
RatesCurveGroup.Builder
The bean-builder for
RatesCurveGroup. |
static class |
RatesCurveGroup.Meta
The meta-bean for
RatesCurveGroup. |
| Modifier and Type | Method and Description |
|---|---|
static RatesCurveGroup.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
Optional<Curve> |
findCurve(CurveName name)
Finds the curve with the specified name.
|
Optional<Curve> |
findDiscountCurve(Currency currency)
Finds the discount curve for the currency if there is one in the group.
|
Optional<Curve> |
findForwardCurve(Index index)
Finds the forward curve for the index if there is one in the group.
|
ImmutableMap<Currency,Curve> |
getDiscountCurves()
Gets the discount curves in the group, keyed by currency.
|
ImmutableMap<Index,Curve> |
getForwardCurves()
Gets the forward curves in the group, keyed by index.
|
CurveGroupName |
getName()
Gets the name of the curve group.
|
int |
hashCode() |
static RatesCurveGroup.Meta |
meta()
The meta-bean for
RatesCurveGroup. |
RatesCurveGroup.Meta |
metaBean() |
static RatesCurveGroup |
of(CurveGroupName name,
Map<Currency,Curve> discountCurves,
Map<Index,Curve> forwardCurves)
Returns a curve group containing the specified curves.
|
static RatesCurveGroup |
ofCurves(RatesCurveGroupDefinition curveGroupDefinition,
Collection<? extends Curve> curves)
Creates a curve group using a curve group definition and a list of existing curves.
|
static RatesCurveGroup |
ofCurves(RatesCurveGroupDefinition curveGroupDefinition,
Curve... curves)
Creates a curve group using a curve group definition and some existing curves.
|
Stream<Curve> |
stream()
Returns a stream of all curves in the group.
|
RatesCurveGroup.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
public static RatesCurveGroup of(CurveGroupName name, Map<Currency,Curve> discountCurves, Map<Index,Curve> forwardCurves)
name - the name of the curve groupdiscountCurves - the discount curves, keyed by currencyforwardCurves - the forward curves, keyed by indexpublic static RatesCurveGroup ofCurves(RatesCurveGroupDefinition curveGroupDefinition, Curve... curves)
If there are curves named in the definition which are not present in the curves the group is built using whatever curves are available.
If there are multiple curves with the same name in the curves one of them is arbitrarily chosen.
Multiple curves with the same name are allowed to support the use case where the list contains the same curve multiple times. This means the caller doesn't have to filter the input curves to remove duplicates.
curveGroupDefinition - the definition of a curve groupcurves - some curvespublic static RatesCurveGroup ofCurves(RatesCurveGroupDefinition curveGroupDefinition, Collection<? extends Curve> curves)
If there are curves named in the definition which are not present in the curves the group is built using whatever curves are available.
If there are multiple curves with the same name in the curves one of them is arbitrarily chosen.
Multiple curves with the same name are allowed to support the use case where the list contains the same curve multiple times. This means the caller doesn't have to filter the input curves to remove duplicates.
curveGroupDefinition - the definition of a curve groupcurves - some curvespublic Optional<Curve> findCurve(CurveName name)
If the curve cannot be found, empty is returned.
findCurve in interface CurveGroupname - the curve namepublic Optional<Curve> findDiscountCurve(Currency currency)
If the curve is not found, optional empty is returned.
currency - the currency for which a discount curve is requiredpublic Optional<Curve> findForwardCurve(Index index)
If the curve is not found, optional empty is returned.
index - the index for which a forward curve is requiredpublic Stream<Curve> stream()
stream in interface CurveGrouppublic static RatesCurveGroup.Meta meta()
RatesCurveGroup.public static RatesCurveGroup.Builder builder()
public RatesCurveGroup.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic CurveGroupName getName()
getName in interface CurveGrouppublic ImmutableMap<Currency,Curve> getDiscountCurves()
public ImmutableMap<Index,Curve> getForwardCurves()
public RatesCurveGroup.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.