Examples of InterestRateInstrumentType


Examples of com.opengamma.financial.analytics.fixedincome.InterestRateInstrumentType

    ArgumentChecker.notNull(security, "swap security");
    final Currency currency = FinancialSecurityUtils.getCurrency(security);
    if (Currency.BRL.equals(currency)) {
      return getBRLSwapDefinition(security, SwapSecurityUtils.payFixed(security));
    }
    final InterestRateInstrumentType swapType = SwapSecurityUtils.getSwapType(security);
    switch (swapType) {
      case SWAP_FIXED_IBOR:
        return getFixedIborSwapDefinition(security, SwapSecurityUtils.payFixed(security), false);
      case SWAP_FIXED_IBOR_WITH_SPREAD:
        return getFixedIborSwapDefinition(security, SwapSecurityUtils.payFixed(security), true);
View Full Code Here

Examples of com.opengamma.financial.analytics.fixedincome.InterestRateInstrumentType

    final Notional receiveNotional = security.getReceiveLeg().getNotional();
    if (payNotional instanceof InterestRateNotional && receiveNotional instanceof InterestRateNotional) {
      final Currency ccy = ((InterestRateNotional) payNotional).getCurrency();
      builder.add(getYieldCurveNodeSensitivities(getFundingCurve(), ccy));
      builder.add(getYieldCurveNodeSensitivities(getForwardCurve(ccy), ccy));
      final InterestRateInstrumentType type = SwapSecurityUtils.getSwapType(security);
      if (type == InterestRateInstrumentType.SWAP_CMS_CMS ||
        type == InterestRateInstrumentType.SWAP_FIXED_CMS ||
        type == InterestRateInstrumentType.SWAP_IBOR_CMS) {
        builder.add(getVegaQuoteCubeMatrix(ValueProperties.with(ValuePropertyNames.CUBE, "BLOOMBERG")));
      } else if (type == InterestRateInstrumentType.SWAP_FIXED_IBOR ||
View Full Code Here

Examples of com.opengamma.financial.analytics.fixedincome.InterestRateInstrumentType

    if (FXUtils.isFXSecurity(security)) {
      return false;
    }
    if (security instanceof SwapSecurity) {
      try {
        final InterestRateInstrumentType type = InterestRateInstrumentType.getInstrumentTypeFromSecurity((SwapSecurity) security);
        if (type != InterestRateInstrumentType.SWAP_FIXED_IBOR && type != InterestRateInstrumentType.SWAP_FIXED_IBOR_WITH_SPREAD && type != InterestRateInstrumentType.SWAP_IBOR_IBOR) {
          return false;
        }
      } catch (final OpenGammaRuntimeException ogre) {
        return false;
View Full Code Here

Examples of com.opengamma.financial.analytics.fixedincome.InterestRateInstrumentType

    _now = now;
  }

  @Override
  public ValueRequirement visitSwapSecurity(final SwapSecurity security) {
    final InterestRateInstrumentType type = InterestRateInstrumentType.getInstrumentTypeFromSecurity(security);
    if (type != InterestRateInstrumentType.SWAP_FIXED_IBOR &&
        type != InterestRateInstrumentType.SWAP_FIXED_OIS &&
        type != InterestRateInstrumentType.SWAP_FIXED_IBOR_WITH_SPREAD) {
      throw new OpenGammaRuntimeException("Can only get series for fixed / float swaps; have " + type);
    }
View Full Code Here

Examples of com.opengamma.financial.analytics.fixedincome.InterestRateInstrumentType

    if (!(security instanceof FinancialSecurity)) {
      return false;
    }
    if (security instanceof SwapSecurity) {
      try {
        final InterestRateInstrumentType type = InterestRateInstrumentType.getInstrumentTypeFromSecurity((SwapSecurity) security);
        return type == InterestRateInstrumentType.SWAP_FIXED_IBOR || type == InterestRateInstrumentType.SWAP_FIXED_IBOR_WITH_SPREAD || type == InterestRateInstrumentType.SWAP_IBOR_IBOR;
      } catch (final OpenGammaRuntimeException ogre) {
        return false;
      }
    }
View Full Code Here

Examples of com.opengamma.financial.analytics.fixedincome.InterestRateInstrumentType

    if (!(security instanceof FinancialSecurity)) {
      return false;
    }
    if (security instanceof SwapSecurity) {
      try {
        final InterestRateInstrumentType type = InterestRateInstrumentType.getInstrumentTypeFromSecurity((SwapSecurity) security);
        return type == InterestRateInstrumentType.SWAP_FIXED_IBOR ||
            type == InterestRateInstrumentType.SWAP_FIXED_IBOR_WITH_SPREAD ||
            type == InterestRateInstrumentType.SWAP_IBOR_IBOR ||
            type == InterestRateInstrumentType.SWAP_FIXED_OIS;
      } catch (final OpenGammaRuntimeException ogre) {
View Full Code Here

Examples of com.opengamma.financial.analytics.fixedincome.InterestRateInstrumentType

  @Override
  public boolean canApplyTo(final FunctionCompilationContext context, final ComputationTarget target) {
    final FinancialSecurity security = (FinancialSecurity) target.getSecurity();
    try {
      final InterestRateInstrumentType type = InterestRateInstrumentType.getInstrumentTypeFromSecurity(security);
      if (type == InterestRateInstrumentType.SWAP_CROSS_CURRENCY) {
        return true;
      }
    } catch (final OpenGammaRuntimeException e) {
      return false;
View Full Code Here

Examples of com.opengamma.financial.analytics.fixedincome.InterestRateInstrumentType

    if (target.getSecurity() instanceof InterestRateFutureSecurity) {
      return false;
    }
    if (security instanceof SwapSecurity) {
      try {
        final InterestRateInstrumentType type = InterestRateInstrumentType.getInstrumentTypeFromSecurity(security);
        return type == InterestRateInstrumentType.SWAP_FIXED_IBOR || type == InterestRateInstrumentType.SWAP_FIXED_IBOR_WITH_SPREAD
            || type == InterestRateInstrumentType.SWAP_IBOR_IBOR || type == InterestRateInstrumentType.SWAP_FIXED_OIS;
      } catch (final OpenGammaRuntimeException ogre) {
        return false;
      }
View Full Code Here

Examples of com.opengamma.financial.analytics.fixedincome.InterestRateInstrumentType

  static InstrumentDerivative getDerivative(final FinancialSecurity security, final ZonedDateTime now, final HistoricalTimeSeriesBundle timeSeries, final String[] curveNames,
      final InstrumentDefinition<?> definition, final FixedIncomeConverterDataProvider definitionConverter) {
    final InstrumentDerivative derivative;
    if (security instanceof SwapSecurity) {
      final SwapSecurity swapSecurity = (SwapSecurity) security;
      final InterestRateInstrumentType type = SwapSecurityUtils.getSwapType(swapSecurity);
      if (type == InterestRateInstrumentType.SWAP_FIXED_IBOR || type == InterestRateInstrumentType.SWAP_FIXED_IBOR_WITH_SPREAD || type == InterestRateInstrumentType.SWAP_FIXED_OIS) {
        final Frequency resetFrequency;
        if (swapSecurity.getPayLeg() instanceof FloatingInterestRateLeg) {
          resetFrequency = ((FloatingInterestRateLeg) swapSecurity.getPayLeg()).getFrequency();
        } else {
View Full Code Here

Examples of com.opengamma.financial.analytics.fixedincome.InterestRateInstrumentType

    if (!_currencyAndCurveConfigNames.containsKey(currencyName)) {
      return false;
    }
    if (security instanceof SwapSecurity) {
      try {
        final InterestRateInstrumentType type = InterestRateInstrumentType.getInstrumentTypeFromSecurity((SwapSecurity) security);
        if (type != InterestRateInstrumentType.SWAP_FIXED_IBOR && type != InterestRateInstrumentType.SWAP_FIXED_IBOR_WITH_SPREAD && type != InterestRateInstrumentType.SWAP_IBOR_IBOR
            && type != InterestRateInstrumentType.SWAP_FIXED_OIS) {
          return false;
        }
      } catch (final OpenGammaRuntimeException ogre) {
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.