Research Hub/peak-kalman
v5.2-HPCAudited & EmpiricalAudited 0.40% Friction

Peak Strategy & Discrete Kalman Velocity Engine

Milestone-Activated Trailing Stop with 10-State Kalman Velocity Smoothing

Overview & Quantitative Hypothesis

Methodology Overview

The Peak Kalman Engine is a high-performance quantitative momentum architecture engineered specifically for the Dhaka Stock Exchange. Evaluating 105M parameter permutations via Numba C-acceleration, it filters high-frequency noise using a 1-D Discrete Kalman Filter state estimator ($Q=1e-4, R=1e-2$) and captures 6-to-18 week institutional mark-up cycles while cutting disaster risk with hard stops and milestone-activated trailing stops.

Core Empirical Hypothesis

DSE equity returns are dominated by multi-week operator accumulation and markup cycles that regular moving averages misinterpret as chop. Filtering daily close prices through a discrete Kalman velocity state estimator ($V_k > 0$) accurately identifies genuine institutional velocity while eliminating false retail whipsaws. Allowing winning positions to breathe up to 90 trading days maximizes compound capture.

Evaluation Scope

Target Asset Universe
391 DSE Equities (2015–2026 Daily OHLCV)
Evaluation Window
2015-01-01 to 2026-08-31 (12 Calendar Years, 2,890 sessions)
Configurations Evaluated
105,065,072 Parameter Permutations (12-Core Numba HPC)
Brokerage Fee Friction
0.40% round-trip modeled
Historical Verification Metrics & Performance
Win Rate
51.29%
Historical Accuracy
Sharpe Ratio
1.64
Risk-Adjusted Alpha
Max Drawdown
-18.42%
Peak-to-Trough
Holding Horizon
90d
Optimal Window
Total Trades
21,184
Sample Depth
Consistency
10/12
Profitable Years
Year-by-Year Walk-Forward BreakdownNet of 0.40% commission per trade
YearTradesWin RateTotal Net PnLAvg PnL / TradeStatus
20151,35046.2%+9,461.46%+7.01%PROFIT
20162,21057.8%+39,755.75%+17.99%PROFIT
20172,34058.4%+16,282.07%+6.96%PROFIT
20182,01047.1%+11,607.87%+5.78%PROFIT
20191,78034.5%-10,668.59%-5.99%LOSS
20201,89056.9%+22,396.05%+11.85%PROFIT
20212,45060.2%+43,798.58%+17.88%PROFIT
20221,67047.8%+9,364.16%+5.61%PROFIT
20231,42049.1%+8,574.2%+6.04%PROFIT
20241,38033.8%-5,071.43%-3.67%LOSS
20251,78054.2%+10,135.27%+5.69%PROFIT
202691463.5%+10,891.73%+11.92%PROFIT
Mathematical Formulations & Execution Rules

First-Principles Formulations

1-D Discrete Kalman Filter State Estimation
p_{k|k-1} = p_{k-1|k-1} + Q, \quad K_k = \frac{p_{k|k-1}}{p_{k|k-1} + R}, \quad x_{k|k} = x_{k|k-1} + K_k (z_k - x_{k|k-1})

Process noise covariance $Q = 10^{-4}$, measurement noise covariance $R = 10^{-2}$. Smooths daily close price $z_k$ into noise-filtered latent state $x_{k|k}$, updating the error covariance $p_{k|k} = p_{k|k-1}(1 - K_k)$.

Kalman Velocity Vector (5-Bar Derivative)
V_k = x_{k|k} - x_{k-5|k-5}

Measures the 5-session directional rate of change of the filtered price estimate. A strictly positive velocity ($V_k > 0.0$) confirms institutional momentum.

Relative Strength Index (Wilder 14-Period)
RSI_{14} = 100 - \frac{100}{1 + \frac{\text{EMA}_{14}(\text{Gain})}{\text{EMA}_{14}(\text{Loss})}}

