Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add underlying expiry month to ETD options #1668

Merged
merged 2 commits into from Mar 22, 2018
Merged

Conversation

jodastephen
Copy link
Member

Specify underlying expiry month for some options to make them unique

Specify underlying expiry month for some options to make them unique
* The {@link #getType() type} must be {@link EtdType#OPTION} otherwise an exception will be thrown.
*
* @param expiryMonth the expiry month of the option
* @param variant the variant of the ETD, such as 'Monthly', 'Weekly, 'Daily' or 'Flex.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Flex'

* @return an option security based on this contract specification
* @throws IllegalStateException if the product type of the contract specification is not {@code OPTION}
*/
public EtdOptionSecurity createOption(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like we should have underlyingExpiryVariant as well (could maybe have an overload which defaults to monthly).

Flex might still not work properly but at least we'd be able to differentiate weeklys

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was agreed that we leave variant out for now and see if a need for it arises.

}

/**
* Creates an identifier for an ETD future instrument.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Option not future

* @param exchangeId the MIC code of the exchange where the instruments are traded
* @param contractCode the code supplied by the exchange for use in clearing and margining, such as in SPAN
* @param expiryMonth the month of expiry
* @param variant the variant of the ETD, such as 'Monthly', 'Weekly, 'Daily' or 'Flex.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Flex'

* In this case, the expiry is often omitted, even though it probably should not be.
*/
@PropertyDefinition(get = "optional")
private final YearMonth underlyingExpiryMonth;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per above, underlying variant would be useful here

@jodastephen jodastephen merged commit 5e1cdd4 into master Mar 22, 2018
@jodastephen jodastephen deleted the topic/etd-option-future branch March 22, 2018 14:50
jodastephen added a commit that referenced this pull request Mar 22, 2018
* Add underlying expiry month to ETD options

Specify underlying expiry month for some options to make them unique

* Tweaks from PR
@jodastephen jodastephen added this to the v1.8 milestone Apr 9, 2018
@jodastephen jodastephen modified the milestones: v1.8, v2.0 Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants