-
Notifications
You must be signed in to change notification settings - Fork 293
Legal entity rates loader #1516
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
Conversation
|
||
import static org.testng.Assert.assertEquals; | ||
|
||
import org.testng.annotations.Test; | ||
|
||
import com.opengamma.strata.market.curve.RepoGroup; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test needs to move package too
@@ -75,10 +77,12 @@ | |||
* The standard calculation functions. | |||
*/ | |||
private static final CalculationFunctions STANDARD = CalculationFunctions.of( | |||
new BondFutureTradeCalculationFunction(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
peek() not generally a good thing to use, is there an alternative?
}) | ||
.mapValues( | ||
name -> { | ||
Curve curve = curves.get(name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
legal-entity-groups.csv
.