Record Class MultiCurrencyExposureSimulator.ForeignSwap
java.lang.Object
java.lang.Record
com.quantfinlib.credit.MultiCurrencyExposureSimulator.ForeignSwap
- Record Components:
pair- index intoMultiCurrencyExposureSimulator.Market.foreign()terms- swap terms (notional in that foreign currency)projection- foreign projection curve, or null for the foreign discount curve
- Enclosing class:
MultiCurrencyExposureSimulator
public static record MultiCurrencyExposureSimulator.ForeignSwap(int pair, MultiCurrencyExposureSimulator.SwapTerms terms, MultiCurrencyExposureSimulator.Curve projection)
extends Record
A swap in a foreign currency (added in 2.3). Its legs are valued with
that currency's Hull-White curve and state, in foreign units, and
converted to domestic at the simulated spot of the pair, so the
domestic-measure value
S_c(t) * V_c(t) is a martingale after
discounting with the domestic bank account (tested). The projection
basis, if any, is deterministic against the foreign discount curve.-
Constructor Summary
ConstructorsConstructorDescriptionForeignSwap(int pair, MultiCurrencyExposureSimulator.SwapTerms terms, MultiCurrencyExposureSimulator.Curve projection) Validates. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intpair()Returns the value of thepairrecord component.Returns the value of theprojectionrecord component.terms()Returns the value of thetermsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ForeignSwap
public ForeignSwap(int pair, MultiCurrencyExposureSimulator.SwapTerms terms, MultiCurrencyExposureSimulator.Curve projection) Validates.
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
pair
-
terms
-
projection
Returns the value of theprojectionrecord component.- Returns:
- the value of the
projectionrecord component
-