The surplus process in a risk model is stochastically analyzed. We obtain the characteristic function of the level of the surplus at a finite time, by establishing and solving an integro-differential equation for the distribution function of the surplus. The characteristic function of the stationary distribution of the surplus is also obtained by assuming that an investment of the surplus is made to other business when the surplus reaches a sufficient level. As a consequence, we obtain the first and second moments of the surplus both at a finite time and in an infinite horizon (in the long-run).