Backtesting In-memory backtester with Plotly reports
BacktestConfig sets initial capital and transaction fees. The Backtester runs against historical OHLCV from Bybit and returns total return, win rate, and max drawdown alongside interactive Plotly reports — the honest go/no-go signal before anything runs live.
Strategies Four built-in strategies, one base class
Wavelet Reversal (Daubechies decomposition), MA Crossover, RSI, and Bollinger Bands ship in the box. Custom strategies subclass BaseStrategy and register via strategy_registry — the same interface used for backtests and live trading, so what you test is what you run.
Execution Live trading on Bybit spot
Position tracking and risk management plug into the same strategy interface used for backtests. Live keys are configured via BYBIT_API_KEY / BYBIT_API_SECRET, with a BYBIT_TESTNET flag for staging against testnet first.
Architecture NNG service bus, FastAPI REST, Vue 3 dashboard
Data, backtest, and strategy services talk to the API over an NNG message bus. A FastAPI backend exposes /backtests, /jobs, /strategies, /execution. A Vue 3 frontend handles monitoring and portfolio views.
API A surface a person, a cron job, or an agent can drive
Every action available in the dashboard is available over REST plus a WebSocket event stream — job.created, job.completed, job.failed, trade.entered, trade.exited, signal.generated at ws://localhost:8000/api/ws/events. Schedule a backtest, request a signal, place an order, and subscribe to fills: enough to close the loop from a scheduler or an autonomous agent.
Deployment One small VPS, docker-compose on day one
Clone, copy .env.example to .env, fill in API credentials, run docker-compose up -d. The NNG bus is in-process IPC and default persistence is SQLite — no broker or cluster to rent, so a single small VPS is the cheapest path to a running instance. Logs stream from the api container.