Aftcast is a way of simulating equity curves for different start years, usually from a large sample data ~100 years. Its kind of like start date sensitivity testing but in my case, I incorporated withdrawals from portfolio. What I am trying to see is how sustainable a portfolio would be if I were to withdrawal at different fixed rate percentages of initial portfolio starting value. (Withdrawals are also adjusted for inflation)
After adjusting portfolio return for inflation, I extracted the return and then looped over each day to calculate next period portfolio value (previous portfolio value * 1+return), and if the next period is the withdrawal period (every december of each year), i subtracted the fixed amount (0.06 if 6%). The equity curve...

Not very sustainable from first glance. The problem I am having is to generate an aftcast for this entire stream of return. By this I mean I will extract the daily return and then find the equity series for each rolling 40 year period. So 1900-1940 will give me one equity series, and 1901-1941 another....etc.
But the problem comes in here...

The returns are normal until around 1925 when there is great volatility in return (+-100%). This is caused by the relationship between withdrawal rate and portfolio value. As the portfolio value approaches zero in 1925, the fixed withdrawal rate becomes a big percentage of portfolio value. This gives aftcast scenarios way out of whack..

Sorry for the long post. Is there anyone out there that have experience with generating aftcast scenarios? Am I misinterpreting some aspect of calculating portfolio value after withdrawals as if I lower the withdrawal rate to 0.01, everything is normal..
This is very urgent, any suggestions might help! Thanks so much.
