RINGLER.OS / PROJECT← Return to console

Portfolio TLH Optimizer

A historical simulator for testing how tax-loss harvesting and rebalancing rules change portfolio performance.

Portfolio simulation dashboard showing strategy controls, performance metrics, and comparison charts
Streamlit dashboard from the portfolio optimizer repository.

How the simulator works

For the Vise capstone, we built a simulator that applies different rebalancing rules to the same historical price data. It compares scheduled rebalancing with a drift-band approach, which rebalances when holdings move beyond a threshold from their target allocation.

A separate engine tracks tax lots, distinguishes short- and long-term gains, and models wash-sale rules. Streamlit brings the calculations together so a user can review return, drawdown, and risk-adjusted performance side by side.

Inside the backtest

The comparative analysis covered 96 runs. Testing multiple market conditions and allocations makes it easier to see which conclusions depend on the inputs.