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 traded price for more security products #1721

Merged
merged 1 commit into from Jun 11, 2018
Merged

Conversation

@jodastephen
Copy link
Member

@jodastephen jodastephen commented Jun 8, 2018

No description provided.

@jodastephen jodastephen requested a review from yukiiwashita Jun 8, 2018
@jodastephen jodastephen force-pushed the topic/security-traded-price branch 2 times, most recently from ab9440e to 272736e Jun 8, 2018
Extend use of `TradedPrice`
@jodastephen jodastephen force-pushed the topic/security-traded-price branch from 272736e to d5f7b74 Jun 8, 2018
@jodastephen jodastephen requested review from Mistuus and removed request for yukiiwashita Jun 11, 2018
@jodastephen jodastephen assigned Mistuus and unassigned yukiiwashita Jun 11, 2018
@@ -265,24 +265,19 @@ public void priceSensitivity() {

public void presentValue() {
// March 2016
CurrencyAmount pvMar = TRADE_PRICER.presentValue(FUTURE_TRADE_MAR, RATES_PROVIDER,
FUTURE_TRADE_MAR.getPrice());
CurrencyAmount pvMar = TRADE_PRICER.presentValue(FUTURE_TRADE_MAR, RATES_PROVIDER, REF_PRICE_MAR_DECIMAL);
assertEquals(pvMar.getAmount(), -9738.418878056109, TOL * NOTIONAL);

This comment has been minimized.

@Mistuus

Mistuus Jun 11, 2018
Contributor

Out of curiosity, why do we use TOL * NOTIONAL instead of just doing 0.01d or having a constant DELTA = 0.01d?

This comment has been minimized.

@jodastephen

jodastephen Jun 11, 2018
Author Member

It makes the tolerance proportional to the trade size, converting it to be more like a percentage of the trade value rather than an absolute amount,

@Mistuus Mistuus merged commit 09358e0 into master Jun 11, 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 - 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
security/snyk - pom.xml No dependency changes
Details
@Mistuus Mistuus deleted the topic/security-traded-price branch Jun 11, 2018
@jodastephen jodastephen added this to the v2.0 milestone Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants