Examples of FRASecurity


Examples of com.opengamma.financial.security.fra.FRASecurity

    final ZonedDateTime startDate = ScheduleCalculator.getAdjustedDate(spotDate, startPeriod, businessDayConvention, calendar, eom);
    final ZonedDateTime fixingDate = ScheduleCalculator.getAdjustedDate(startDate, -settlementDays, calendar);
    if (marketValues.getDataPoint(strip.getSecurity()) == null) {
      throw new OpenGammaRuntimeException("Could not get market data for " + strip);
    }
    return new FRASecurity(ccy, spec.getRegion(), startDate, endDate, marketValues.getDataPoint(strip.getSecurity()), 1.0d, underlyingIdentifier, fixingDate);
  }
View Full Code Here

Examples of com.opengamma.financial.security.fra.FRASecurity

    if ((underlyingSeries == null) || underlyingSeries.getTimeSeries().isEmpty()) {
      return null;
    }
    final double rate = underlyingSeries.getTimeSeries().getEarliestValue() * getRandom(0.5, 1.5);
    final double amount = 10000 * (getRandom(1500) + 200);
    final FRASecurity security = new FRASecurity(currency, region, start, maturity, rate, amount, underlyingIdentifier, fixingDate);
    security.setName(createName(currency, amount, rate, maturity));
    return security;
  }
View Full Code Here

Examples of com.opengamma.financial.security.fra.FRASecurity

    assertEquals(ExternalId.of(ExposureFunction.SECURITY_IDENTIFIER, "EQUITY_X"), ids.get(0));
  }

  @Test
  public void testFRASecurity() {
    final FRASecurity fra = ExposureFunctionTestHelper.getFRASecurity();
    final List<ExternalId> ids = fra.accept(EXPOSURE_FUNCTION);
    assertNull(ids);
  }
View Full Code Here

Examples of com.opengamma.financial.security.fra.FRASecurity

    bundle = ExternalIdBundle.of(dummyId);
    ZonedDateTime startDate = DateUtils.getUTCDate(2011, 11, 1);
    ZonedDateTime endDate = DateUtils.getUTCDate(2012, 2, 1);
    ExternalId underlyingIdentifier = ExternalSchemes.bloombergTickerSecurityId("US0003M Index");
    ZonedDateTime fixingDate = startDate.minusDays(2);
    FRASecurity fra = new FRASecurity(Currency.USD, ExternalSchemes.financialRegionId("US"), startDate, endDate, 0.05, 1, underlyingIdentifier, fixingDate);
    fra.setExternalIdBundle(bundle);
    strip = new FixedIncomeStripWithSecurity(new FixedIncomeStrip(StripInstrumentType.FRA_3M, Tenor.FIVE_MONTHS, "DEFAULT"), Tenor.FIVE_MONTHS, endDate, dummyId, fra);
    assertEquals(strip, cycleObject(FixedIncomeStripWithSecurity.class, strip));
  }
View Full Code Here

Examples of com.opengamma.financial.security.fra.FRASecurity

  }

  protected Security createFRASecurity(final String name, final Currency currency, final double rate, final ExternalId underlying) {
    final ZonedDateTime startDate = zdt(2010, 10, 10, 12, 0, 0, 0, ZoneOffset.UTC);
    final ZonedDateTime settlementDate = startDate.plusDays(2);
    final FRASecurity security = new FRASecurity(currency, ExternalId.of("Region", "US"), startDate, zdt(2012, 10, 10, 12, 0, 0, 0,
        ZoneOffset.UTC), rate, 0d, underlying, settlementDate);
    security.setExternalIdBundle(createExternalIdBundle());
    security.setName(name);
    security.setUniqueId(createUniqueId("Security"));
    return security;
  }
View Full Code Here

Examples of com.opengamma.financial.security.fra.FRASecurity

    assertNull(ids);
  }

  @Test
  public void testFRASecurity() {
    final FRASecurity fra = ExposureFunctionTestHelper.getFRASecurity();
    final List<ExternalId> ids = fra.accept(EXPOSURE_FUNCTION);
    assertEquals(1, ids.size());
    assertEquals(ExternalId.of(SCHEME, "US"), ids.get(0));
  }
View Full Code Here

Examples of com.opengamma.financial.security.fra.FRASecurity

    assertEquals(ExternalId.of(ExposureFunction.SECURITY_IDENTIFIER, "EQUITY_X"), ids.get(0));
  }

  @Test
  public void testFRASecurity() {
    final FRASecurity fra = ExposureFunctionTestHelper.getFRASecurity();
    final List<ExternalId> ids = fra.accept(EXPOSURE_FUNCTION);
    assertNull(ids);
  }
View Full Code Here

Examples of com.opengamma.financial.security.fra.FRASecurity

    assertNull(ids);
  }

  @Test
  public void testFRASecurity() {
    final FRASecurity fra = ExposureFunctionTestHelper.getFRASecurity();
    final List<ExternalId> ids = fra.accept(EXPOSURE_FUNCTION);
    assertNull(ids);
  }
View Full Code Here

Examples of com.opengamma.financial.security.fra.FRASecurity

    assertEquals(ExternalId.of(future.getUniqueId().getScheme(), future.getUniqueId().getValue()), ids.get(0));
  }

  @Test
  public void testFRASecurity() {
    final FRASecurity fra = ExposureFunctionTestHelper.getFRASecurity();
    final List<ExternalId> ids = fra.accept(EXPOSURE_FUNCTION);
    assertEquals(1, ids.size());
    assertEquals(ExternalId.of(fra.getUniqueId().getScheme(), fra.getUniqueId().getValue()), ids.get(0));
  }
View Full Code Here

Examples of com.opengamma.financial.security.fra.FRASecurity

    assertNull(ids);
  }

  @Test
  public void testFRASecurity() {
    final FRASecurity fra = ExposureFunctionTestHelper.getFRASecurity();
    final List<ExternalId> ids = fra.accept(EXPOSURE_FUNCTION);
    assertEquals(1, ids.size());
    assertEquals(ExternalId.of(SCHEME, "FRA_US"), ids.get(0));
  }
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.