How ML Stats Calculates Portfolio Modeler And Retirement Calculator
This page explains the core calculation flow used by both financial calculators. Both tools run deterministic, month-by-month simulations based on your inputs and assumptions.
Portfolio Modeler: Calculation Flow
- Build the portfolio from target weights and optional growth/yield overrides.
- For each month, apply price growth to holdings.
- Calculate monthly dividends and add them to cash.
- In Standard mode, fund monthly income from cash first, then sell holdings according to sale order (lowest growth, highest growth, or equal).
- In Three Bucket mode, initialize Bucket 1 and Bucket 2 from years of income, place the remaining value in Bucket 3, and fund spending from Bucket 1, then Bucket 2, then Bucket 3 as a last resort.
- Three Bucket replenishment uses the selected cadence. Bucket 1 refills from Bucket 2 first, and Bucket 2 refills from Bucket 3 only when Bucket 3 had positive growth for the month.
- Track monthly shortfall if assets cannot fully fund the target.
- If DRIP is on, reinvest leftover cash by current weights.
- In Standard mode, rebalance holdings back to target weights when scheduled. In Three Bucket mode, the cadence controls replenishment instead of full-portfolio rebalancing.
Portfolio Modeler Three Bucket Mode
- Bucket 1 is the near-term spending sleeve.
- Bucket 2 is the intermediate reserve sleeve.
- Bucket 3 is the long-term growth sleeve.
- Sales within the active bucket honor the selected sale order. Equal sale order is proportional within that bucket.
- Monte Carlo replays the same bucket logic while sampling inflation, growth, and yield assumptions.
Retirement Calculator: Calculation Flow
- Build monthly expenses from base spending plus recurring and one-time events.
- Apply inflation to base spending and inflation-enabled annual events.
- Add fixed income sources (Social Security and pension streams).
- Advance each investment account for growth and dividends.
- Fill any remaining gap using withdrawal order rules.
- Apply account-level DRIP and rebalance settings after withdrawals each month.
- Record shortfalls, first shortfall timing, and ending net worth.
Retirement Calculator Withdrawal Order
- Cash accounts first (priority order, draw-enabled only).
- Taxable Brokerage accounts.
- Traditional retirement accounts: 401k and IRA.
- Roth IRA accounts.
Inside each investment account, the model uses account cash first, then sells holdings based on that account's withdrawal strategy.
Retirement Age Gating And Penalties
- Retirement account withdrawals are gated by each account's configured withdrawal start age.
- The current model does not automatically apply a fixed 10% early withdrawal penalty.
- If you want to model a penalty effect, you can add equivalent expense events or increase spending assumptions.
Important Assumptions And Limitations
- Static projections are deterministic. Monte Carlo views sample a range of inflation, growth, and yield assumptions.
- Taxes are not fully modeled as a tax engine.
- Transaction costs, slippage, and advisor fees are not explicitly modeled.
- Results are informational and educational, not guarantees, investment recommendations, or personalized financial advice.