Resources
Code, replication files, and data for research in macro-finance and asset pricing.
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 (2023), Counterparty Risk: Implications for Network Linkages and Asset Prices, Review of Financial Studies, 36(2), 814–858".
Download here: CSV File
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++
Replication packages
The Utilization Premium
The journal’s supplemental-materials page links to its replication files and online appendix.
Management Science replication page ↗
If using this code or data, please cite: Grigoris and Segal (2024), “The Utilization Premium,” Management Science, 70(1), 207–224.
Investment under Upstream and Downstream Uncertainty
The replication code is listed under Supporting Information on the article page.
Journal of Finance replication page ↗
If using this code or data, please cite: Grigoris and Segal (2026), “Investment under Upstream and Downstream Uncertainty,” Journal of Finance, 81(1), 413–457.
Trendy Business Cycles and Asset Prices
Replication code.
Harvard Dataverse record ↗
If using this code or data, please cite: Davis and Segal (2023), “Trendy Business Cycles and Asset Prices,” Review of Financial Studies, 36(6), 2509–2570.
Counterparty Risk: Implications for Network Linkages and Asset Prices
Replication code and pseudodata.
Harvard Dataverse record ↗
If using this code or data, please cite: Grigoris, Hu, and Segal (2023), “Counterparty Risk: Implications for Network Linkages and Asset Prices,” Review of Financial Studies, 36(2), 814–858.