Long-term rates have been rising sharply in recent months, pushing up the borrowing costs for governments, corporations and for anyone who wants to take out a mortgage.