Package com.opengamma.analytics.financial.horizon

Source Code of com.opengamma.analytics.financial.horizon.ForwardSlideYieldCurveBundleRolldownFunction

/**
* Copyright (C) 2012 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.analytics.financial.horizon;

import com.opengamma.analytics.financial.interestrate.YieldCurveBundle;

/**
* Produces a yield curve bundle where each curve has a forward slide.
* @deprecated {@link YieldCurveBundle} is deprecated
*/
@Deprecated
public final class ForwardSlideYieldCurveBundleRolldownFunction implements RolldownFunction<YieldCurveBundle> {
  private static final ForwardSlideYieldCurveRolldownFunction CURVE_ROLLDOWN = ForwardSlideYieldCurveRolldownFunction.getInstance();
  private static final ForwardSlideYieldCurveBundleRolldownFunction INSTANCE = new ForwardSlideYieldCurveBundleRolldownFunction();

  public static ForwardSlideYieldCurveBundleRolldownFunction getInstance() {
    return INSTANCE;
  }

  private ForwardSlideYieldCurveBundleRolldownFunction() {
  }

  @Override
  public YieldCurveBundle rollDown(final YieldCurveBundle data, final double time) {
    final YieldCurveBundle shiftedCurves = new YieldCurveBundle(data.getFxRates(), data.getCurrencyMap());
    for (final String name : data.getAllNames()) {
      shiftedCurves.setCurve(name, CURVE_ROLLDOWN.rollDown(data.getCurve(name), time));
    }
    return shiftedCurves;
  }

}
TOP

Related Classes of com.opengamma.analytics.financial.horizon.ForwardSlideYieldCurveBundleRolldownFunction

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.