An agreement between two parties to exchange sequences of cash flows for a set period of time. Usually, at the time the contract is initiated, at least one of these series of cash flows is determined unknown variable, such as an interest rate, foreign exchange rate, equity price or commodity price.