In this paper, we work with a diffusion-perturbed risk model comprising a surplus generating process and an investment return process. The investment return process is of standard a Black–Scholes type, that is, it comprises a single risk-free asset that earns interest at a constant rate and a single risky asset whose price process is modelled by a geometric Brownian motion. Additionally, the company is allowed to purchase noncheap proportional reinsurance priced via the expected value principle. Using the Hamilton–Jacobi–Bellman (HJB) approach, we derive a second-order Volterra integrodifferential equation which we transform into a linear Volterra integral equation of the second kind. We proceed to solve this integral equation numerically using the block-by-block method for the optimal reinsurance retention level that minimizes the ultimate ruin probability. The numerical results based on light- and heavy-tailed individual claim amount distributions show that proportional reinsurance and investments play a vital role in enhancing the survival of insurance companies. But the ruin probability exhibits sensitivity to the volatility of the stock price.