  We continue a series of papers where prices of the barrier options written on
the underlying, which dynamics follows some one factor stochastic model with
time-dependent coefficients and the barrier, are obtained in semi-closed form,
see (Carr and Itkin, 2020, Itkin and Muravey, 2020). This paper extends this
methodology to the CIR model for zero-coupon bonds, and to the CEV model for
stocks which are used as the corresponding underlying for the barrier options.
We describe two approaches. One is generalization of the method of heat
potentials for the heat equation to the Bessel process, so we call it the
method of Bessel potentials. We also propose a general scheme how to construct
the potential method for any linear differential operator with time-independent
coefficients. The second one is the method of generalized integral transform,
which is also extended to the Bessel process. In all cases, a semi-closed
solution means that first, we need to solve numerically a linear Volterra
equation of the second kind, and then the option price is represented as a
one-dimensional integral. We demonstrate that computationally our method is
more efficient than both the backward and forward finite difference methods
while providing better accuracy and stability. Also, it is shown that both
method don't duplicate but rather compliment each other, as one provides very
accurate results at small maturities, and the other one - at high maturities.
