Often I check an investment strategy's performance by summing the year-to-date realized gains/losses.  

I take the sum of all closing(or market for unrealized) values **CT**, subtract the sum of all cost basises (sp?) **OT**, and divide that difference by the total cost basis **OT**.  That gives me raw performance year-to-date.  So in terms of percentage gain/loss:

    performancePercYTD =  ((CT - OT) / OT - 1) * 100

From there it can be roughly annualized into an APR performance `= performancePercYTD * 365.25 / day_of_year`

Question.
Using the [Rule of 72][1] how can one estimate:

 - The doubling frequency in days
 - Projected portfolio value in 90 days
 - How long before at this pace, the account will reach $10000
 - How long before the first sustainable $500/month withdrawal *indefinitely* will not deplete the principal, assuming the current growth rate continues?
 - The reverse of the last question, for example, what minimum amount could be a sustainable monthly withdrawal in 24 months(730.5 days)?


It's an exercise I would like to script for daily computations, since of course variables change constantly.
Thanks!

  [1]: http://www.investopedia.com/terms/r/ruleof72.asp#axzz1pTSvv0D0