We consider a continuous time dynamic pension funding model in a defined benefit plan of an employment system. The benefits liabilities are random, given by a geometric Brownian process. Three different situations are studied regarding the investment decisions taken by the sponsoring employer: in the first, the fund is invested at a constant, risk-free rate of interest; in the second, the promoter invests in a portfolio with n risky assets and a risk-free security; finally, it is supposed that the rate of return is stochastic. Modelling the preferences of the manager such that the main objective is to minimize both the contribution rate risk and the solvency risk, we study cases where the optimal behavior leads to a spread method of funding...