public enum BillYieldConvention extends Enum<BillYieldConvention> implements NamedEnum
| Enum Constant and Description |
|---|
DISCOUNT
Discount.
|
FRANCE_CD
France CD: interest at maturity.
|
INTEREST_AT_MATURITY
Interest at maturity.
|
JAPAN_BILLS
Japanese T-Bills.
|
| Modifier and Type | Method and Description |
|---|---|
static BillYieldConvention |
of(String name)
Obtains an instance from the specified name.
|
abstract double |
priceFromYield(double yield,
double accrualFactor)
Computes the price from a yield and a accrual factor.
|
abstract ValueDerivatives |
priceFromYieldAd(double yield,
double accrualFactor)
Computes the price from a yield and an accrual factor and its derivative wrt the yield.
|
String |
toString()
Returns the formatted name of the type.
|
static BillYieldConvention |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BillYieldConvention[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
abstract double |
yieldFromPrice(double price,
double accrualFactor)
Computes the yield from a price and a accrual factor.
|
abstract ValueDerivatives |
yieldFromPriceAd(double price,
double accrualFactor)
Computes the yield from a price and an accrual factor and its derivative wrt the price.
|
public static final BillYieldConvention DISCOUNT
public static final BillYieldConvention FRANCE_CD
public static final BillYieldConvention INTEREST_AT_MATURITY
public static final BillYieldConvention JAPAN_BILLS
public static BillYieldConvention[] values()
for (BillYieldConvention c : BillYieldConvention.values()) System.out.println(c);
public static BillYieldConvention valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static BillYieldConvention of(String name)
Parsing handles the mixed case form produced by toString() and
the upper and lower case variants of the enum constant name.
name - the name to parseIllegalArgumentException - if the name is not knownpublic String toString()
toString in class Enum<BillYieldConvention>public abstract double priceFromYield(double yield,
double accrualFactor)
yield - the yieldaccrualFactor - the accrual factorpublic abstract double yieldFromPrice(double price,
double accrualFactor)
price - the priceaccrualFactor - the accrual factorpublic abstract ValueDerivatives priceFromYieldAd(double yield, double accrualFactor)
yield - the yieldaccrualFactor - the accrual factorpublic abstract ValueDerivatives yieldFromPriceAd(double price, double accrualFactor)
price - the priceaccrualFactor - the accrual factorCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.