Added some of the functionality for the Monte Carlo CDS portfolio loss model (needs testing)