Examples of SwapFixedLegConvention


Examples of com.opengamma.financial.convention.SwapFixedLegConvention

    }
    return tenor;
  }

  private IndexSwap getSwapIndex(final SwapConvention swapConvention, final IborIndex iborIndex) {
    SwapFixedLegConvention fixedConvention;
    final Convention payLegConvention = _conventionSource.getConvention(swapConvention.getPayLegConvention());
    final Convention receiveLegConvention = _conventionSource.getConvention(swapConvention.getReceiveLegConvention());
    if (payLegConvention instanceof SwapFixedLegConvention) {
      fixedConvention = (SwapFixedLegConvention) payLegConvention;
    } else if (receiveLegConvention instanceof SwapFixedLegConvention) {
      fixedConvention = (SwapFixedLegConvention) receiveLegConvention;
    } else {
      throw new OpenGammaRuntimeException("Could not get fixed convention");
    }
    final Period fixedLegPaymentPeriod = fixedConvention.getPaymentTenor().getPeriod();
    final ExternalId regionId = fixedConvention.getRegionCalendar();
    final Calendar calendar = CalendarUtils.getCalendar(_regionSource, _holidaySource, regionId);
    return new IndexSwap(fixedLegPaymentPeriod, fixedConvention.getDayCount(), iborIndex, fixedLegPaymentPeriod, calendar);
  }
View Full Code Here

Examples of com.opengamma.financial.convention.SwapFixedLegConvention

    final String fixedSwapLegConventionName = getConventionName(ZAR, IRS_FIXED_LEG);
    final String vanillaIborLegConventionName = getConventionName(ZAR, IRS_IBOR_LEG);
    final String tenorString = "3m";
    final String libor3mConventionName = getConventionName(ZAR, tenorString, JIBOR);
    final ExternalId libor3mConventionId = InMemoryConventionBundleMaster.simpleNameSecurityId(libor3mConventionName);
    final Convention fixedLegConvention = new SwapFixedLegConvention(fixedSwapLegConventionName, getIds(ZAR, IRS_FIXED_LEG),
        Tenor.THREE_MONTHS, ACT_365, FOLLOWING, ZAR, ZA, 2, false, StubType.NONE, false, 2);
    final Convention vanillaIborLegConvention = new VanillaIborLegConvention(vanillaIborLegConventionName, getIds(ZAR, tenorString, IRS_IBOR_LEG),
        libor3mConventionId, true, Interpolator1DFactory.LINEAR, Tenor.THREE_MONTHS, 2, false, StubType.NONE, false, 2);
    conventionMaster.add(fixedLegConvention);
    conventionMaster.add(vanillaIborLegConvention);
View Full Code Here

Examples of com.opengamma.financial.convention.SwapFixedLegConvention

    final DepositConvention depositONConvention = new DepositConvention(depositONConventionName, getIds(Currency.EUR, DEPOSIT_ON), ACT_360, FOLLOWING, 0, false, Currency.EUR, EU);
    final String depositConventionName = getConventionName(Currency.EUR, DEPOSIT);
    final DepositConvention depositConvention = new DepositConvention(depositConventionName, getIds(Currency.EUR, DEPOSIT), ACT_360, FOLLOWING, 2, false, Currency.EUR, EU);
    // Fixed legs
    final String oisFixedLegConventionName = getConventionName(Currency.EUR, TENOR_STR_1Y, PAY_LAG + FIXED_LEG);
    final Convention oisFixedLegConvention = new SwapFixedLegConvention(oisFixedLegConventionName, getIds(Currency.EUR, TENOR_STR_1Y, PAY_LAG + FIXED_LEG),
        Tenor.ONE_YEAR, ACT_360, MODIFIED_FOLLOWING, Currency.EUR, EU, 2, true, StubType.SHORT_START, false, 2);
    final String irsFixedLegConventionName = getConventionName(Currency.EUR, TENOR_STR_1Y, FIXED_LEG);
    final Convention irsFixedLegConvention = new SwapFixedLegConvention(irsFixedLegConventionName, getIds(Currency.EUR, TENOR_STR_1Y, FIXED_LEG),
        Tenor.ONE_YEAR, THIRTY_U_360, MODIFIED_FOLLOWING, Currency.EUR, EU, 2, true, StubType.SHORT_START, false, 0);
    // OIS legs
    final String oisFloatLegConventionName = getConventionName(Currency.EUR, OIS_ON_LEG);
    final Convention oisFloatLegConvention = new OISLegConvention(oisFloatLegConventionName, getIds(Currency.EUR, OIS_ON_LEG), onIndexId,
        Tenor.ONE_YEAR, MODIFIED_FOLLOWING, 2, true, StubType.SHORT_START, false, 2);
View Full Code Here

Examples of com.opengamma.financial.convention.SwapFixedLegConvention

    final String depositConventionName = getConventionName(Currency.JPY, DEPOSIT);
    final DepositConvention depositConvention = new DepositConvention(depositConventionName, getIds(Currency.JPY, DEPOSIT), ACT_365, FOLLOWING, 2, false, Currency.JPY, JP);
    // OIS legs
    final String oisFixedLegConventionName = getConventionName(Currency.JPY, OIS_FIXED_LEG);
    final String oisFloatLegConventionName = getConventionName(Currency.JPY, OIS_ON_LEG);
    final Convention oisFixedLegConvention = new SwapFixedLegConvention(oisFixedLegConventionName, getIds(Currency.JPY, OIS_FIXED_LEG),
        Tenor.ONE_YEAR, ACT_365, MODIFIED_FOLLOWING, Currency.JPY, JP, 2, true, StubType.SHORT_START, false, 2);
    final Convention oisFloatLegConvention = new OISLegConvention(oisFloatLegConventionName, getIds(Currency.JPY, OIS_ON_LEG), onIndexId,
        Tenor.ONE_YEAR, MODIFIED_FOLLOWING, 2, true, StubType.NONE, false, 2);
    // Ibor swap legs
    final String irsFixedLegConventionName = getConventionName(Currency.JPY, IRS_FIXED_LEG);
    final String irsIborLegConventionName = getConventionName(Currency.JPY, tenorString, IRS_IBOR_LEG);
    final Convention irsFixedLegConvention = new SwapFixedLegConvention(irsFixedLegConventionName, getIds(Currency.JPY, IRS_FIXED_LEG),
        Tenor.SIX_MONTHS, ACT_365, MODIFIED_FOLLOWING, Currency.JPY, JP, 2, true, StubType.SHORT_START, false, 2);
    final Convention irsIborLegConvention = new VanillaIborLegConvention(irsIborLegConventionName, getIds(Currency.JPY, tenorString, IRS_IBOR_LEG),
        liborConventionId, true, Interpolator1DFactory.LINEAR, Tenor.SIX_MONTHS, 2, true, StubType.NONE, false, 2);
    // X-Ccy OIS
    final Convention oisXCcyUSDLegConvention = new OISLegConvention(OIS_USD_JPY_ON_LEG, getIds(OIS_USD_JPY_ON_LEG), onIndexId,
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.