diff --git a/.Jules/palette.md b/.Jules/palette.md new file mode 100644 index 0000000..9b69c12 --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,3 @@ +## 2024-05-18 - Tooltips with Concrete Examples +**Learning:** Adding concrete examples to statistical and financial parameters (like basis points or volatility quantiles) significantly reduces user cognitive load and clarifies abstract inputs. +**Action:** Always include a `help` tooltip with a clear, concrete example ("e.g., 10 bps = 0.10%") when implementing numerical inputs for abstract financial concepts in the design system. diff --git a/src/dashboard.py b/src/dashboard.py index 4156c1d..5d13c3f 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -190,12 +190,20 @@ def get_cache_key(*args) -> str: 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="e.g., 10 bps = 0.10% per trade" + ) + / 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) + dd_alert = st.slider("Max Drawdown Alert", -0.6, -0.05, -0.2, 0.05, help="e.g., -0.2 = -20% max DD") + vol_alert = st.slider("Volatility Alert (ann.)", 0.1, 1.0, 0.35, 0.05, help="e.g., 0.35 = 35% annualized volatility") 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)