  At first, we solve a problem of finding a risk-minimizing hedging strategy on
a general market with ratings. Next, we find a solution to this problem on
Markovian market with ratings on which prices are influenced by additional
factors and rating, and behavior of this system is described by SDE driven by
Wiener process and compensated Poisson random measure and claims depend on
rating. To find a tool to calculate hedging strategy we prove a Feynman-Kac
type theorem. This result is of independent interest and has many applications,
since it enables to calculate some conditional expectations using related
PIDE's. We illustrate our theory on two examples of market. The first is a
general exponential L\'{e}vy model with stochastic volatility, and the second
is a generalization of exponential L\'{e}vy model with regime-switching.
