Dynamic Optimal Insurance and Lack of Commitment by Alexander K. Karaivanov and Fernando M. Martin The code was written in Fortran 90 and compiled using Absoft Pro Fortran 13. It uses the IMSL Fortran Numerical Library Version 7.0. The code is stored as 'hazarfi.f90'. Execute the 'hazarfi.exe' file to run the compiled code. Output generated by the program is stored in files 'autarky.out' (autarky case) and 'markov.out' (markov-perfect equilibrium with autarky as the agent's outside option). The figure in the paper was created in Excel. See file 'Figure.xlsx'.