public int compareKey(PointSensitivity other) { if (other is InflationRateSensitivity) { InflationRateSensitivity otherInflation = (InflationRateSensitivity)other; return(ComparisonChain.start().compare(Index.ToString(), otherInflation.Index.ToString()).compare(currency, otherInflation.currency).compare(observation.FixingMonth, otherInflation.observation.FixingMonth).result()); } return(this.GetType().Name.CompareTo(other.GetType().Name)); }
public int compareKey(PointSensitivity other) { if (other is DummyPointSensitivity) { DummyPointSensitivity otherZero = (DummyPointSensitivity)other; return(ComparisonChain.start().compare(curveCurrency, otherZero.curveCurrency).compare(currency, otherZero.currency).compare(date, otherZero.date).result()); } return(this.GetType().Name.CompareTo(other.GetType().Name)); }
public int compareKey(PointSensitivity other) { if (other is BondFutureOptionSensitivity) { BondFutureOptionSensitivity otherOption = (BondFutureOptionSensitivity)other; return(ComparisonChain.start().compare(volatilitiesName.ToString(), otherOption.volatilitiesName.ToString()).compare(expiry, otherOption.expiry).compare(futureExpiryDate, otherOption.futureExpiryDate).compare(strikePrice, otherOption.strikePrice).compare(futurePrice, otherOption.futurePrice).compare(currency, otherOption.currency).result()); } return(this.GetType().Name.CompareTo(other.GetType().Name)); }
public int compareKey(PointSensitivity other) { if (other is SwaptionSensitivity) { SwaptionSensitivity otherSwpt = (SwaptionSensitivity)other; return(ComparisonChain.start().compare(volatilitiesName, otherSwpt.volatilitiesName).compare(currency, otherSwpt.currency).compare(expiry, otherSwpt.expiry).compare(tenor, otherSwpt.tenor).compare(strike, otherSwpt.strike).compare(forward, otherSwpt.forward).result()); } return(this.GetType().Name.CompareTo(other.GetType().Name)); }
public int compareKey(PointSensitivity other) { if (other is ZeroRateSensitivity) { ZeroRateSensitivity otherZero = (ZeroRateSensitivity)other; return(ComparisonChain.start().compare(curveCurrency, otherZero.curveCurrency).compare(currency, otherZero.currency).compare(yearFraction, otherZero.yearFraction).result()); } return(this.GetType().Name.CompareTo(other.GetType().Name)); }
public int compareKey(PointSensitivity other) { if (other is FxForwardSensitivity) { FxForwardSensitivity otherFx = (FxForwardSensitivity)other; return(ComparisonChain.start().compare(currencyPair.ToString(), otherFx.currencyPair.ToString()).compare(currency, otherFx.currency).compare(referenceCurrency, otherFx.referenceCurrency).compare(referenceDate, otherFx.referenceDate).result()); } return(this.GetType().Name.CompareTo(other.GetType().Name)); }
public int compareKey(PointSensitivity other) { if (other is FxOptionSensitivity) { FxOptionSensitivity otherOption = (FxOptionSensitivity)other; return(ComparisonChain.start().compare(volatilitiesName, otherOption.volatilitiesName).compare(currencyPair.ToString(), otherOption.currencyPair.ToString()).compare(expiry, otherOption.expiry).compare(strike, otherOption.strike).compare(forward, otherOption.forward).compare(currency, otherOption.currency).result()); } return(this.GetType().Name.CompareTo(other.GetType().Name)); }
public int compareKey(PointSensitivity other) { if (other is CreditCurveZeroRateSensitivity) { CreditCurveZeroRateSensitivity otherZero = (CreditCurveZeroRateSensitivity)other; return(ComparisonChain.start().compare(zeroRateSensitivity.YearFraction, otherZero.zeroRateSensitivity.YearFraction).compare(zeroRateSensitivity.Currency, otherZero.zeroRateSensitivity.Currency).compare(zeroRateSensitivity.CurveCurrency, otherZero.zeroRateSensitivity.CurveCurrency).compare(legalEntityId, otherZero.legalEntityId).result()); } return(this.GetType().Name.CompareTo(other.GetType().Name)); }
public int compareKey(PointSensitivity other) { if (other is FxIndexSensitivity) { FxIndexSensitivity otherFx = (FxIndexSensitivity)other; return(ComparisonChain.start().compare(Index.ToString(), otherFx.Index.ToString()).compare(currency, otherFx.currency).compare(referenceCurrency, otherFx.referenceCurrency).compare(observation.FixingDate, otherFx.observation.FixingDate).result()); } return(this.GetType().Name.CompareTo(other.GetType().Name)); }
public int compareKey(PointSensitivity other) { if (other is OvernightRateSensitivity) { OvernightRateSensitivity otherOn = (OvernightRateSensitivity)other; return(ComparisonChain.start().compare(Index.ToString(), otherOn.Index.ToString()).compare(currency, otherOn.currency).compare(observation.FixingDate, otherOn.observation.FixingDate).compare(endDate, otherOn.endDate).result()); } return(this.GetType().Name.CompareTo(other.GetType().Name)); }
public int compareKey(PointSensitivity other) { if (other is IborCapletFloorletSabrSensitivity) { IborCapletFloorletSabrSensitivity otherSwpt = (IborCapletFloorletSabrSensitivity)other; return(ComparisonChain.start().compare(volatilitiesName, otherSwpt.volatilitiesName).compare(currency, otherSwpt.currency).compare(expiry, otherSwpt.expiry).compare(sensitivityType, otherSwpt.sensitivityType).result()); } return(this.GetType().Name.CompareTo(other.GetType().Name)); }