This paper develops a risk-based capital pricing model for credit insurance portfolios held by a vulnerable insurer. The model accounts for business cycles using a two-state Markov switching model, and allows for dynamic leverage adjustment by the insured firms. The new proposed model, which incorporates risk-based capital practice, is better for both the insurer and the insured firms. Based on the risk-adjusted performance metric, we found that the insurer is better off insuring short- and medium-term loans in expansion and steady states, while it is better off backing both short- and long-term loans in recessions. Our results also emphasize that macroeconomic uncertainty significantly impairs the creditworthiness of the insurer and insured firms.