Package com.opengamma.financial.security.capfloor

Examples of com.opengamma.financial.security.capfloor.CapFloorSecurity


     * @return The Black surface and curve data
     */
    protected BlackSmileShiftCapProviderInterface getBlackSurface(final FunctionExecutionContext executionContext, final FunctionInputs inputs,
        final ComputationTarget target, final FXMatrix fxMatrix) {
      final ConventionSource conventionSource = OpenGammaExecutionContext.getConventionSource(executionContext);
      final CapFloorSecurity security = (CapFloorSecurity) target.getTrade().getSecurity();
      final Currency currency = FinancialSecurityUtils.getCurrency(security);
      final String iborConventionName = getConventionName(currency, IBOR);
      final IborIndexConvention iborIndexConvention = conventionSource.getConvention(IborIndexConvention.class, ExternalId.of(SCHEME_NAME, iborConventionName));
      if (iborIndexConvention == null) {
        throw new OpenGammaRuntimeException("Could not get ibor index convention with the identifier " + ExternalId.of(SCHEME_NAME, iborConventionName));
      }
      final Frequency freqIbor = security.getFrequency();
      final Period tenorIbor = getTenor(freqIbor);
      final int spotLag = iborIndexConvention.getSettlementDays();
      final IborIndex iborIndex = new IborIndex(currency, tenorIbor, spotLag, iborIndexConvention.getDayCount(),
          iborIndexConvention.getBusinessDayConvention(), iborIndexConvention.isIsEOM(), iborIndexConvention.getName());
      final MulticurveProviderInterface data = getMergedProviders(inputs, fxMatrix);
View Full Code Here

TOP

Related Classes of com.opengamma.financial.security.capfloor.CapFloorSecurity

Copyright © 2018 www.massapicom. 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.