Since 2008, businesses and banks must manage and track more risk than ever before. Financial risk management helps companies and banks decrease the risk of investment and trade. Additionally, financial risk management gives a guide on how to forecast and manage the risk efficiently. More specifically, the three major risks are market risk, credit risk, and operational risk. This report will focus on the credit risk: introducing the definition of credit risk, single factor model, the relationship between coefficient and default probability, and the relationship of m coefficient and default probability. Using the single factor model, we will extend the definition and application to the double factor model. Furthermore, the coding will be provided