[PLAT-4897] Adding a swap floating leg detail object
[PLAT-4941] Moving code outside of loop that doesn't depend on the iteration number