KLAWTRADE
Rule-based strategies, 14-check risk management, and a real-time dashboard. Backtest on historical data, then deploy to any broker with one config change.
$ pip install klawtrade
$ klawtrade init --quick
$ klawtrade start
KlawTrade running | Dashboard: http://localhost:8080
Strategies: momentum, mean_reversion | Watchlist: 10 symbols
Everything you need to trade algorithmically
From strategy execution to risk management to backtesting — all in a single pip-installable package.
Rule-Based Strategies
Momentum and mean reversion strategies using SMA crossover, RSI, MACD, Bollinger Bands, and Stochastic RSI. No black-box ML.
14-Check Risk Gate
Every signal passes through position sizing, loss limits, drawdown protection, sector allocation, and correlation checks. No overrides.
7-Trigger Circuit Breaker
Automatic trading halt on consecutive losses, daily/weekly loss limits, max drawdown, VIX spikes, or system errors.
Historical Backtesting
Download market data, replay through strategies and risk management, get Sharpe ratio, win rate, drawdown, and full trade logs.
Real-Time Dashboard
Live equity curve, positions, trade log, and kill switch via WebSocket. See everything happening in real time at localhost:8080.
6 Broker Integrations
Connect to Alpaca, Interactive Brokers, Coinbase, Binance, Kraken, or Tradier. Works in simulation without keys.
Monitor everything in real time
WebSocket-powered updates stream every position, trade, and risk metric to your browser the instant they happen. Zero refresh. Zero delay.
Portfolio Value
0
+4.22%
Day P&L
0
+0.37%
Open Positions
0
4 of 10 max
Circuit Breaker
--
All systems nominal
Equity Curve
Open Positions
4/10Recent Trades
| Time | Symbol | Side | Qty | Price | Strategy | Status |
|---|---|---|---|---|---|---|
| 09:42:13 | NVDA | BUY | 8 | $875.10 | momentum | Filled |
| 09:38:07 | AAPL | BUY | 15 | $178.42 | mean_rev | Filled |
| 09:35:22 | TSLA | SELL | 10 | $241.88 | momentum | Filled |
| 09:31:45 | MSFT | BUY | 12 | $415.33 | pairs | Filled |
| 09:30:02 | GOOGL | BUY | 6 | $156.72 | breakout | Filled |
Dashboard mockup is illustrative. The real dashboard updates via WebSocket in real time.
Test before you trade
Replay your strategies against real market data. Evaluate risk-adjusted performance before committing capital.
Total Return
+0.00%
Sharpe Ratio
0.000
Max Drawdown
−0.00%
Win Rate
0.0%
Profit Factor
0.000
Total Trades
0
Avg Hold
0.0 days
Exposure
0.0%
Sample output is illustrative. Actual results depend on market conditions and configuration.
Up and running in 3 steps
Open Source
Built in the open.
MIT licensed.
KlawTrade is fully open source. Inspect every line of code that touches your money. Contribute strategies, fix bugs, or fork it and make it your own. No black boxes, no vendor lock-in.