Examples of FRASecurity


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

    ZonedDateTime endDate = zonedDateTimeBeanToDateTimeWithZone(bean.getEndDate());
    double rate = bean.getRate();
    double amount = bean.getAmount();
    ExternalId underlyingId = externalIdBeanToExternalId(bean.getUnderlying());
    ZonedDateTime fixingDate = zonedDateTimeBeanToDateTimeWithZone(bean.getFixingDate());
    return new FRASecurity(currency, regionId, startDate, endDate, rate, amount, underlyingId, fixingDate);
  }
View Full Code Here

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

                                                                            regionCalendar,
                                                                            eom);
    final ZonedDateTime fixingDate = ScheduleCalculator.getAdjustedDate(accrualStartDate,
                                                                        -iborIndex.getSpotLag(),
                                                                        fixingCalendar);
    return new FRASecurity(currency,
                           indexConvention.getRegionCalendar(),
                           accrualStartDate,
                           accrualEndDate,
                           _rate,
                           1,
View Full Code Here

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

    assertEquals(ExternalId.of(SCHEME, "FUTURE"), 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(SCHEME, "FRA"), ids.get(0));
  }
View Full Code Here

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

    assertEquals(ExternalId.of(SCHEME, "FUTURE_USD"), 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(SCHEME, "FRA_USD"), 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(fra.getUnderlyingId(), ids.get(0));
  }
View Full Code Here

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

    assertEquals(ExternalId.of(SCHEME, "USD"), 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(SCHEME, "USD"), ids.get(0));
  }
View Full Code Here

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

    security.setUniqueId(UniqueId.of(UniqueId.EXTERNAL_SCHEME.getName(), "874"));
    return security;
  }

  public static FRASecurity getFRASecurity() {
    final FRASecurity security = new FRASecurity(USD, US, DateUtils.getUTCDate(2013, 3, 1), DateUtils.getUTCDate(2013, 6, 1), 0.02, 1000,
        ExternalSchemes.bloombergTickerSecurityId("US0003 Index"), DateUtils.getUTCDate(2013, 6, 1));
    security.setUniqueId(UniqueId.of(UniqueId.EXTERNAL_SCHEME.getName(), "1234"));
    return security;
  }
View Full Code Here

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

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

    final Collection<FixedIncomeStripWithSecurity> strips = new ArrayList<FixedIncomeStripWithSecurity>();
    strips.add(cashStrip);
    strips.add(futureStrip);
View Full Code Here

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

    double absoluteNotional = payFixed ? specifiedNotional : -specifiedNotional;
   
    ExternalId underlyingIdentifier = fraTrade.getFixingIndex().getIndex().toExternalId();
   
   
    FRASecurity fraSecurity = new FRASecurity(fraTrade.getCurrency(),
                  fraTrade.getRegionId().toExternalId(), //region id not used.
                  convertLocalDate(fraTrade.getEffectiveDate()),
                  convertLocalDate(fraTrade.getTerminationDate()),
                  fraTrade.getRate().doubleValue(),
                  absoluteNotional,
View Full Code Here

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

    final ZonedDateTime endDate = ZonedDateTime.now().plusMonths(3);
    final double rate = 0.01;
    final double amount = 15e6;
    final ExternalId underlyingIdentifier = ExternalId.of(ExternalSchemes.BLOOMBERG_TICKER, "US0003M Index");
    final ZonedDateTime fixingDate = endDate.minusDays(7);
    final FRASecurity security = new FRASecurity(currency, region, startDate, endDate, rate, amount, underlyingIdentifier, fixingDate);
    store(security);
    return security;
  }
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.