All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.opengamma.strata.product.etd.EtdSecurity Maven / Gradle / Ivy

There is a newer version: 2.12.48
Show newest version
/*
 * Copyright (C) 2017 - present by OpenGamma Inc. and the OpenGamma group of companies
 *
 * Please see distribution for license.
 */
package com.opengamma.strata.product.etd;

import java.time.YearMonth;

import com.google.common.collect.ImmutableSet;
import com.opengamma.strata.basics.currency.Currency;
import com.opengamma.strata.product.SecuritizedProduct;
import com.opengamma.strata.product.Security;
import com.opengamma.strata.product.SecurityId;
import com.opengamma.strata.product.SecurityInfo;

/**
 * An instrument representing an exchange traded derivative (ETD).
 */
public interface EtdSecurity
    extends Security, SecuritizedProduct {

  @Override
  public default SecurityId getSecurityId() {
    return Security.super.getSecurityId();
  }

  @Override
  public default Currency getCurrency() {
    return Security.super.getCurrency();
  }

  @Override
  public default ImmutableSet getUnderlyingIds() {
    return ImmutableSet.of();
  }

  //-----------------------------------------------------------------------
  /**
   * Gets the ID of the contract specification from which this security is derived.
   * 
   * @return the ID
   */
  public abstract EtdContractSpecId getContractSpecId();

  /**
   * Gets the type of the contract - future or option.
   * 
   * @return the type, future or option
   */
  public abstract EtdType getType();

  /**
   * Gets the year-month of the expiry.
   * 

* Expiry will occur on a date implied by the variant of the ETD. * * @return the year-month */ public abstract YearMonth getExpiry(); /** * Gets the variant of ETD. *

* This captures the variant of the ETD. The most common variant is 'Monthly'. * Other variants are 'Weekly', 'Daily' and 'Flex'. *

* When building, this defaults to 'Monthly'. * * @return the variant */ public abstract EtdVariant getVariant(); //------------------------------------------------------------------------- @Override public abstract EtdSecurity withInfo(SecurityInfo info); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy