Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
@@ -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.
14 changes: 11 additions & 3 deletions src/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Loading