From 9b56907db560fff5880ea7131bd52e8f642de5ed Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2026 03:03:05 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20help=20tool?= =?UTF-8?q?tips=20to=20financial=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 | 7 +++++ src/dashboard.py | 80 +++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 78 insertions(+), 9 deletions(-) create mode 100644 .Jules/palette.md diff --git a/.Jules/palette.md b/.Jules/palette.md new file mode 100644 index 0000000..f035ca1 --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,7 @@ +## 2024-03-26 - Initial Setup +**Learning:** Initializing palette journal. +**Action:** Ready to track critical UX learnings. + +## 2024-03-26 - Tooltips for Financial Parameters +**Learning:** Users need concrete examples for statistical inputs like basis points and percentiles to ensure accurate data entry. +**Action:** Always include help tooltips with concrete examples (e.g., '10 bps = 0.10%') on financial parameter inputs. diff --git a/src/dashboard.py b/src/dashboard.py index 4156c1d..a561f09 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 (days) to calculate factor betas (e.g., 63 days = ~3 months).", + ) + vol_window = st.slider( + "Regime Vol Window (days)", + 10, + 60, + 21, + 5, + help="Rolling window (days) to measure historical volatility (e.g., 21 days = ~1 month).", + ) + adv_pct = st.slider( + "ADV Participation %", + 0.01, + 0.30, + float(DEFAULT_ADV_PCT), + 0.01, + help="Maximum daily trading volume participation (e.g., 0.10 = 10% of ADV).", + ) st.markdown("---") st.subheader("4. Research Rigor") @@ -185,19 +206,60 @@ 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="Percentile threshold to classify high volatility regimes (e.g., 0.75 = top 25%).", ) 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") - dd_alert = st.slider("Max Drawdown Alert", -0.6, -0.05, -0.2, 0.05) - vol_alert = st.slider("Volatility Alert (ann.)", 0.1, 1.0, 0.35, 0.05) - beta_alert = st.slider("Beta Alert", 0.5, 2.0, 1.3, 0.1) - dttl_alert = st.slider("Days-to-Liquidate Alert", 1.0, 20.0, 5.0, 1.0) + dd_alert = st.slider( + "Max Drawdown Alert", + -0.6, + -0.05, + -0.2, + 0.05, + help="Trigger alert if current drawdown exceeds this threshold (e.g., -0.2 = 20% loss).", + ) + vol_alert = st.slider( + "Volatility Alert (ann.)", + 0.1, + 1.0, + 0.35, + 0.05, + help="Trigger alert if annualized volatility exceeds this threshold (e.g., 0.35 = 35% ann. vol).", + ) + beta_alert = st.slider( + "Beta Alert", + 0.5, + 2.0, + 1.3, + 0.1, + help="Trigger alert if factor beta exposure exceeds this threshold (e.g., 1.3 = 30% more volatile than factor).", + ) + dttl_alert = st.slider( + "Days-to-Liquidate Alert", + 1.0, + 20.0, + 5.0, + 1.0, + help="Trigger alert if days to liquidate position exceeds this threshold (e.g., 5.0 = 5 days of trading).", + ) # --- Portfolio Mode --- From 7b577c9b04796b96ecbcc79c1abaea8c19cfbdf9 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2026 03:15:38 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20help=20tool?= =?UTF-8?q?tips=20to=20financial=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>