Hi all. I’m implementing a service that takes a swap in JSON, models it in Strata, then resolves the swap like so:
final Swap swap = Swap.of(strataSwapLegs); TradeInfo tradeInfo = TradeInfo.empty(); //TradeInfo object used to add more info to the swap trade SwapTrade swapTrade = SwapTrade.of(tradeInfo, swap); ReferenceData refData = ReferenceData.standard(); ResolvedSwapTrade resolved = swapTrade.resolve(refData); ResolvedSwap resolvedSwap = resolved.getProduct();
I am wondering if the ordering in which legs are put in the
strataSwapLegs List is maintained when I call
resolvedSwap.getLegs(); or if I should find a way to ensure the ordering is the same / fix it otherwise. If the latter, do you have any suggestion on how to do that?