jimjohn, I am no pro at hedging mortgage portfolios/pipelines, whatever. But, you seem to be mixing up duration (interest rate risk) with maturity/average live - as you said “because of higher prepayment risk, the duration decreases to 4 years. then the bank will want to enter into a swaption that lets them enter into a swap (receive fixed, pay floating) after 4 years.” Dont confuse 4yr duration with 4yr avg life.
If rates decline and ur MBS shortens and you want to maintain a longer duration, you would enter into a swap, use swaptions buy tsys, buy agencies, buy futures, or whatever your method is to achieve ur target duration. If you are now short a year (ir your exaple of 5 yrs to 4yrs), you would want to add 1yr of duration to the portfolio. You have 10mm @ 4yr duration, lets say. You now have 400k of dollar duration (your theoretical p/l on 100 bp shift in rates). Your target is 5yrs, or 500k of dollar duration. You need to find 100k to make up the difference. You could add 10mm of something @ 1yr duration, or 1mm @ 10yr duration, or any derivation thereof. Swaps are a good choice because they don’t require a principal outlay like cash bonds.
I am thinking outloud here, but if you wanted to keep cash flows going and your average life shortened, then you would enter into a swaption. You could then ensure that the last yr of payments occurs for you. I suppose you could also enter into a swaption that is slightly below the market in yield, so when rates decline, negative convexity kicks in, and you have a shorter portfolio, you have an option to receive in fixed some combination of the above math. But, it has nothing to do with getting those cash flows in 4yrs, it is about interest rate risk.