All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.opengamma.strata.pricer.curve.CalibrationMeasure Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (C) 2015 - present by OpenGamma Inc. and the OpenGamma group of companies
 *
 * Please see distribution for license.
 */
package com.opengamma.strata.pricer.curve;

import com.opengamma.strata.market.param.CurrencyParameterSensitivities;
import com.opengamma.strata.pricer.rate.RatesProvider;
import com.opengamma.strata.product.ResolvedTrade;

/**
 * Provides access to the measures needed to perform curve calibration for a single type of trade.
 * 

* The most commonly used measures are par spread and converted present value. *

* See {@link TradeCalibrationMeasure} for constants defining measures for common trade types. * * @param the trade type */ public interface CalibrationMeasure { /** * Gets the trade type of the calibrator. * * @return the trade type */ public abstract Class getTradeType(); /** * Calculates the value, such as par spread. *

* The value must be calculated using the specified rates provider. * * @param trade the trade * @param provider the rates provider * @return the sensitivity * @throws IllegalArgumentException if the trade cannot be valued */ public abstract double value(T trade, RatesProvider provider); /** * Calculates the parameter sensitivities that relate to the value. *

* The sensitivities must be calculated using the specified rates provider. * * @param trade the trade * @param provider the rates provider * @return the sensitivity * @throws IllegalArgumentException if the trade cannot be valued */ public abstract CurrencyParameterSensitivities sensitivities(T trade, RatesProvider provider); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy