We provide source code for the methodology presented in the paper “Rethinking Margin Period of Risk” by Leif Andersen (Bank of America Merrill Lynch), Michael Pykhtin (Federal Reserve Board), and Alexander Sokol (CompatibL).
Full text of the paper may be downloaded from http://papers.ssrn.com/abstract_id=2719964.
We describe a new framework for collateralized exposure modelling under an ISDA Master Agreement with a Credit Support Annex. The proposed model captures legal and operational aspects of default in considerably greater detail than models currently used by most practitioners, while remaining fully tractable and computationally feasible. Specifically, it considers the remedies and suspension rights available within these legal agreements; the firm’s policies in availing itself of these rights; and the typical time it takes to exercise them in practice. The inclusion of these effects is shown to produce significantly higher credit exposure for representative portfolios compared to the currently used models. The increase is especially pronounced when dynamic initial margin is also present.