Credit rating

Nowadays, there are three major credit ratings agents in the USA: Moody's, Standard, and Poor's and Fitch. Their websites are,, and Although their ratings have different notations (letters), it is easy to translate one letter rating from a rating agency to another one. Based on the following link at, a dataset called creditRatigs3.pkl is generated, which can be downloaded at the author's website, Assume that it is located under C:/temp/.

The following codes show its contents:

import pandas as pd x=pd.read_pickle("c:/temp/creditRatings3.pkl") ...

Get Python for Finance - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.