Temporal density extrapolation using a dynamic basis approach