Package com.opengamma.analytics.financial.forex.derivative

Examples of com.opengamma.analytics.financial.forex.derivative.ForexNonDeliverableForward


  @Deprecated
  @Override
  public ForexNonDeliverableForward toDerivative(final ZonedDateTime date, final String... yieldCurveNames) {
    ArgumentChecker.isTrue(!date.isAfter(_fixingDate), "Date is after fixing date");
    ArgumentChecker.isTrue(yieldCurveNames.length > 1, "At least two curves required");
    return new ForexNonDeliverableForward(_currency1, _currency2, _notional, _exchangeRate, TimeCalculator.getTimeBetween(date, _fixingDate),
        TimeCalculator.getTimeBetween(date, _paymentDate), yieldCurveNames[0], yieldCurveNames[1]);
  }
View Full Code Here


  }

  @Override
  public ForexNonDeliverableForward toDerivative(final ZonedDateTime date) {
    ArgumentChecker.isTrue(!date.isAfter(_fixingDate), "Date is after fixing date");
    return new ForexNonDeliverableForward(_currency1, _currency2, _notional, _exchangeRate, TimeCalculator.getTimeBetween(date, _fixingDate),
        TimeCalculator.getTimeBetween(date, _paymentDate));
  }
View Full Code Here

   */
  public void toDerivativeDeprecated() {
    final String krw = "Discounting KRW";
    final String dsc = "Discounting USD";
    final String[] curveNames = new String[] {krw, dsc};
    final ForexNonDeliverableForward ndfConverted = NDF_DEFINITION.toDerivative(REFERENCE_DATE, curveNames);
    final ForexNonDeliverableForward ndfExpected = new ForexNonDeliverableForward(KRW, USD, NOMINAL_USD, FX_RATE, TimeCalculator.getTimeBetween(REFERENCE_DATE, FIXING_DATE), TimeCalculator.getTimeBetween(
        REFERENCE_DATE, PAYMENT_DATE), krw, dsc);
    assertEquals("Forex NDF - toDerivatives", ndfExpected, ndfConverted);
  }
View Full Code Here

  @Test
  /**
   * Tests the class toDerivative method.
   */
  public void toDerivative() {
    final ForexNonDeliverableForward ndfConverted = NDF_DEFINITION.toDerivative(REFERENCE_DATE);
    final ForexNonDeliverableForward ndfExpected = new ForexNonDeliverableForward(KRW, USD, NOMINAL_USD, FX_RATE, TimeCalculator.getTimeBetween(REFERENCE_DATE, FIXING_DATE), TimeCalculator.getTimeBetween(
        REFERENCE_DATE, PAYMENT_DATE));
    assertEquals("Forex NDF - toDerivatives", ndfExpected, ndfConverted);
  }
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.forex.derivative.ForexNonDeliverableForward

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.