Commit Graph

4 Commits

Author SHA1 Message Date
unknown ab9e968def Portfolio builder/master improvements, batch backtest fixes, parser FIFO fix, theme updates 2026-04-17 09:42:08 +10:00
unknown a4a75eaaeb fix: batch backtest ini generation and report collection
- Replace Inputs= with [TesterInputs] section in ini files so MT5
  cannot override set file parameters with cached/default values
- Fix build_ini to use caller-supplied report_name instead of
  recomputing a generic name, ensuring each run gets a unique ini
- Replace shutil.copy2 + delete loop with shutil.move for htm reports
- Add companion PNG move (name, -holding, -mfemae, -hst) to reports folder
- Fix Streamlit folder warning appearing in wrong conditional branch

Applies to both mt5_batch_backtest.py and view_batch_backtest.py
2026-04-15 21:35:19 +10:00
unknown 3db0870844 feat: portfolio master algo overhaul + fixes
Search:
- Three modes: Exhaustive, Greedy (incremental), Monte Carlo, combined
- Combination count estimate + runtime warning before run
- Background thread with Cancel button (threading.Event, no session_state spam)

Scoring:
- Composite weighted score (Ret/DD, Stability, Stagnation, Win Rate,
  Growth Quality, Diversity) with normalised sliders
- Score, Stability, Growth Quality, Diversity now whole numbers
- Growth Quality = normalised slope x R2 rewards consistently rising curves
- Diversity bonus based on symbol variety + session overlap

Correlation:
- Average pairwise correlation output metric
- Conditional correlation (drawdown days only) computed and displayed
- Per-result correlation heatmaps in detail expanders

Results table:
- Summary explanation panel above table
- Max Pos Exposure removed (unreliable with current parser output)

Fixes:
- Duplicate plotly_chart element ID fix
- time import missing fix
2026-04-13 17:25:13 +10:00
unknown 06e23e1d7a fix: batch backtest lot size, DD% formula, max position exposure
- mt5_batch_backtest.py / view_batch_backtest.py: fix update_param to
  clear MT5 .set flag bit 2 (use-default) and update default field so
  manual lot size actually takes effect
- view_portfolio_master.py: Max DD% now uses deposit not running peak,
  Max Position Exposure rebuilt as proper timeline sweep
- view_portfolio_builder.py: Max DD% formula aligned to match master
- view_portfolio_master.py / view_portfolio_builder.py: results table
  now shows full stats columns including Stability score
2026-04-13 15:46:52 +10:00