meridianalgo.github.io/Cryptvault
Quick start · Desktop application · Command line · Patterns · Machine learning · Documentation
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 desktop terminal built on trading-vue-js, with real candles, pan and zoom, and pattern geometry drawn directly onto the chart.
- 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 geometric shapes rather than markers.
- Reinforcement-learning agents (DQN, PPO, Transformer) for trading research.
- A Python API, command-line interface, and portfolio tools.
| Area | What's new |
|---|---|
| Intraday | New 1m, 5m, 15m and 1H timeframes. Labels are now the bar interval, each with a window that stays inside Yahoo's intraday history caps. |
| Forecast (beta) | The trend estimate is projected onto the chart — a dashed path to the target, a volatility envelope that widens with the horizon, and a divider at the last bar. Toggle it in the top bar. |
| Charting | Charts render with trading-vue-js: real pan, zoom, crosshair, log scale and resizable panes (6.3.0). |
| Diagrams | Pattern geometry is drawn in chart coordinates and snapped to swing wicks — sloped H&S necklines, parabolic Cup & Handle, XABCD harmonics, divergence lines, shaded triangles (6.3.0). |
| Tests | Forecast and timeframe coverage added; full suite green (26/26), cryptvault/ stays ruff-clean. |
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.pypython launch_desktop.py # add `pip install pywebview` for a native windowA dark trading terminal rendered by trading-vue-js. Python computes; the chart engine draws.
Pan, zoom, crosshair, log scale and pane splitters come from the chart engine.
A local http.server on 127.0.0.1 serves the page and the analysis JSON —
no Electron, no build step, no npm.
Every diagram lives in [timestamp, price] space, so it stays welded to the
candles through any pan or zoom — and pivots snap to the real swing high/low so
lines touch the wicks, not the closes.
The three strongest diagrams are drawn by default; click any pattern in the sidebar to isolate it on the chart.
| Pattern | Rendered as |
|---|---|
| Double / Triple Top · Bottom | M/W zigzag through the true extremes + neckline |
| Head & Shoulders (+ inverse) | LS → armpit → Head → armpit → RS with a sloped neckline |
| Triangles · Wedges | Both fitted trendlines with a shaded body |
| Flags · Pennants | Pole line + consolidation channel |
| Cup & Handle | Parabola through rim → bottom → rim, dotted handle |
| Harmonics (Gartley, Bat, Crab…) | Labelled XABCD zigzag with shaded legs |
| RSI · MACD Divergence | Dotted line between the diverging price pivots |
| Any pattern with a target | Dotted horizontal target line |
| Candlestick | Triangle marker pointing at the bar |
| Always on | Swing pivot dots + fitted support/resistance |
| Forecast (beta) | Dashed path to the predicted price inside a widening volatility envelope |
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 a triangle marker above or 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 and BNB over 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/ # trading-vue-js terminal (server, api, shapes, index.html)
│ ├── 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 |
|---|---|
| Project site | How the pattern drawing works, with live figures |
| 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 |
| Code of Conduct | Community standards |
- 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 docs/CODE_OF_CONDUCT.md.
MIT — see LICENSE.
Built with scikit-learn, yfinance, NumPy, pandas, SciPy, Matplotlib, XGBoost, and LightGBM. Charts render with trading-vue-js.
Maintained by MeridianAlgo — a research organization focused on open-source financial ML. Not a licensed broker or financial advisor.
Version 6.4.0 | Last updated August 2026 | MeridianAlgo
