A swap is derivative. It acts as a contract by which two parties can exchange the interest rate on their loans. In swaps, one…