I was using the toolkit routine for inheritance assets ( vfoptions.inheritanceasset = 1) and came across a possible bug in the Castaneda replication.
Possible estate-tax timing error in the Castañeda et al. (2003) replication
In CDGRR2003_aprimeFn.m, the estate tax applies whenever z > J and savings exceed the exemption. The function takes zprime as an argument but never uses it. As written, a retiree who survives into the next period pays the same estate tax as one who dies. Asset-transition function
My reading is that death corresponds to a transition from retirement (z > J) to a working-age successor (zprime <= J). This also agrees with the government budget, which multiplies estate-tax receipts by the probability of death, 1-p_gg. Transition matrix · Estate-tax revenue
Should line 7 therefore read if z > J && zprime <= J? This would leave a surviving retiree’s savings intact and apply the existing tax formula only when assets pass to the successor.