Since duration works best for only small changes of the interest rate, convexity helps to improve the estimation accuracy. Traditionally, convexity is displayed with a formula, which depends on the number of outstanding payments. Closed-form solutions do exist, typically building on the work of...