First construct a simple cash flow that pays 100 on the first business day three months from now. Set the global evaluation date to November 17, 2006.
Every cash flow is represented by a module with two exports: amount and date. The first one holds the amount to be paid. The second one holds the payment date.
You can calculate the net present value of this cash flow using any given discount rate.
This is the value of our cash flow on November 17, 2006, which is the global evaluation date. You can use different dates by using appropriate term structures or by specifying the reference date explicitly.
You can also construct cash flows that represent fixed- and floating-rate coupon payments.
Next construct a floating-rate coupon payment.