Class LegalEntityCurveGroup

  • All Implemented Interfaces:
    CurveGroup, Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class LegalEntityCurveGroup
    extends Object
    implements CurveGroup, org.joda.beans.ImmutableBean, Serializable
    A group of repo curves and issuer curves.

    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.

    See Also:
    Serialized Form
    • Method Detail

      • of

        public static LegalEntityCurveGroup of​(CurveGroupName name,
                                               Map<Pair<RepoGroup,​Currency>,​Curve> repoCurves,
                                               Map<Pair<LegalEntityGroup,​Currency>,​Curve> issuerCurves)
        Returns a curve group containing the specified curves.
        Parameters:
        name - the name of the curve group
        repoCurves - the repo curves, keyed by pair of repo group and currency
        issuerCurves - the issuer curves, keyed by pair of legal entity group and currency
        Returns:
        a curve group containing the specified curves
      • findCurve

        public Optional<Curve> findCurve​(CurveName name)
        Finds the curve with the specified name.

        If the curve cannot be found, empty is returned.

        Specified by:
        findCurve in interface CurveGroup
        Parameters:
        name - the curve name
        Returns:
        the curve, empty if not found
      • findRepoCurve

        public Optional<Curve> findRepoCurve​(RepoGroup repoGroup,
                                             Currency currency)
        Finds the repo curve for the repo group and currency if there is one in the group.

        If the curve is not found, optional empty is returned.

        Parameters:
        repoGroup - the repo group
        currency - the currency
        Returns:
        the repo curve for the repo group and currency if there is one in the group
      • findIssuerCurve

        public Optional<Curve> findIssuerCurve​(LegalEntityGroup legalEntityGroup,
                                               Currency currency)
        Finds the issuer curve for the legal entity group and currency if there is one in the group.

        If the curve is not found, optional empty is returned.

        Parameters:
        legalEntityGroup - the legal entity group
        currency - the currency
        Returns:
        the issuer curve for the legal entity group and currency if there is one in the group
      • stream

        public Stream<Curve> stream()
        Returns a stream of all curves in the group.
        Specified by:
        stream in interface CurveGroup
        Returns:
        Returns a stream of all curves in the group
      • repoCurveStream

        public Stream<Curve> repoCurveStream()
        Returns a stream of all repo curves in the group.
        Returns:
        Returns a stream of all repo curves in the group
      • issuerCurveStream

        public Stream<Curve> issuerCurveStream()
        Returns a stream of all issuer curves in the group.
        Returns:
        Returns a stream of all issuer curves in the group
      • meta

        public static LegalEntityCurveGroup.Meta meta()
        The meta-bean for LegalEntityCurveGroup.
        Returns:
        the meta-bean, not null
      • builder

        public static LegalEntityCurveGroup.Builder builder()
        Returns a builder used to create an instance of the bean.
        Returns:
        the builder, not null
      • getName

        public CurveGroupName getName()
        Gets the name of the curve group.
        Specified by:
        getName in interface CurveGroup
        Returns:
        the value of the property, not null
      • getRepoCurves

        public ImmutableMap<Pair<RepoGroup,​Currency>,​Curve> getRepoCurves()
        Gets the repo curves in the curve group, keyed by repo group and currency.
        Returns:
        the value of the property, not null
      • getIssuerCurves

        public ImmutableMap<Pair<LegalEntityGroup,​Currency>,​Curve> getIssuerCurves()
        Gets the issuer curves in the curve group, keyed by legal entity group and currency.
        Returns:
        the value of the property, not null
      • toBuilder

        public LegalEntityCurveGroup.Builder toBuilder()
        Returns a builder that allows this bean to be mutated.
        Returns:
        the mutable builder, not null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object