  We consider an economic agent (a household or an insurance company) modelling
its surplus process by a deterministic process or by a Brownian motion with
drift. The goal is to maximise the expected discounted spendings/dividend
payments, given that the discounting factor is given by an exponential CIR
process. In the deterministic case, we are able to find explicit expressions
for the optimal strategy and the value function. For the Brownian motion case,
we offer a method allowing to show that for a small volatility the optimal
strategy is a constant-barrier strategy.
