Imagine an open term loan with monthly interest payments of [x]% and the principle due when the loan is closed. Both the lender can call the loan, and the borrower can return the loan (with no penalty) at any time.
If its helpful, assume the loan asset has liquid secondary market and mature futures market with a known term structure basis.
How would one calculate the duration and convexity of a loan with these attributes? How would one think about hedging these risks when considering a loan book made up of these loans?