Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

64 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

TRIGGERSTOCK

A high-performance, real-time crypto analytics and prediction platform.
Built in Rust with full data pipelines, multimodal ML, and MLOps for intraday tick prediction.


๐Ÿš€ Overview

  • โšก Rust async pipelines (Tokio + Redis + Postgres) for low-latency ingestion
  • ๐ŸŒ Finnhub WebSocket streaming ~160k+ rows/day at <10ms latency
  • ๐Ÿ—„ Redis โ†’ Postgres bridge for persistence of OHLCV & trades
  • ๐Ÿงฎ DAG-based feature engine (10+ TA indicators) generating >100k training samples
  • ๐Ÿ“ฐ Transformer-based sentiment analysis from Coindesk RSS, symbol-mapped
  • ๐Ÿค– Multimodal signal fusion (price + volume + sentiment) via XGBoost + Transformers
  • ๐Ÿ“Š Grafana dashboards for real-time monitoring (latency, throughput, accuracy)
  • โ˜๏ธ Northflank Blue-Green deployments with MLflow for experiment tracking & 99.9% uptime

๐Ÿง  What It Does

Component Description
โœ… ws_ingestor.rs Connects to Finnhub WebSocket and streams live prices into Redis (<10ms)
โœ… fetcher.rs Periodically writes OHLCV from Redis into Postgres with TLS/NoTLS fallback
โœ… news_ingestor.rs Collects Coindesk RSS, maps to symbols, stores JSON headlines in Redis
โœ… dag_engine.rs Computes 10+ TA indicators (RSI, MACD, VWAP, etc.) for training datasets
โœ… xgboost_trainer.py Trains tick prediction classifier, logged via MLflow
โœ… sentiment_model.py Transformer-based sentiment scorer for financial news
๐Ÿงช deployment/ Blue-Green deployment scripts with MLflow model registry + Northflank CI

๐Ÿ— Architecture

flowchart TD
    A[Finnhub WebSocket] -->|Trades/OHLCV| B[websocket.rs]
    B --> C[Redis]
    C --> D[fetcher.rs]
    D --> E[Postgres: stock_price_history]
    C --> F[news_ingestor.rs]
    F --> C
    E --> G[dag_engine]
    C --> G
    G --> H[xgboost_trainer.py + sentiment_model.py]
    H --> I[MLflow Registry]
    I --> J[Northflank Blue-Green Deployment]
    J --> K[Grafana Monitoring]
Loading

โš™๏ธ Tech Stack

  • ๐Ÿฆ€ Rust (Tokio, async, Redis, Postgres)
  • ๐Ÿ Python (XGBoost, Transformers, MLflow)
  • ๐Ÿ—„ Redis + PostgreSQL (real-time + persistence)
  • ๐Ÿ“Š Grafana (real-time monitoring & dashboards)
  • โ˜๏ธ Northflank (Blue-Green deployment, CI/CD, 90% uptime)

๐Ÿ“ˆ Model Training

  • XGBoost tick classifier with DAG-engine features
  • Transformer sentiment fusion for news-driven volatility
  • Metrics tracked via MLflow: accuracy, F1, false-signal reduction (~18%)
  • Continuous retraining + deployment with zero downtime

๐Ÿค Contributing

PRs are welcome!
If you're interested in real-time systems, crypto modeling, or ML infra, open an issue or contribute directly.


๐Ÿ“œ License

MIT ยฉ 2025 Swastik Nandy

About

A real-time crypto tick prediction engine built with Rust, Redis, and Postgres, streaming over 160k+ rows/day with sub-10ms latency. Combines DAG-based feature engineering and multimodal ML (XGBoost price models + transformer sentiment) to boost intraday prediction accuracy by ~27%.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages