The code below follows Mankiw, Weinzierl, and Yagan's fixed point iteration algorithm for finding the optimal tax schedule (https://eml.berkeley.edu/~yagan/MWY_appx.pdf). That said, there are quite a few implementation differences to speed things up.
- An udpated version is on the "type-space-dev" branch
- An income space approach will be implemented soon