/**
* Copyright (C) 2012 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.financial.analytics.model.volatility.local.deprecated;
import static com.opengamma.engine.value.ValuePropertyNames.CURVE;
import static com.opengamma.engine.value.ValuePropertyNames.CURVE_CALCULATION_METHOD;
import static com.opengamma.engine.value.ValuePropertyNames.SURFACE;
import static com.opengamma.financial.analytics.model.volatility.local.deprecated.LocalVolatilityPDEValuePropertyNames.PROPERTY_H;
import static com.opengamma.financial.analytics.model.volatility.local.deprecated.LocalVolatilityPDEValuePropertyNames.PROPERTY_SURFACE_TYPE;
import static com.opengamma.financial.analytics.model.volatility.local.deprecated.LocalVolatilityPDEValuePropertyNames.PROPERTY_X_AXIS;
import static com.opengamma.financial.analytics.model.volatility.local.deprecated.LocalVolatilityPDEValuePropertyNames.PROPERTY_Y_AXIS;
import static com.opengamma.financial.analytics.model.volatility.local.deprecated.LocalVolatilityPDEValuePropertyNames.PROPERTY_Y_AXIS_TYPE;
import com.opengamma.engine.target.ComputationTargetType;
import com.opengamma.engine.value.ValueProperties;
import com.opengamma.engine.value.ValuePropertyNames;
import com.opengamma.financial.analytics.model.InstrumentTypeProperties;
/**
*
* @deprecated Deprecated
*/
@Deprecated
public class ForexLocalVolatilitySurfaceFunction extends LocalVolatilitySurfaceFunction {
@Override
public ComputationTargetType getTargetType() {
return ComputationTargetType.UNORDERED_CURRENCY_PAIR;
}
@Override
protected ValueProperties getResultProperties() {
return createValueProperties()
.with(InstrumentTypeProperties.PROPERTY_SURFACE_INSTRUMENT_TYPE, InstrumentTypeProperties.FOREX)
.withAny(SURFACE)
.withAny(PROPERTY_SURFACE_TYPE)
.withAny(PROPERTY_X_AXIS)
.withAny(PROPERTY_Y_AXIS)
.withAny(PROPERTY_Y_AXIS_TYPE)
.withAny(CURVE_CALCULATION_METHOD)
.withAny(CURVE)
.withAny(PROPERTY_H).get();
}
@Override
protected ValueProperties getResultProperties(final String definitionName, final String surfaceType, final String xAxis, final String yAxis, final String yAxisType,
final String forwardCurveCalculationMethod, final String forwardCurveName) {
return createValueProperties()
.with(InstrumentTypeProperties.PROPERTY_SURFACE_INSTRUMENT_TYPE, InstrumentTypeProperties.FOREX)
.with(SURFACE, definitionName)
.with(PROPERTY_SURFACE_TYPE, surfaceType)
.with(PROPERTY_X_AXIS, xAxis)
.with(PROPERTY_Y_AXIS, yAxis)
.with(PROPERTY_Y_AXIS_TYPE, yAxisType)
.with(CURVE_CALCULATION_METHOD, forwardCurveCalculationMethod)
.with(CURVE, forwardCurveName)
.withAny(PROPERTY_H).get();
}
@Override
protected ValueProperties getResultProperties(final String surfaceName, final String surfaceType, final String xAxis, final String yAxis, final String yAxisType,
final String forwardCurveCalculationMethod, final String forwardCurveName, final String h) {
return createValueProperties()
.with(InstrumentTypeProperties.PROPERTY_SURFACE_INSTRUMENT_TYPE, InstrumentTypeProperties.FOREX)
.with(SURFACE, surfaceName)
.with(PROPERTY_SURFACE_TYPE, surfaceType)
.with(PROPERTY_X_AXIS, xAxis)
.with(PROPERTY_Y_AXIS, yAxis)
.with(PROPERTY_Y_AXIS_TYPE, yAxisType)
.with(CURVE_CALCULATION_METHOD, forwardCurveCalculationMethod)
.with(CURVE, forwardCurveName)
.with(PROPERTY_H, h).get();
}
@Override
protected ValueProperties getSurfaceProperties(final String surfaceName, final String surfaceType, final String xAxis, final String yAxis, final String yAxisType,
final String forwardCurveCalculationMethod, final String forwardCurveName) {
return ValueProperties.builder()
.with(InstrumentTypeProperties.PROPERTY_SURFACE_INSTRUMENT_TYPE, InstrumentTypeProperties.FOREX)
.with(ValuePropertyNames.SURFACE, surfaceName)
.with(PROPERTY_SURFACE_TYPE, surfaceType)
.with(PROPERTY_X_AXIS, xAxis)
.with(PROPERTY_Y_AXIS, yAxis)
.with(PROPERTY_Y_AXIS_TYPE, yAxisType)
.with(CURVE, forwardCurveName)
.with(CURVE_CALCULATION_METHOD, forwardCurveCalculationMethod).get();
}
}