From 2bb9f8fee77fa169319311e6680c0299215c7ade Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 5 Apr 2026 02:49:27 +0000 Subject: [PATCH] feat: Add tooltips with examples to statistical parameters Adds descriptive `help` parameters containing concrete examples (e.g. '10 bps = 0.10%') to abstract statistical and financial inputs in the sidebar. This improves accessibility and comprehension for users interacting with complex domain terminology. Co-authored-by: aarjava <218419324+aarjava@users.noreply.github.com> --- .Jules/palette.md | 3 +++ src/dashboard.py | 29 ++++++++++++++++++++++++----- 2 files changed, 27 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..ab46542 --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,3 @@ +## 2024-04-05 - Add tooltips with concrete examples to statistical and financial parameters +**Learning:** Users often struggle with statistical/financial parameters like "quantiles", "basis points", or "ADV" unless concrete examples are provided in tooltips to map the abstract concept to a real-world value (e.g. 10 bps = 0.10%). +**Action:** Always include concrete examples in tooltips for statistical and financial parameters across all UI forms and dashboards to improve accessibility and comprehension. diff --git a/src/dashboard.py b/src/dashboard.py index 4156c1d..1b06079 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -168,9 +168,15 @@ 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="Lookback window for beta calculations (e.g., 63 days = 3 months)." + ) + vol_window = st.slider( + "Regime Vol Window (days)", 10, 60, 21, 5, help="Lookback window for volatility calculations (e.g., 21 days = 1 month)." + ) + adv_pct = st.slider( + "ADV Participation %", 0.01, 0.30, float(DEFAULT_ADV_PCT), 0.01, help="Max participation in Average Daily Volume (e.g., 0.10 = 10% of ADV)." + ) st.markdown("---") st.subheader("4. Research Rigor") @@ -185,12 +191,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="Threshold for identifying high volatility regimes (e.g., 0.80 = top 20% most volatile days).", ) 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="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")