To get started we run some back-testing sample code:
- Pick a list of representative securities to build a portfolio (sec).
- Generate cashflow and default data quarterly for 5 year history (sec).
- Build models for each of the securities that fit the cashflow and default data with suitable degree interpolating polynomials. They should hit the generated data points exactly. It would be like having a forecast model with very low modeling error (sec).
- Build a portfolio from these products – maybe match some the aggregate asset and liability sizes to NY Fed figures. (sec) .
- Run nim on this portfolio for 5y of back testing (nim). Should match the input data by definition.
- Run the LP on the modeled data to get the optimal capital allocation at: 5y, 4y, 3y, 2y, and 1y (nimo).
- Run the P&L attribution optimal versus realized (nimo).
Notice we are going to make the cashflow and default models depend only on time with a function choice that will replicate exactly the observed cashflows and defaults. We will substitute models depending on market data at a subsequent step. Then we can put in the Monte Carlo forecasting step to the compute the portfolio’s expected NIM prior to the optimization step.
Note there is also the option of using the optimization post the Adverse and Severely Adverse Fed scenarios. Probably not very interesting in terms of P&L but maybe there are other applications