mirror of
https://github.com/corda/corda.git
synced 2024-12-21 05:53:23 +00:00
Merged in rg_fix_simmm_crash_in_valuation (pull request #530)
Fixes bug when valuation run on only one trade in the portfolio
This commit is contained in:
commit
1f148cfc95
@ -34,7 +34,8 @@ class IsdaConfiguration {
|
|||||||
object BimmAnalysisUtils {
|
object BimmAnalysisUtils {
|
||||||
fun computeMargin(combinedRatesProvider: ImmutableRatesProvider?, normalizer: PortfolioNormalizer, calculatorTotal: RwamBimmNotProductClassesCalculator,
|
fun computeMargin(combinedRatesProvider: ImmutableRatesProvider?, normalizer: PortfolioNormalizer, calculatorTotal: RwamBimmNotProductClassesCalculator,
|
||||||
first: CurrencyParameterSensitivities, second: MultiCurrencyAmount): Triple<Double, Double, Double> {
|
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.amount }.sum()
|
||||||
return Triple<Double, Double, Double>(amount, 0.0, amount)
|
return Triple<Double, Double, Double>(amount, 0.0, amount)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user