The risk reserve process of an insurance company within a deterioratin
g Markov-modulated environment is considered. The company invests its
capital with interest rate alpha; the premiums and claims are increasi
ng with rates beta and gamma. The problem of stopping the process at a
random time which maximizes the expected net gain in order to calcula
te new premiums is investigated. A semimartingale representation of th
e risk reserve process yields, under certain conditions, an explicit s
olution of the problem.