Variation of 

https://www.quantconnect.com/forum/discussion/10719/simulation-of-withdrawal-plans/p1

I adjusted it to fit my retirement plan:

1. Stopped working in 2008. 

2. Goal is to maximize withdrawals, without running out of money. Growing equity is NOT the goal here.

Parameters: 

withdrawal percentrage per trading day = 0.0003

leverage = 1.1

Withdrawal percentage per year = 0.0003 * 253 = 0.0759

Does this algo account for cost of margin?

Author