mirror of
https://github.com/corda/corda.git
synced 2025-02-20 09:26:41 +00:00
Fixes bug when valuation run on only one trade in the portfolio
This commit is contained in:
parent
6aa5f0a4b5
commit
1c4dfbe6dc
@ -34,7 +34,8 @@ class IsdaConfiguration {
|
||||
object BimmAnalysisUtils {
|
||||
fun computeMargin(combinedRatesProvider: ImmutableRatesProvider?, normalizer: PortfolioNormalizer, calculatorTotal: RwamBimmNotProductClassesCalculator,
|
||||
first: CurrencyParameterSensitivities, second: MultiCurrencyAmount): Triple<Double, Double, Double> {
|
||||
val amount = (second.amounts.reduce { x, y -> x + y }.amount) / 100.0 // Not to be used for financial purposes...
|
||||
|
||||
val amount = (second.amounts.map{ it -> it.amount}.fold(0.0,{ total, increment -> total + increment })) / 100.0 // Not to be used for financial purposes...
|
||||
return Triple<Double, Double, Double>(amount, 0.0, amount)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user