diff --git a/.Jules/palette.md b/.Jules/palette.md new file mode 100644 index 0000000..d2bd77d --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,3 @@ +## 2024-05-28 - Financial Input Tooltips +**Learning:** Users can misinterpret abstract financial inputs (like quantiles, basis points, or decimals) if they lack concrete examples. Providing explicit translations (e.g., "10 bps = 0.10%") in native tooltips drastically improves accessibility and prevents configuration errors. +**Action:** Always include a `help` argument with a concrete numerical example when building inputs for statistical parameters or fractional rates. diff --git a/src/dashboard.py b/src/dashboard.py index 4156c1d..f7555d2 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -170,7 +170,14 @@ def get_cache_key(*args) -> str: 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) + adv_pct = st.slider( + "ADV Participation %", + 0.01, + 0.30, + float(DEFAULT_ADV_PCT), + 0.01, + help="Target participation rate of Average Daily Volume (e.g., 0.10 = 10% of ADV).", + ) st.markdown("---") st.subheader("4. Research Rigor") @@ -185,12 +192,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="Top percentile defining the high volatility regime (e.g., 0.80 = top 20% 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="Estimated transaction cost 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")