From 42b314a57c3b80d9602afd6044c49e0da315e125 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 03:07:13 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20concrete=20tool?= =?UTF-8?q?tip=20to=20Transaction=20Cost=20input?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 💡 What: Added a helpful tooltip explaining "bps" with a concrete mathematical example. 🎯 Why: Users can find financial jargon like basis points (bps) ambiguous. Providing a concrete example ("10 bps = 0.10%") clarifies the input and reduces configuration errors. ♿ Accessibility: Improves cognitive accessibility by clearly defining abstract units inline via Streamlit's native tooltip support. Co-authored-by: aarjava <218419324+aarjava@users.noreply.github.com> --- .Jules/palette.md | 3 +++ src/dashboard.py | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .Jules/palette.md diff --git a/.Jules/palette.md b/.Jules/palette.md new file mode 100644 index 0000000..47b0b53 --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,3 @@ +## 2025-01-20 - Concrete Tooltips for Financial Parameters +**Learning:** Users can find statistical and financial parameters (like bps or quantiles) ambiguous. Adding a tooltip with a concrete example (like "10 bps = 0.10%") significantly improves clarity and prevents configuration errors. +**Action:** Always include concrete mathematical examples in tooltips for inputs that represent abstract financial units (e.g., bps, beta, quantiles). diff --git a/src/dashboard.py b/src/dashboard.py index 4156c1d..10c0584 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -190,7 +190,15 @@ 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="Transaction cost applied per trade (e.g., 10 bps = 0.10%).", + ) + / 10000 + ) allow_short = st.checkbox("Allow Short Selling?", value=False) else: st.subheader("5. Alert Thresholds")