This study sets a system of pricing credit derivatives involving both the macro and firm-specific factors. The systematic and idiosyncratic risks are jointly affecting the default events. In macroeconomic part, through the state-space model of the Gibbs sampling and Kalman Filter, one can capture the fundamental of macroeconomic sectors driving the default intensity, including macroeconomic and financial variables. The state-space model gives the reduced-form model more economic point of view. In the microeconomic part, when the potential variable is lower than some barrier, it triggers the default. The Variance Gamma distribution describes the financial condition presenting kurtosis and skewness, it fits the market condition much well compared with the lognormal distribution. Under this setting, we price credit default swaps.