Personal quant system / Binance futures01

Quant Trading Framework

A local quant workbench where execution, risk, reporting, and research stay in one reproducible loop.

CTA模拟盘/实盘终端监控Redis 报告仓位风控回测研究

Quidem is not a generic PyPI package. It is a personal trading framework that organizes live or paper execution, terminal interaction, Redis status channels, email reports, exchange access, position risk, backtest research, and logs in one repository.

Quidem cover
ExchangeBinance
ModePaper / Live
State channelRedis
ResearchBacktest

/home/lry/Projects/PythonRepo/quidem

Pythonccxtwebsocket-clientpandasnumpyRedisResendmatplotlibseabornstatsmodelshmmlearnscikit-learn

01 / Execution core

Strategy code only decides whether to trade; the engine owns how trades are executed.

The core engine connects market data, strategy signals, risk checks, and order execution. bot.py drives exchange connection, historical warmup, realtime ticks, UI refresh, and heartbeat, while trader.py owns open and close actions, paper fills, fee estimation, position state, and trade journal pushes.

02 / Operating surface

A terminal-first interface keeps long-running trading visible without a web backend.

The TUI uses standard output, ANSI control sequences, colorama, and cross-platform keyboard input to show position direction, market state, key indicators, current price, floating PnL, open events, close events, errors, pause, resume, and exit controls.

03 / Risk and review

Redis reporting and backtests make trading behavior observable after the session ends.

Closed trades are queued in Redis for scheduled HTML mail reports, CSV attachments, equity curves, and archive files. Backtest modules reuse core strategy, indicator, and risk code, while HMM, clustering, BOCPD, and diagnostic replay scripts support research and post-loss analysis.
01

Binance Futures REST and WebSocket access are isolated behind ccxt and websocket-client adapters.

02

Paper mode records simulated orders without touching real exchange order endpoints.

03

Risk management covers order sizing, leverage, taker fee estimation, stop loss, take profit, cooldown, circuit breaking, breakeven protection, and trailing stops.

04

The report pipeline decouples the trading loop from email delivery through Redis, Resend, schedule, pandas, and matplotlib.

05

Backtest and diagnostics reuse core modules to avoid a hard split between research logic and live trading logic.