Quick Start Β· Desktop App Β· CLI Β· Patterns Β· ML Β· Docs
Warning
Educational and research use only. CryptVault is not financial advice and must not be used for live trading decisions. Past performance does not guarantee future results. You are solely responsible for any investment outcomes.
CryptVault is a research-grade analysis platform for crypto and equities that combines:
- π₯οΈ A native desktop terminal with candlestick charts, drawn pattern overlays, and ML predictions side-by-side.
- π§ A production ML ensemble (67+ engineered features, validation-weighted stacking) achieving 1.6β2.4% MAPE on major pairs.
- π 50+ classical patterns across 7 categories β all drawn as actual geometric shapes, not just markers.
- π€ Reinforcement-learning agents (DQN, PPO, Transformer) for trading research.
- π οΈ A clean Python API, CLI, and portfolio tools.
| Area | What's new |
|---|---|
| CI/CD | Ruff-first lint pipeline, zero-flake rules, faster parallel tests (pytest -n auto). |
| Code quality | Fixed latent F821 / F402 bugs; project is now ruff-clean. |
| README & docs | Scannable layout, badge row, pattern quick reference, one-page install. |
| Pattern rendering | Double Top/Bottom, H&S, Triangles, Wedges drawn as lines/necklines on chart. |
| Desktop UX | Analysis panel always visible; no stale tabs; cleaner indicator stack. |
Full history: docs/CHANGELOG.md.
git clone https://github.com/MeridianAlgo/Cryptvault.git
cd Cryptvault
pip install -r requirements.txtVerify:
python -c "import cryptvault; print(cryptvault.__version__)"Run the desktop terminal:
python launch_desktop.pyA dark-themed trading terminal with three synchronized surfaces β chart, patterns, and ML.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CryptVault 6.1 [BTC-USD] [Analyze] 1D 5D 1M 3M 6M 1Y YTD β
ββββββββββββββ¬βββββββββββββββββββββββββββββββββββ¬βββββββββββββββββ€
β β β ML PREDICTION β
β Chart β π Candlestick + Patterns β ββββββββββββ β
β β π Bollinger Bands β β
β Analysis β π Volume Β· RSI β DETECTED β
β β β PATTERNS β
β History β (pattern shapes drawn live) β (scrollable) β
ββββββββββββββ΄βββββββββββββββββββββββββββββββββββ΄βββββββββββββββββ€
β Status: connected Β· last fetch 2s Β· 120 candles Β· 12 patterns β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Pattern | Rendered as |
|---|---|
| Double Top / Bottom | Peak-to-peak line + dashed neckline |
| Head & Shoulders | LS β Head β RS connectors + neckline |
| Triple Top / Bottom | Three-pivot polyline |
| Triangles (Sym/Asc/Desc) | Fitted upper + lower trendlines |
| Rising / Falling Wedge | Converging trendlines |
| Any pattern with target | Dotted horizontal target line |
| Candlestick | β² bullish / βΌ bearish marker |
See docs/DESKTOP_APP.md.
# Analyze Bitcoin with chart
python cryptvault_cli.py BTC 60 1d
# Save chart to file
python cryptvault_cli.py ETH 120 1d --save-chart eth.png
# Text-only analysis
python cryptvault_cli.py SOL 90 1d --no-chart
# Portfolio
python cryptvault_cli.py --portfolio BTC:0.5 ETH:10 SOL:50
# Compare assets
python cryptvault_cli.py --compare BTC ETH SOL
# Interactive REPL
python cryptvault_cli.py --interactivepython cryptvault_cli.py SYMBOL [DAYS] [INTERVAL] [OPTIONS]
| Option | Description |
|---|---|
--no-chart |
Text-only output |
--save-chart FILE |
Save chart as PNG |
--verbose |
Detailed diagnostics |
--desktop |
Launch desktop app |
--portfolio A:X B:Y ... |
Portfolio analysis |
--compare S1 S2 ... |
Side-by-side comparison |
--interactive |
REPL mode |
--status |
API & data source health |
--demo |
Run demonstration dataset |
--version / --help |
Info |
50+ classical patterns across 7 categories. Full reference: docs/PATTERNS.md.
Reversal (8) β Head & Shoulders, Inverse H&S, Double/Triple Top & Bottom, Rising/Falling Wedge
Detected via local pivot extraction, neckline fitting, and symmetry scoring. Drawn with the actual peak/trough connectors plus a dashed neckline and projected target.
Continuation β Triangles (Sym/Asc/Desc), Bull/Bear Flag, Pennants, Cup & Handle
Trendline regression on swing highs and swing lows; convergence and slope tests determine the sub-type. Targets projected from breakout range.
Candlestick β Doji (3 variants), Hammer, Hanging Man, Inverted Hammer, Shooting Star, Engulfing, Harami, Piercing, Dark Cloud, Morning/Evening Star, Three Soldiers/Crows
Body/wick ratio analysis with trend-context filters. Rendered as β² or βΌ above/below the candle.
Harmonic β Gartley, Butterfly, Bat, Crab, Shark, Cypher
Fibonacci ratio validation between swing points (XABCD structure) with per-pattern tolerance bands.
Divergence β RSI & MACD Bullish/Bearish
Peak/trough alignment between price and oscillator detects hidden and regular divergence.
Ensemble β each base learner weighted by rolling out-of-fold validation:
| Model | Role |
|---|---|
| Random Forest | Non-linear baseline, robust to noise |
| Gradient Boosting | Sequential residual refinement |
| SVR | Small-sample non-linear regression |
| Ridge / Lasso / ElasticNet | Stable linear anchors |
| ARIMA | Explicit time-series baseline |
| XGBoost / LightGBM (optional) | High-capacity boosting |
Stacked via a meta-learner on validation residuals.
| Metric | Range |
|---|---|
| Average MAPE | 1.6 β 2.4 % |
| Direction accuracy | 100 % on tested symbols |
| Predictions within Β±2 % | 80 β 100 % |
| RΒ² | 0.50 β 0.81 |
Tested on BTC, ETH, SOL, BNB β 120-day windows.
State-of-the-art RL agents for trading research (not for live trading):
- DQN β dueling, noisy nets, prioritized replay
- PPO β with GAE
- Transformer β multi-head attention policy
Cryptvault/
βββ cryptvault/
β βββ desktop/ # Native Tk GUI (app, panels, theme)
β βββ patterns/ # 50+ pattern detectors (7 categories)
β βββ ml/ # Ensemble + feature engineering
β βββ rl/ # DQN / PPO / Transformer agents
β βββ data/ # Market data fetch & caching
β βββ visualization/ # Chart rendering
β βββ portfolio/ # Multi-asset analytics
β βββ security/ # Input validation & sanitization
βββ docs/ # Full documentation
βββ tests/ # pytest suite (unit + integration)
βββ cryptvault_cli.py # CLI entry point
βββ launch_desktop.py # Desktop launcher
βββ pyproject.toml # Tooling config (ruff, bandit, pytest)
| Minimum | Recommended | |
|---|---|---|
| Python | 3.9 | 3.11+ |
| RAM | 4 GB | 8 GB |
| Disk | 2 GB | 5 GB |
| Network | Required (data fetch) | β |
Platforms: Windows 10/11 Β· Ubuntu 20.04+ Β· macOS 10.15+ (including Apple Silicon).
# Install dev tooling
pip install -r requirements.txt
pip install ruff bandit pytest pytest-cov pytest-xdist
# Lint (same command CI uses)
ruff check cryptvault/ cryptvault_cli.py
ruff format cryptvault/ cryptvault_cli.py
# Security scan
bandit -c pyproject.toml -r cryptvault/ -ll
# Tests (parallel)
pytest tests/ -n auto --cov=cryptvault --cov-report=termThe project is ruff-clean as of v6.1.0 β CI blocks on ruff violations.
| Doc | About |
|---|---|
| Desktop App | Full GUI walkthrough |
| Patterns | Every detector, how it works |
| Architecture | System design & data flow |
| API Reference | Python API |
| Performance | Benchmarks & tuning |
| Deployment | Packaging & distribution |
| Troubleshooting | Common issues |
| Security | Disclosure policy |
| Changelog | Version history |
| Contributing | How to contribute |
- Fork and branch from
main. pip install -r requirements.txt- Write tests first (pytest).
ruff checkmust pass.- Open a PR with a clear description.
See docs/CONTRIBUTING.md and CODE_OF_CONDUCT.md.
MIT β see LICENSE.
Built with: scikit-learn Β· yfinance Β· NumPy Β· pandas Β· SciPy Β· Matplotlib Β· XGBoost Β· LightGBM.
Maintained by MeridianAlgo β a research organization focused on open-source financial ML. Not a licensed broker or financial advisor.
Version 6.1.0 Β· Last updated April 2026 Β· Built for researchers, by researchers.