A risk-averse insurance company controls its reserve, modeled as a perturbed Cramer-Lundberg process, by choice of both the premium p and the deductible K offered to potential customers. The surplus is allocated to financial investment in a riskless and a basket of risky assets potentially correlating with the insurance risks and thus serving as a partial hedge against these. Assuming customers differ in riskiness, increasing p or K reduces the number of customers n(p, K) and increases the arrival rate of claims per customer lambda(p, K) through adverse selection, with a combined negative effect on the aggregate arrival rate n(p,K)lambda(p, K). We derive the optimal premium rate, deductible, investment strategy, and dividend payout rate (consumption by the owner-manager) maximizing expected discounted lifetime utility of intermediate consumption under the assumption of constant absolute risk aversion. Closed-form solutions are provided under specific assumptions on the distributions of size and frequency of claims. (C) 2021 Elsevier B.V. All rights reserved.