Skip to main content

A high-performance terminal-native crypto signal scanner with live Z-score analytics, DEAP-based RL tuning, and automated backtesting.

Project description

cb-signalTUI

Build

A quant-grade, terminal-native crypto signal scanner with DEAP-powered optimization, Z-score fusion, and historical backtesting.


๐Ÿš€ Features

  • ๐Ÿ” Real-Time Cryptocurrency Scanning โ€” Parallel async fetches across 20+ pairs using aiohttp
  • ๐Ÿ“ˆ Advanced Technical Signal Fusion โ€” EMA spreads, Z-score, Savitzky-Golay slope, RSI, and volatility scoring
  • ๐Ÿงฌ DEAP-based Z-threshold Optimization โ€” Learns optimal Z-score thresholds per asset in real-time
  • ๐Ÿง  Strategy Classification โ€” Categorizes signals as momentum, reversal, or neutral
  • ๐Ÿ–ฅ๏ธ Rich Terminal UI โ€” Color-coded TUI with auto-refresh and table output
  • ๐Ÿ—ฃ๏ธ Voice Alerts โ€” pyttsx3-based text-to-speech for high-confidence signal calls
  • ๐Ÿงช Backtesting โ€” Simulates signal accuracy, Sharpe ratio, and expectancy over future price lookahead
  • ๐Ÿ“‚ SQLite Logging โ€” All signals stored with timestamp, price, z-score, strategy, and confidence
  • ๐Ÿ”ง Modular Design โ€” Includes scanner, indicators, RL tuner, backtest logic, and environment config
  • ๐Ÿ” Build Pipeline โ€” Auto-commits artifacts to /built/, publishes releases, and tags by version

๐Ÿงฑ Project Structure

cb-signalTUI/
โ”œโ”€โ”€ cb_signal_tui/             # Main package directory
โ”‚   โ”œโ”€โ”€ __init__.py            # Version + API exports
โ”‚   โ”œโ”€โ”€ __main__.py            # Entry point CLI: scan or backtest
โ”‚   โ”œโ”€โ”€ scanner.py             # Async candle fetcher, signal emitter, DB logger
โ”‚   โ”œโ”€โ”€ indicators.py          # EMA, Z, RSI, slope, volatility logic
โ”‚   โ”œโ”€โ”€ ga_optimizer.py        # DEAP-powered genetic tuning
โ”‚   โ”œโ”€โ”€ backtest.py            # PnL, accuracy, Sharpe eval
โ”‚   โ”œโ”€โ”€ config.py              # ENV overrides and signal parameters
โ”‚   โ””โ”€โ”€ utils.py               # Alerting, logging, RSI, classification
โ”‚
โ”œโ”€โ”€ .github/workflows/build.yml  # GitHub Actions CI/CD
โ”œโ”€โ”€ pyproject.toml               # Build/packaging metadata
โ”œโ”€โ”€ requirements.txt             # Dependencies
โ”œโ”€โ”€ LICENSE                      # BSD-3-Clause License
โ”œโ”€โ”€ README.md                    # This file
โ””โ”€โ”€ signals.db                   # SQLite runtime database (ignored by .git)

๐Ÿ› ๏ธ Installation

git clone https://github.com/LoQiseaking69/Cb-signalTUI.git
cd Cb-signalTUI
pip install -r requirements.txt

To install from built artifacts:

pip install ./built/cb_signal_tui-*.whl

๐Ÿšฆ Usage

Run the live scanner:

cb-signal-tui

Run the backtester:

cb-signal-tui --backtest

To export results:

cb-signal-tui --backtest --export

โš™๏ธ Configuration

Settings are located in config.py and respect ENV overrides:

  • PRODUCTS: List of asset pairs
  • SETTINGS: EMA spans and Z thresholds per asset
  • Z_SCORE_WINDOW, VOLATILITY_THRESHOLD, FLAT_SLOPE_THRESHOLD: Signal tuning
  • STRATEGY_FILTER: Types to allow in scanner (e.g., momentum, reversal)
  • ALERT_CONFIDENCE_THRESHOLD: Alert trigger level
  • REFRESH_INTERVAL: Terminal UI refresh rate
  • GRANULARITY: Candle resolution (Coinbase granularity)

๐Ÿงช Backtesting

Evaluates signal outcome 20 minutes into the future:

cb-signal-tui --backtest

Outputs:

Backtest Accuracy: 83.45% | Sharpe: 1.823 | Expectancy: 0.0027 | Win Rate: 84.12%

๐Ÿ—„๏ธ SQLite Signal Schema

CREATE TABLE signals (
    timestamp TEXT,
    asset TEXT,
    price REAL,
    z_score REAL,
    signal TEXT,
    confidence REAL,
    strategy TEXT
);

๐Ÿ–ผ๏ธ Terminal Example

img


๐Ÿค Contributing

  1. Fork this repository
  2. Create a branch: git checkout -b feature-x
  3. Commit your changes
  4. Open a PR

Built for precision. Tuned for performance. Stay ahead of the market.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cb_signal_tui-1.4.0.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cb_signal_tui-1.4.0-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file cb_signal_tui-1.4.0.tar.gz.

File metadata

  • Download URL: cb_signal_tui-1.4.0.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for cb_signal_tui-1.4.0.tar.gz
Algorithm Hash digest
SHA256 fce9a2970969df3f5cd00e2b55fd7b6489a08245bc44f7754c4544ca08fadd22
MD5 94dd088f03a52c2f6eee52023f536cc6
BLAKE2b-256 9840b2bd99f020d80560d96db1225692f3523213634b4fc87b05c06f6ed92cfa

See more details on using hashes here.

File details

Details for the file cb_signal_tui-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: cb_signal_tui-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for cb_signal_tui-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cfa9e23581f72f6e037f1d070f4039111ed587c897c967b5f68fc5bbc77b222a
MD5 27ceefe83fa7e453a607a0532c7d8e35
BLAKE2b-256 21e891e354a81c04c988e8ea75fef5bd577ac2f3162c16cb077e62db779aeaa9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page