We will consider two systems of interacting diffusion processes, which go by the names rank-based and volatility-stabilized models in the mathematical finance literature. We will show that, if one lets the number of diffusion processes tend to infinity, the limiting dynamics of the system is described by the porous medium equation with convection in the rank-based case and by a degenerate linear parabolic equation in the volatility-stabilized case. In the first case we also provide the corresponding large deviations principle. The results can be applied in stochastic portfolio theory and for the numerical solution of partial differential equations. A part of the talk is joint work with Amir Dembo and Ofer Zeitouni.