From 2a7b34163452c169ccc443f810f698f94ac1c976 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 9 Apr 2026 02:57:11 +0000 Subject: [PATCH] Add help tooltip to Transaction Cost input - Added a tooltip to the Transaction Cost input explaining that 10 bps is 0.10% - Formatted the addition specifically so it adheres to Black formatting rules - Updated the `.Jules/palette.md` journal 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..af6b81f --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,3 @@ +## 2024-04-09 - Concrete Unit Conversions in Financial Inputs +**Learning:** Users can misinterpret unit inputs in financial applications (like basis points vs percentage). Tooltips with concrete examples reduce cognitive load and prevent input errors. +**Action:** When adding numeric inputs for domain-specific units (bps, bps/year), provide a concrete example conversion in the `help` tooltip parameter (e.g. `10 bps = 0.10%`). diff --git a/src/dashboard.py b/src/dashboard.py index 4156c1d..125c9fc 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="10 bps = 0.10%", + ) + / 10000 + ) allow_short = st.checkbox("Allow Short Selling?", value=False) else: st.subheader("5. Alert Thresholds")