From 359efbdfe99a74ee1a8e99a5dc28907acadfd98d Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 28 Mar 2026 03:08:35 +0000 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20helpful=20t?= =?UTF-8?q?ooltips=20to=20complex=20statistical=20parameters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: aarjava <218419324+aarjava@users.noreply.github.com> --- .Jules/palette.md | 4 ++++ src/dashboard.py | 44 +++++++++++++++++++++++++++++++++++++++----- 2 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 .Jules/palette.md diff --git a/.Jules/palette.md b/.Jules/palette.md new file mode 100644 index 0000000..77ebde8 --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,4 @@ + +## 2023-10-25 - Financial Metric Tooltips +**Learning:** Users often struggle with raw numerical inputs for statistical or financial parameters (like quantiles or basis points) without concrete examples. Adding native tooltips with explicit conversions clarifies expectations. +**Action:** Always include a `help` tooltip with a concrete example (e.g., "10 bps = 0.10%") for financial/statistical inputs in Streamlit widgets. diff --git a/src/dashboard.py b/src/dashboard.py index 4156c1d..f8feb21 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -168,9 +168,30 @@ def get_cache_key(*args) -> str: help="Lookback months for Momentum signal." ) else: - factor_window = st.slider("Factor Beta Window (days)", 20, 252, 63, 7) - vol_window = st.slider("Regime Vol Window (days)", 10, 60, 21, 5) - adv_pct = st.slider("ADV Participation %", 0.01, 0.30, float(DEFAULT_ADV_PCT), 0.01) + factor_window = st.slider( + "Factor Beta Window (days)", + 20, + 252, + 63, + 7, + help="Rolling window for calculating factor exposures (e.g., 63 days = ~3 months).", + ) + vol_window = st.slider( + "Regime Vol Window (days)", + 10, + 60, + 21, + 5, + help="Rolling window for calculating realized volatility (e.g., 21 days = ~1 month).", + ) + adv_pct = st.slider( + "ADV Participation %", + 0.01, + 0.30, + float(DEFAULT_ADV_PCT), + 0.01, + help="Assumed participation rate in Average Daily Volume for liquidity calculations (e.g., 0.10 = 10%).", + ) st.markdown("---") st.subheader("4. Research Rigor") @@ -185,12 +206,25 @@ def get_cache_key(*args) -> str: st.info("Using full-sample quantiles (exploratory mode)") vol_q_high = st.slider( - "High Volatility Quantile", 0.5, 0.95, DEFAULT_VOL_QUANTILE_HIGH, 0.05 + "High Volatility Quantile", + 0.5, + 0.95, + DEFAULT_VOL_QUANTILE_HIGH, + 0.05, + help="Quantile threshold defining the 'High' volatility regime (e.g., 0.75 = top 25% of volatility).", ) if mode == "Single-Asset": st.subheader("5. Backtest Settings") - bt_cost = st.number_input("Transaction Cost (bps)", value=DEFAULT_COST_BPS, step=1) / 10000 + bt_cost = ( + st.number_input( + "Transaction Cost (bps)", + value=DEFAULT_COST_BPS, + step=1, + help="Transaction cost per trade in basis points (e.g., 10 bps = 0.10%).", + ) + / 10000 + ) allow_short = st.checkbox("Allow Short Selling?", value=False) else: st.subheader("5. Alert Thresholds") From 17de8cab1e172c31e435e341657cb325a7aed2c6 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 28 Mar 2026 03:15:14 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20helpful=20t?= =?UTF-8?q?ooltips=20to=20complex=20statistical=20parameters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: aarjava <218419324+aarjava@users.noreply.github.com> --- src/dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dashboard.py b/src/dashboard.py index f8feb21..29fde1f 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -198,7 +198,7 @@ def get_cache_key(*args) -> str: use_oos = st.toggle( "Out-of-Sample Mode", value=False, - help="Uses expanding-window quantiles for regime classification to avoid look-ahead bias. Enable for rigorous backtesting." + help="Uses expanding-window quantiles for regime classification to avoid look-ahead bias. Enable for rigorous backtesting.", ) if use_oos: st.success("✓ Look-ahead bias removed") From ebe32c503162cc890701e12d69e4246069b11d4c Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 28 Mar 2026 03:22:33 +0000 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20helpful=20t?= =?UTF-8?q?ooltips=20to=20complex=20statistical=20parameters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: aarjava <218419324+aarjava@users.noreply.github.com> From 1c7c59b4b6ff130b20c8330b98488cf383800f19 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 28 Mar 2026 03:28:17 +0000 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20helpful=20t?= =?UTF-8?q?ooltips=20to=20complex=20statistical=20parameters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: aarjava <218419324+aarjava@users.noreply.github.com>