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

@jodastephen jodastephen commented Mar 21, 2018

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.

This comment has been minimized.

@brianweller89

brianweller89 Mar 22, 2018
Contributor

'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(

This comment has been minimized.

@brianweller89

brianweller89 Mar 22, 2018
Contributor

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

This comment has been minimized.

@jodastephen

jodastephen Mar 22, 2018
Author Member

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.

This comment has been minimized.

@brianweller89

brianweller89 Mar 22, 2018
Contributor

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.

This comment has been minimized.

@brianweller89

brianweller89 Mar 22, 2018
Contributor

'Flex'

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

This comment has been minimized.

@brianweller89

brianweller89 Mar 22, 2018
Contributor

Per above, underlying variant would be useful here

@jodastephen jodastephen merged commit 5e1cdd4 into master Mar 22, 2018
15 checks passed
15 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
security/snyk No dependency changes
Details
security/snyk - modules/basics/pom.xml No dependency changes
Details
security/snyk - modules/calc/pom.xml No dependency changes
Details
security/snyk - modules/collect/pom.xml No dependency changes
Details
security/snyk - modules/data/pom.xml No dependency changes
Details
security/snyk - modules/loader/pom.xml No dependency changes
Details
security/snyk - modules/market/pom.xml No dependency changes
Details
security/snyk - modules/math/pom.xml No dependency changes
Details
security/snyk - modules/measure/pom.xml No dependency changes
Details
security/snyk - modules/pom.xml No dependency changes
Details
security/snyk - modules/pricer/pom.xml No dependency changes
Details
security/snyk - modules/product/pom.xml No dependency changes
Details
security/snyk - modules/report/pom.xml No dependency changes
Details
@jodastephen jodastephen deleted the topic/etd-option-future branch Mar 22, 2018
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
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants