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

Legal entity rates loader #1516

Merged
merged 4 commits into from May 24, 2017

Conversation

Projects
None yet
2 participants
@yukiiwashita
Member

yukiiwashita commented May 9, 2017

  • Implemented LegalEntityRatesCurvesCsvLoader.
  • Reuse the existing csv formats except the curve group. An example is legal-entity-groups.csv.
  • Resulting object is LegalEntityCurveGroup from which the rates provider is created via LegalEntityDiscountingMarketDataLookup.
  • Move RepoGroup and LegalEntityGroup.
import static org.testng.Assert.assertEquals;
import org.testng.annotations.Test;
import com.opengamma.strata.market.curve.RepoGroup;

This comment has been minimized.

@jodastephen

jodastephen May 19, 2017

Member

Test needs to move package too

@@ -3,12 +3,14 @@
*
* Please see distribution for license.
*/
package com.opengamma.strata.pricer.bond;
package com.opengamma.strata.market.curve;

This comment has been minimized.

@jodastephen

jodastephen May 19, 2017

Member

Test needs to move package too

@@ -75,10 +77,12 @@
* The standard calculation functions.
*/
private static final CalculationFunctions STANDARD = CalculationFunctions.of(
new BondFutureTradeCalculationFunction(),

This comment has been minimized.

@jodastephen

jodastephen May 19, 2017

Member

Javadoc also needs to be updated within the class.

@@ -3,7 +3,7 @@
*
* Please see distribution for license.
*/
package com.opengamma.strata.pricer.bond;
package com.opengamma.strata.market.curve;

This comment has been minimized.

@jodastephen

jodastephen May 19, 2017

Member

It is rather unfortunate that this class is moved a second time!

CurveGroupName groupName = repoEntry.getKey();
Map<Pair<RepoGroup, Currency>, Curve> repoCurves = MapStream.of(repoEntry.getValue())
.mapValues(name -> curves.get(name))
.peek(e -> {

This comment has been minimized.

@jodastephen

jodastephen May 19, 2017

Member

peek() not generally a good thing to use, is there an alternative?

})
.mapValues(
name -> {
Curve curve = curves.get(name);

This comment has been minimized.

@jodastephen

jodastephen May 22, 2017

Member

We try to avoid blocks by creating extra methods. So, this would be `name -> queryCurve(name, curves, "Repo")

(this extra method can be used for both of these cases)

@yukiiwashita yukiiwashita merged commit 5e48c25 into master May 24, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@yukiiwashita yukiiwashita deleted the topic/legal-entity-rates-loader branch May 24, 2017

@jodastephen jodastephen modified the milestone: v1.4 Jul 31, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment