Priced risk in corporate bonds replication package
The code in this replication package generates Tables 1 to 6 and Figures 1 to 2 in the paper titled “Priced risk in corporate bonds,” by Dickerson, Mueller, and Robotti (2023, henceforth DMR). The code to generate Tables 1 to 5 and Figures 1 to 2 are written in Matlab. Table 6 is generated with Python only. The file RunAllResults.m, the ‘one-push-button’, takes about 2 minutes to execute, and will produce all of the results in the paper except for Table 6. These results are printed to the Matlab console, saved as AllTablesReport and also stored in Matlab arrays such that they can be exported to other file formats. The results for Table 6 are produced by executing the Python script Table6.py. The authors have set up a dedicated replication/companion website (Open Source Bond Asset Pricing) which can be accessed here: https://openbondassetpricing.com/. This README file guides the user through replicating the results of the paper as well as constructing the main database from scratch.
Steps to reproduce
Instructions for Replicating the Main Analyses Tables 1-6 and Figures 1-2: 1. Open Matlab, navigate to the DMR replication package folder, open the RunAllResults.m Matlab script file, and press F5, or click ‘Run.’ The script should take < 2 minutes to execute. 2. The results for Tables 1-5 will be printed to screen (on the console). The results can be also be viewed in .txt format by opening the AllTablesReport file in Matlab itself. Figures 1-2 will be saved to file. 3. Execute the Python script Table6.py. Change the file path first on line 54. Results are exported to Excel .csv files called Table6AB.csv and Table6CD.csv respectively.