Affine term structure model
An affine term structure model is a financial model that relates zero-coupon bond prices (i.e. the discount curve) to a spot rate model. It is particularly useful for deriving the yield curve – the process of determining spot rate model inputs from observable bond market data. The affine class of term structure models implies the convenient form that log bond prices are linear functions of the spot rate (and potentially additional state variables). Background. Start with a stochastic short rate model formula_1 with dynamics: and a risk-free zero-coupon bond maturing at time formula_3 with  price formula_4 at time formula_5. The price of a zero-coupon bond is given by:formula_6where formula_7, with formula_8 being is the bond's maturity. The expectation is taken with respect to the risk-neutral probability measure formula_9. If the bond's price has the form: where formula_11 and formula_12 are deterministic functions, then the short rate model is said to have an affine term structure. The yield of a bond with maturity formula_8, denoted by formula_14, is given by:formula_15 Feynman-Kac formula. For the moment, we have not yet figured out how to explicitly compute the bond's  price; however, the bond price's definition implies a link to the Feynman-Kac formula, which suggests that the bond's price may be explicitly modeled by a partial differential equation. Assuming that the bond price is a function of formula_16 latent factors leads to the PDE:formula_17where formula_18 is the covariance matrix of the latent factors where the latent factors are driven by an Ito stochastic differential equation in the risk-neutral measure:formula_19Assume a solution for the bond price of the form:formula_20The derivatives of the bond price with respect to maturity and each latent factor are:formula_21With  these derivatives, the PDE may be reduced to a series of ordinary differential equations:formula_22To compute a closed-form solution requires additional specifications. Existence. Using Ito's formula we can determine the constraints on formula_23 and formula_24 which will result in an affine term structure. Assuming the bond has an affine term structure and formula_25 satisfies the term structure equation, we get: The boundary value implies Next, assume that formula_23 and formula_30 are affine in formula_31: The differential equation then becomes Because this formula must hold for all formula_31, formula_5, formula_3, the coefficient of formula_31 must equal zero. Then the  other term must vanish as well. Then, assuming formula_23 and formula_30 are affine in formula_31, the model has an affine term structure where formula_11 and formula_12 satisfy the system of equations: Models with ATS. Vasicek. The Vasicek model formula_46 has an affine term structure where Arbitrage-Free Nelson-Siegel. One approach to affine term structure modeling is to enforce an arbitrage-free condition on the proposed model. In a series of papers, a proposed dynamic yield curve model was developed using an arbitrage-free version of the famous Nelson-Siegel model, which the authors label AFNS. To derive the AFNS  model, the authors make several assumptions: From the assumed model of the zero-coupon bond price:formula_54The yield at maturity formula_8 is given by:formula_56And based on the listed assumptions, the set of ODEs that must be solved for a closed-form solution is given by:formula_57where formula_58 and formula_18 is a diagonal matrix with entries formula_60. Matching coefficients, we have the set of equations:formula_61To find a tractable solution, the authors propose that formula_62 take the form:formula_63Solving the set of coupled ODEs for the vector formula_64, and letting formula_65, we find that:formula_66Then formula_67 reproduces the standard Nelson -Siegel yield curve model. The solution for the yield adjustment factor formula_68 is more complicated, found in Appendix B of the 2007 paper, but is necessary to enforce the arbitrage-free condition. Average expected short rate. One quantity of interest that may be derived from the AFNS model is the average expected short rate (AESR), which is defined as:formula_69where formula_70 is the conditional expectation of the short rate and formula_71 is the term premium associated with a bond of maturity formula_8. To find the AESR, recall that the dynamics of the latent factors under the real-world measure formula_49  are:formula_74The general solution of the multivariate Ornstein-Uhlenbeck process is:formula_75Note that formula_76 is the matrix exponential. From this solution, it is possible to explicitly compute the conditional expectation of the factors at time formula_77 as:formula_78Noting that formula_79, the general solution for the AESR may be found analytically:formula_80