From 43bb4c38b21c31d74d55272765c4d1a3b5466d08 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 29 Mar 2026 03:08:02 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20tooltips=20?= =?UTF-8?q?to=20financial=20parameters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 💡 What: Added `help` tooltips with concrete examples to statistical and financial input widgets (e.g., quantiles, basis points) in `src/dashboard.py`. 🎯 Why: In quantitative dashboards, users often struggle with abstract financial or statistical inputs. Providing concrete examples (e.g., '10 bps = 0.10%') directly in the UI makes the interface significantly more intuitive and user-friendly without altering the core layout. ♿ Accessibility: Provides essential context and guidance for abstract parameters, improving overall usability and cognitive accessibility. Co-authored-by: aarjava <218419324+aarjava@users.noreply.github.com> --- .Jules/palette.md | 3 +++ src/dashboard.py | 44 +++++++++++++++++++++++++++++++++++++++----- 2 files changed, 42 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..2ace62b --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,3 @@ +## 2024-10-24 - Tooltips with Concrete Financial Examples +**Learning:** In quantitative dashboards, users often struggle with abstract financial or statistical inputs (like basis points, quantiles, or volume percentages). Providing just the parameter name is insufficient. +**Action:** Always include a `help` parameter on statistical or financial input widgets (e.g., `st.slider`, `st.number_input`) that provides a concrete, easy-to-understand example of what the value means in practice (e.g., "10 bps = 0.10%"). diff --git a/src/dashboard.py b/src/dashboard.py index 4156c1d..1993d09 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="Lookback window for factor beta calculation (e.g., 63 days = 3 months).", + ) + vol_window = st.slider( + "Regime Vol Window (days)", + 10, + 60, + 21, + 5, + help="Lookback window for realized volatility calculation (e.g., 21 days = 1 month).", + ) + adv_pct = st.slider( + "ADV Participation %", + 0.01, + 0.30, + float(DEFAULT_ADV_PCT), + 0.01, + help="Max percentage of Average Daily Volume to trade (e.g., 0.10 = 10% of ADV).", + ) 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="Threshold for 'High Volatility' regime (e.g., 0.75 = top 25% 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") From a9b73d205dbfa2360a7692ae7a29ecfbedc08698 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 29 Mar 2026 03:12:36 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20tooltips=20?= =?UTF-8?q?to=20financial=20parameters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 💡 What: Added `help` tooltips with concrete examples to statistical and financial input widgets (e.g., quantiles, basis points) in `src/dashboard.py`. 🎯 Why: In quantitative dashboards, users often struggle with abstract financial or statistical inputs. Providing concrete examples (e.g., '10 bps = 0.10%') directly in the UI makes the interface significantly more intuitive and user-friendly without altering the core layout. ♿ Accessibility: Provides essential context and guidance for abstract parameters, improving overall usability and cognitive accessibility. Note: Pre-existing global Black formatting violations in the baseline repository caused a CI linting failure. The code modified in this PR is cleanly formatted and verified via `black --diff`, and all tests pass. No global formatting fixes were applied to avoid polluting the PR scope. Co-authored-by: aarjava <218419324+aarjava@users.noreply.github.com> From 903270537d84ba72bd54f30cebbe84b3bf44ea68 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 29 Mar 2026 03:16:07 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20tooltips=20?= =?UTF-8?q?to=20financial=20parameters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 💡 What: Added `help` tooltips with concrete examples to statistical and financial input widgets (e.g., quantiles, basis points) in `src/dashboard.py`. 🎯 Why: In quantitative dashboards, users often struggle with abstract financial or statistical inputs. Providing concrete examples (e.g., '10 bps = 0.10%') directly in the UI makes the interface significantly more intuitive and user-friendly without altering the core layout. ♿ Accessibility: Provides essential context and guidance for abstract parameters, improving overall usability and cognitive accessibility. Note: Pre-existing global Black formatting violations in the baseline repository caused a CI linting failure. The code modified in this PR is cleanly formatted and verified via `black --diff`, and all tests pass. No global formatting fixes were applied to avoid polluting the PR scope. Co-authored-by: aarjava <218419324+aarjava@users.noreply.github.com>