A joint model for the term structure of interest rates and the macroeconomy