Resources

Value Function Iteration Code in C++

Tired of waiting for your value-function-iteration code to converge in Matlab? Simulating a cross-section takes forever? Afraid of C++? 

The following may help you. I provide an example of how to solve a simple production model and how to simulate a cross-section of firms in C++. The code uses Armadillo library, whose syntax is very similar to Matlab. I specify instructions on how to to compile the code. Along with the C++  code, I include an equivalent Matlab code, and show the mapping between the two. Simulating the cross-section takes over 16 mintues in Matlab, but only 14 seconds in C++. The code can be easily altered to solve more complicated setups.

Download here: Value Function Iteration in C++

Utilization Premium Code

If using any of the functions attached, please cite our paper: "Grigoris and Segal (2022), The Utilization Premium, Management Science, forthcoming".

Download here: Replication files

Counterparty Risk Factor

CSV file containing the time-series of the return spread between low and high receivables to sales (R/S) firms (raw spread and industry adjusted). Based on "Grigoris, Hu, and Segal (2022), Counterparty Risk: Implications for Network Linkages and Asset Prices, Review of Financial Studies, forthcoming".

Download here: CSV File