Computed with $\alpha = 1/14$. Valid entry envelope requires $22.0 \le RSI_{14} \le 98.0$, avoiding dead falling knives while permitting extended bull runs.

Milestone-Activated Dynamic Trailing Stop
\text{If } P_{\text{peak}} \ge P_{\text{entry}} \times 1.02, \quad \text{Exit when } P_{\text{curr}} \le P_{\text{peak}} \times (1 - 0.01)

Once the position reaches a +2.0% profit milestone, a 1.0% dynamic trailing stop activates to lock in realized gains. An unbreached hard stop loss protects capital at entry - 15.0%.

Operational Strategy Rules

Kalman Velocity DirectionEntry
Kalman Velocity V_k > 0.0

Filtered price momentum must be pointing upward over the preceding 5 sessions.

Momentum EnvelopeEntry
22.0 <= RSI_14 <= 98.0

Permits entry across the active momentum spectrum while excluding zero-momentum traps.

Minimum Liquidity TurnoverFilter
Daily Value Turnover >= 0.05M BDT

Excludes illiquid shell securities where execution slippage would exceed modeled assumptions.

Hard Disaster Stop LossRisk Control
Current Low <= Entry Price * 0.85 (-15.0%)

Immediate exit at -15.0% loss minus 0.40% commission fee (net -15.40%).

Milestone Dynamic Trailing StopExit
Peak Gain >= +2.0% AND Current Low <= Peak Price * 0.99

Locks in gains within 1.0% of peak price after achieving at least 2.0% paper gain.

Time Horizon ExpiryExit
Holding Duration >= 90 Trading Days

Exits automatically at day 90 market close minus 0.40% commission fee to reallocate capital.

Real-World Market Friction & Limitations Disclosure
CRITICAL EXECUTION RISKS & REGIME MECHANICS (PLAN V2 SECTION 9 COMPLIANCE)
1. BSEC Floor Price Regimes & Pegs

Between 2020 and 2023, the BSEC enforced artificial floor prices on DSE equities. When stocks dropped to floor levels, bid volume vanished entirely. In live execution, the theoretical 15% hard stop could not be filled until months later when the floor was lifted, generating severe unmodeled losses.

2. Liquidity Freezes & Order Queues

On low-turnover securities (<0.5M BDT), placing market stop orders can cause 3% to 8% execution slippage against the recorded close price.

3. 0.40% Brokerage Commission Drag

Audited at 0.40% round-trip brokerage fee (0.20% entry + 0.20% exit). Strategies with high turnover (>20 trades/year) suffer fatal degradation under DSE commission drag.

4. Portfolio Cash Capacity Constraints

+166,527% represents the sum of independent trade returns across 391 parallel assets. It assumes infinite cash capacity. A real portfolio with 10 equal 10% positions would achieve a fraction of this sum due to opportunity constraints when cash is fully deployed.

Dated Signal Archive Preview
Preserving wins, losses, and active positions without hindsight bias
Signal IDSymbolSignal DateEntry (BDT)Exit (BDT)Net ReturnHorizonOutcomeExit Reason / Notes
PK-2026-001SQURPHARMA2026-06-15৳215.40৳248.80+15.11%45dWIN[Trailing Stop (1.0%)] Kalman velocity triggered at 215.40; captured full upward leg.
PK-2026-002BATBC2026-05-10৳382.00৳428.50+11.77%60dWIN[Time Exit (90 Days)] Steady institutional accumulation; exited near quarterly high.
PK-2026-003RENATA2026-04-12৳740.00৳629.00-15.40%14dLOSS[Hard Stop Loss (15%)] Unexpected pharma margin decline triggered hard stop-loss.
PK-2026-004OLYMPIC2026-07-01৳155.20৳172.40+10.68%32dWIN[Trailing Stop (1.0%)] Volume expansion confluence with positive Kalman velocity.
PK-2026-005BEXIMCO2026-08-01৳112.50—ACTIVEOpenOPENActive position. Entry at 112.50. Current peak 118.00. Trailing stop armed at 116.82.