Investment risk in Pension Funds: a dynamical approach