Skip to content

fix: BMSB native weekly SMA/EMA - #74

Merged
trsdn merged 1 commit into
mainfrom
fix/bmsb-weekly-native
Feb 13, 2026
Merged

fix: BMSB native weekly SMA/EMA#74
trsdn merged 1 commit into
mainfrom
fix/bmsb-weekly-native

Conversation

@trsdn

@trsdn trsdn commented Feb 13, 2026

Copy link
Copy Markdown
Owner

Fixes #73

Problem: BMSB used weekly_sma/weekly_ema which multiplied length × 5 to approximate weekly indicators on daily data. This produced wrong crossover signals (33 instead of 22) and SMA values diverging up to 5%.

Fix: Replace with plain sma(20)/ema(21). BMSB is a weekly-native strategy — run with --interval 1wk.

Results:

Timeframe Return Trades Sharpe
Weekly (fixed) 2,039% 10 0.68
Daily (was 289% with ×5 hack) 1,043% 88 0.55
Daily (old ×5 hack) 289% 16 0.31

All 128 tests pass.

The Bull Market Support Band indicator is designed for weekly candles.
The old weekly_sma/weekly_ema functions multiplied length by 5 to fake
weekly on daily data, producing different crossover signals (33 vs 22)
and SMA values diverging up to 5% from true weekly values.

Fix: replace with plain sma()/ema(), run on --interval 1wk.
Result: 2,039% on weekly BTC-USD (vs 289% with old daily hack).

Adds ema() indicator function, removes weekly_sma/weekly_ema.

Fixes #73
@trsdn
trsdn merged commit d0ec97e into main Feb 13, 2026
2 checks passed
@trsdn
trsdn deleted the fix/bmsb-weekly-native branch February 13, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix BMSB: use native SMA/EMA instead of daily *5 approximation

1 participant