Package com.opengamma.analytics.financial.interestrate

Examples of com.opengamma.analytics.financial.interestrate.InterestRateCurveSensitivity.plus()


    final Map<String, List<DoublesPair>> resultMapFwd = new HashMap<>();
    final List<DoublesPair> listForward = new ArrayList<>();
    listForward.add(new DoublesPair(coupon.getFixingPeriodStartTime(), -coupon.getFixingPeriodStartTime() * dfRatioStart * dfRatioStartBar));
    listForward.add(new DoublesPair(coupon.getFixingPeriodEndTime(), -coupon.getFixingPeriodEndTime() * dfRatioEnd * dfRatioEndBar));
    resultMapFwd.put(coupon.getForwardCurveName(), listForward);
    result = result.plus(new InterestRateCurveSensitivity(resultMapFwd));
    return result;
  }

  /**
   * Computes the par rate, i.e. the fair rate for the remaining period.
View Full Code Here


    InterestRateCurveSensitivity result = new InterestRateCurveSensitivity(resultForeignMap);
    final List<DoublesPair> listDomestic = new ArrayList<>();
    listDomestic.add(new DoublesPair(payTime, rDomesticBar * factor));
    final Map<String, List<DoublesPair>> resultDomesticMap = new HashMap<>();
    resultDomesticMap.put(domesticCurveName, listDomestic);
    result = result.plus(new InterestRateCurveSensitivity(resultDomesticMap));
    return MultipleCurrencyInterestRateCurveSensitivity.of(optionForex.getUnderlyingForex().getCurrency2(), result);
  }

  /**
   * Present value curve sensitivity with a generic instrument as argument.
View Full Code Here

    for (int i = 0; i < coupon.getFixingPeriodAccrualFactors().length; i++) {
      listForward.add(new DoublesPair(coupon.getFixingPeriodStartTimes()[i], -coupon.getFixingPeriodStartTimes()[i] * discountFactorStart[i] * discountFactorStartBar[i]));
      listForward.add(new DoublesPair(coupon.getFixingPeriodEndTimes()[i], -coupon.getFixingPeriodEndTimes()[i] * discountFactorEnd[i] * discountFactorEndBar[i]));
    }
    mapFwd.put(coupon.getForwardCurveName(), listForward);
    result = result.plus(new InterestRateCurveSensitivity(mapFwd));
    return result;
  }

}
View Full Code Here

    final Map<String, List<DoublesPair>> resultMap = new HashMap<>();
    resultMap.put(cmsSpread.getFundingCurveName(), list);
    final InterestRateCurveSensitivity dfCurveSensitivity = new InterestRateCurveSensitivity(resultMap);
    InterestRateCurveSensitivity result;
    result = dfCurveSensitivity.multipliedBy(discountFactorPaymentBar);
    result = result.plus(cmsCoupon1CurveSensitivity.multipliedBy(cmsCoupon1PvBar));
    result = result.plus(cmsCoupon2CurveSensitivity.multipliedBy(cmsCoupon2PvBar));
    result = result.plus(cmsCap1CurveSensitivity.multipliedBy(cmsCap1PvBar));
    result = result.plus(cmsCap2CurveSensitivity.multipliedBy(cmsCap2PvBar));
    //Calibration strike dependency -- START
    result = result.plus(forward1CurveSensitivity.multipliedBy(strike1Bar));
View Full Code Here

    resultMap.put(cmsSpread.getFundingCurveName(), list);
    final InterestRateCurveSensitivity dfCurveSensitivity = new InterestRateCurveSensitivity(resultMap);
    InterestRateCurveSensitivity result;
    result = dfCurveSensitivity.multipliedBy(discountFactorPaymentBar);
    result = result.plus(cmsCoupon1CurveSensitivity.multipliedBy(cmsCoupon1PvBar));
    result = result.plus(cmsCoupon2CurveSensitivity.multipliedBy(cmsCoupon2PvBar));
    result = result.plus(cmsCap1CurveSensitivity.multipliedBy(cmsCap1PvBar));
    result = result.plus(cmsCap2CurveSensitivity.multipliedBy(cmsCap2PvBar));
    //Calibration strike dependency -- START
    result = result.plus(forward1CurveSensitivity.multipliedBy(strike1Bar));
    result = result.plus(forward2CurveSensitivity.multipliedBy(strike2Bar));
View Full Code Here

    final InterestRateCurveSensitivity dfCurveSensitivity = new InterestRateCurveSensitivity(resultMap);
    InterestRateCurveSensitivity result;
    result = dfCurveSensitivity.multipliedBy(discountFactorPaymentBar);
    result = result.plus(cmsCoupon1CurveSensitivity.multipliedBy(cmsCoupon1PvBar));
    result = result.plus(cmsCoupon2CurveSensitivity.multipliedBy(cmsCoupon2PvBar));
    result = result.plus(cmsCap1CurveSensitivity.multipliedBy(cmsCap1PvBar));
    result = result.plus(cmsCap2CurveSensitivity.multipliedBy(cmsCap2PvBar));
    //Calibration strike dependency -- START
    result = result.plus(forward1CurveSensitivity.multipliedBy(strike1Bar));
    result = result.plus(forward2CurveSensitivity.multipliedBy(strike2Bar));
    //Calibration strike dependency -- END
View Full Code Here

    InterestRateCurveSensitivity result;
    result = dfCurveSensitivity.multipliedBy(discountFactorPaymentBar);
    result = result.plus(cmsCoupon1CurveSensitivity.multipliedBy(cmsCoupon1PvBar));
    result = result.plus(cmsCoupon2CurveSensitivity.multipliedBy(cmsCoupon2PvBar));
    result = result.plus(cmsCap1CurveSensitivity.multipliedBy(cmsCap1PvBar));
    result = result.plus(cmsCap2CurveSensitivity.multipliedBy(cmsCap2PvBar));
    //Calibration strike dependency -- START
    result = result.plus(forward1CurveSensitivity.multipliedBy(strike1Bar));
    result = result.plus(forward2CurveSensitivity.multipliedBy(strike2Bar));
    //Calibration strike dependency -- END
    return result;
View Full Code Here

    result = result.plus(cmsCoupon1CurveSensitivity.multipliedBy(cmsCoupon1PvBar));
    result = result.plus(cmsCoupon2CurveSensitivity.multipliedBy(cmsCoupon2PvBar));
    result = result.plus(cmsCap1CurveSensitivity.multipliedBy(cmsCap1PvBar));
    result = result.plus(cmsCap2CurveSensitivity.multipliedBy(cmsCap2PvBar));
    //Calibration strike dependency -- START
    result = result.plus(forward1CurveSensitivity.multipliedBy(strike1Bar));
    result = result.plus(forward2CurveSensitivity.multipliedBy(strike2Bar));
    //Calibration strike dependency -- END
    return result;
  }
View Full Code Here

    result = result.plus(cmsCoupon2CurveSensitivity.multipliedBy(cmsCoupon2PvBar));
    result = result.plus(cmsCap1CurveSensitivity.multipliedBy(cmsCap1PvBar));
    result = result.plus(cmsCap2CurveSensitivity.multipliedBy(cmsCap2PvBar));
    //Calibration strike dependency -- START
    result = result.plus(forward1CurveSensitivity.multipliedBy(strike1Bar));
    result = result.plus(forward2CurveSensitivity.multipliedBy(strike2Bar));
    //Calibration strike dependency -- END
    return result;
  }

  /**
 
View Full Code Here

    InterestRateCurveSensitivity result = new InterestRateCurveSensitivity(resultForeignMap);
    final List<DoublesPair> listDomestic = new ArrayList<>();
    listDomestic.add(new DoublesPair(payTime, rDomesticBar));
    final Map<String, List<DoublesPair>> resultDomesticMap = new HashMap<>();
    resultDomesticMap.put(domesticCurveName, listDomestic);
    result = result.plus(new InterestRateCurveSensitivity(resultDomesticMap));
    return MultipleCurrencyInterestRateCurveSensitivity.of(optionForex.getUnderlyingForex().getCurrency2(), result);
  }

  @Override
  public MultipleCurrencyInterestRateCurveSensitivity presentValueCurveSensitivity(final InstrumentDerivative instrument, final YieldCurveBundle curves) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.