Skip to main content

Web visualization tool for AlphaForge backtest results

Project description

alpha-visualizer

PyPI version CI Python License: Apache 2.0

English | 日本語

AlphaForge バックテスト結果を Web ブラウザで可視化するスタンドアロンツール

alpha-visualizer は、AlphaForge のバックテストエンジンが出力する backtest_results.db(SQLite)と戦略 JSON を直接読み取り、ブラウザベースのダッシュボードとして可視化します。alpha-vis serve 一発で FastAPI + React SPA が起動し、戦略の閲覧・比較・最適化結果の確認・ライブ実績との突き合わせまでを行えます。

0.3.0 で破壊的変更: コマンド名を visalpha-vis にリネームしました。macOS 標準の /usr/bin/vis(BSD 系テキスト可視化ユーティリティ)と衝突して、旧 vis serve コマンドが vis: serve: No such file or directory などになる初学者の詰まりを解消するためです。詳細は CHANGELOG を参照してください。

Browse 画面

主な機能

  • Browse — 戦略ライブラリの一覧と検索(Symbol Atlas / Saved Views / Strategy Ledger)
  • Detail — Equity / Drawdown / 取引履歴・ベンチマーク(alpha / beta / IR / Correlation)
  • Compare — 複数戦略の指標比較と相関ヒートマップ
  • Optimize — WFO 合成エクイティカーブ・Grid 最適化結果の可視化
  • Live — バックテストとライブ実績の期間整合 diff
  • Ideas — 探索アイデアの一覧(ステータス・タグフィルタ)
  • テーマ切替 — ダーク/ライトモード、日英バイリンガル UI
  • エクスポート — CSV / PNG エクスポート、URL 共有(Browse の selectedId / compareIds 同期)

クイックスタート

インストール

# uv(推奨)
uv pip install alpha-visualizer

# pip
pip install alpha-visualizer

起動

# AlphaForge の作業ディレクトリで(backtest_results.db / strategies/ がある場所)
alpha-vis serve

# パスを明示する場合
alpha-vis serve --forge-dir /path/to/alpha-strategies

# ポート・ホスト指定
alpha-vis serve --port 9000 --host 0.0.0.0

# ブラウザを自動で開かない
alpha-vis serve --no-open

ブラウザで http://127.0.0.1:8000 が開きます。Ctrl+C で停止します。

環境変数

変数名 役割
FORGE_CONFIG forge.yaml への絶対パス。--forge-dir 引数より優先される(探索順序: 引数 config_pathFORGE_CONFIG<forge_dir>/forge.yaml
VITE_API_PROXY フロント開発サーバーの API proxy 先(既定 http://127.0.0.1:8000

開発時に予期せぬ forge.yaml が参照されている場合は unset FORGE_CONFIG で解除してください。手元で alpha-vis serve --forge-dir /path/to/A を打ったのに別ディレクトリの DB が読まれているときは、ほぼこの環境変数が原因です。

スクリーンショット

Detail Compare
Detail Compare
Optimize Strategy 構造
Optimize Strategy

ドキュメント

関連プロジェクト

  • Alforge Labs — AlphaForge 公式サイト・チュートリアル
  • AlphaForge — バックテストエンジン本体(商用ライセンス)

開発環境

# 依存関係インストール
uv sync

# テスト・Lint
uv run pytest tests/ -v
uv run ruff check src/ tests/

# フロントエンド開発サーバー(ホットリロード)
cd frontend && pnpm install && pnpm run dev

# フロントエンドビルド(src/alpha_visualizer/static/ に出力)
cd frontend && pnpm run build

詳細は CONTRIBUTING.md を参照してください。

ライセンス

Apache License 2.0 © alforge-labs

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

alpha_visualizer-0.7.1.tar.gz (2.4 MB view details)

Uploaded Source

Built Distribution

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

alpha_visualizer-0.7.1-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file alpha_visualizer-0.7.1.tar.gz.

File metadata

  • Download URL: alpha_visualizer-0.7.1.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for alpha_visualizer-0.7.1.tar.gz
Algorithm Hash digest
SHA256 85adbefa942c787b07135950abe8add69804a4b4bc6d2b641c9a50ce2ad68a7e
MD5 9a6f9724f4b12f1a6fff11078b75de88
BLAKE2b-256 4dff413cba2a05d0a9b533b170bafc779860a7ad9b564060be1a70b62db4baff

See more details on using hashes here.

Provenance

The following attestation bundles were made for alpha_visualizer-0.7.1.tar.gz:

Publisher: release.yml on alforge-labs/alpha-visualizer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file alpha_visualizer-0.7.1-py3-none-any.whl.

File metadata

File hashes

Hashes for alpha_visualizer-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7945edbcbf865dc80bfa25d47b9e8b313ad0549edd43d40686942f83d78cb9bd
MD5 04b8963ba2139d52daf2821a458fd8fc
BLAKE2b-256 02fdd6623f9a07dbcc00206a051a97a91e25cc33c5ab6ffa9d65793e4dba27e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for alpha_visualizer-0.7.1-py3-none-any.whl:

Publisher: release.yml on alforge-labs/alpha-visualizer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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