public class FXForwardContract extends FXForward
Modifier and Type | Class and Description |
---|---|
class |
FXForwardContract.FXBasisCalibrator |
NULL_SER_STRING, VERSION
Constructor and Description |
---|
FXForwardContract(byte[] ab)
FXForwardContract de-serialization from input byte array
|
FXForwardContract(CurrencyPair ccyPair,
JulianDate dtEffective,
JulianDate dtMaturity)
Create an FXForwardContract from the currency pair, the effective and the maturity dates
|
Modifier and Type | Method and Description |
---|---|
double |
calcDCBasis(ValuationParams valParams,
DiscountCurve dcNum,
DiscountCurve dcDenom,
double dblFXSpot,
double dblMarketFXFwdPrice,
boolean bBasisOnDenom)
Calculate the basis to either the numerator or the denominator discount curve
|
Serializer |
deserialize(byte[] ab)
De-serialize from a byte array.
|
CurrencyPair |
getCcyPair()
Get the Currency Pair
|
JulianDate |
getEffectiveDate()
Get the Effective Date
|
JulianDate |
getMaturityDate()
Get the Maturity Date
|
java.lang.String |
getPrimaryCode()
Get the primary code
|
java.lang.String[] |
getSecondaryCode()
Get the array of secondary code
|
double |
implyFXForward(ValuationParams valParams,
DiscountCurve dcNum,
DiscountCurve dcDenom,
double dblFXSpot,
boolean bFwdAsPIP)
Imply the FX Forward
|
static void |
main(java.lang.String[] astrArgs) |
byte[] |
serialize()
Serialize into a byte array.
|
void |
setPrimaryCode(java.lang.String strCode)
Set the primary code
|
CaseInsensitiveTreeMap<java.lang.Double> |
value(ValuationParams valParams,
DiscountCurve dcNum,
DiscountCurve dcDenom,
double dblFXSpot)
Calculation of the full set of measures of FXForward
|
getCollectionKeyValueDelimiter, getCollectionMultiLevelKeyDelimiter, getCollectionRecordDelimiter, getFieldDelimiter, getObjectTrailer
public FXForwardContract(CurrencyPair ccyPair, JulianDate dtEffective, JulianDate dtMaturity) throws java.lang.Exception
ccyPair
- Currency PairdtEffective
- Effective DatedtMaturity
- Maturity Datejava.lang.Exception
- Thrown if the inputs are invalidpublic FXForwardContract(byte[] ab) throws java.lang.Exception
ab
- Byte Arrayjava.lang.Exception
- Thrown if FXForwardContract cannot be properly de-serializedpublic java.lang.String getPrimaryCode()
FXForward
getPrimaryCode
in class FXForward
public void setPrimaryCode(java.lang.String strCode)
FXForward
setPrimaryCode
in class FXForward
strCode
- Primary Code Stringpublic java.lang.String[] getSecondaryCode()
FXForward
getSecondaryCode
in class FXForward
public JulianDate getEffectiveDate()
FXForward
getEffectiveDate
in class FXForward
public JulianDate getMaturityDate()
FXForward
getMaturityDate
in class FXForward
public CurrencyPair getCcyPair()
FXForward
getCcyPair
in class FXForward
public double implyFXForward(ValuationParams valParams, DiscountCurve dcNum, DiscountCurve dcDenom, double dblFXSpot, boolean bFwdAsPIP) throws java.lang.Exception
FXForward
implyFXForward
in class FXForward
valParams
- Valuation ParametersdcNum
- Discount Curve for the numeratordcDenom
- Discount Curve for the denominatordblFXSpot
- FXSpotbFwdAsPIP
- Calculate FXFwd as a PIPjava.lang.Exception
- Thrown if inputs are invalidpublic double calcDCBasis(ValuationParams valParams, DiscountCurve dcNum, DiscountCurve dcDenom, double dblFXSpot, double dblMarketFXFwdPrice, boolean bBasisOnDenom) throws java.lang.Exception
FXForward
calcDCBasis
in class FXForward
valParams
- ValuationParamsdcNum
- Discount Curve for the numeratordcDenom
- Discount Curve for the denominatordblFXSpot
- FXSpotdblMarketFXFwdPrice
- FXForward Market ValuebBasisOnDenom
- Boolean indicating whether the basis is applied on the denominator (true) or
denominatorjava.lang.Exception
- Thrown if inputs are invalidpublic CaseInsensitiveTreeMap<java.lang.Double> value(ValuationParams valParams, DiscountCurve dcNum, DiscountCurve dcDenom, double dblFXSpot)
FXForward
public byte[] serialize()
Serializer
serialize
in class Serializer
public Serializer deserialize(byte[] ab)
Serializer
deserialize
in class Serializer
public static final void main(java.lang.String[] astrArgs) throws java.lang.Exception
java.lang.Exception