The paper considers the modified Sparre Andersen model which takes into account the ability of the insurer to invest its surplus in short-term assets. New derivation of the exponential upper bound for the ultimate ruin probability in this model (generalized Lundberg's inequality) is presented. The proof is based on the theory of supermartingales. As an application, the model is used to evaluate the risk of insolvency of a motor portfolio. A portfolio with a known structure of driver's claim propensity is considered in which drivers generate claims by compound Poisson processes with exponential severities. In numerical example, it is shown that the upper bound, derived for the modified Sparre Andersen model, can serve as an easy and quick indication of soundness of a portfolio. Sensitivity analysis of ruin probability is performed and its role in decision-making process of insurance company is discussed.