Swaps are financial derivative contracts where two parties exchange cash flows or liabilities from two different financial instruments. They are…