We consider a structural credit model for a large portfolio of credit risky
assets where the correlation is due to a market factor. By considering the
large portfolio limit of this system we show the existence of a density process
for the asset values. This density evolves according to a stochastic partial
differential equation and we establish existence and uniqueness for the
solution taking values in a suitable function space. The loss function of the
portfolio is then a function of the evolution of this density at the default
boundary.