Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
NotificationsYou must be signed in to change notification settings

NoFxAiOS/FinBench

Repository files navigation

Financial Technical Indicator Calculation LLM Benchmark

FinBench is a professional LLM benchmarking tool for evaluating the capabilities of large language models in calculating financial technical indicators. Through standardized evaluation processes, it provides model selection guidance for AI quantitative trading systems.

Features

  • Multi-Model Support - Supports 7 major LLM providers
  • 10 Indicator Tests - Covers common technical analysis indicators
  • Statistical Analysis - Multiple runs for stability data
  • Visual Reports - Generates professional HTML chart reports
  • Reproducibility - Supports static dataset mode

Supported Models

ProviderModelAPI Endpoint
DeepSeekdeepseek-chatapi.deepseek.com
Qwenqwen3-maxdashscope.aliyuncs.com
OpenAIgpt-5.2api.openai.com
Claudeclaude-opus-4-6api.anthropic.com
Geminigemini-3-pro-previewgenerativelanguage.googleapis.com
Grokgrok-3-latestapi.x.ai
Kimimoonshot-v1-autoapi.moonshot.ai

Evaluation Indicators

IndicatorDescriptionScore Threshold
MA2020-period Simple Moving Average≤0.1% full score
EMA1212-period Exponential Moving Average≤0.1% full score
EMA2626-period Exponential Moving Average≤0.1% full score
MACDEMA12 - EMA26≤0.5% full score
RSI1414-period Relative Strength Index≤1% full score
BOLLBollinger Bands (Upper/Middle/Lower)≤0.1% full score
ATR1414-period Average True Range≤1% full score
VolumeMA55-period Volume Moving Average≤0.1% full score

Scoring Rules

Error RangeScore
≤ 0.1%100
0.1% - 1%80
1% - 5%60
5% - 10%40
> 10%0

Quick Start

Installation

git clone https://github.com/NoFxAiOS/FinBench.gitcd FinBenchgo build -o finbench ./cmd/finbench

Configuration

Copy the configuration template and fill in API Keys:

cp config.template.json config.json

Editconfig.json:

{"models": [    {"name":"DeepSeek-Chat","provider":"deepseek","model":"deepseek-chat","api_key":"your-api-key-here"    }  ]}

Running Benchmarks

# Standard benchmark (10 runs)./finbench run -config=config.json -symbols=BTCUSDT -runs=10 -output=report.json# Quick benchmark (3 runs)./finbench run -config=config.json -symbols=BTCUSDT -runs=3# Multi-symbol benchmark./finbench run -config=config.json -symbols=BTCUSDT,ETHUSDT -runs=10# Using static dataset (reproducible)./finbench run -mode=static -dataset=datasets/snapshots -config=config.json

Generating Visual Reports

python3 scripts/generate_report.py report.json finbench_report.htmlopen finbench_report.html

Command Reference

# View supported models./finbench models# Capture market data snapshot./finbench snapshot -symbols=BTCUSDT,ETHUSDT -output=datasets/snapshots# View help./finbenchhelp

Run Command Parameters

ParameterDescriptionDefault
-configConfiguration file pathRequired
-modeBenchmark mode (realtime/static)realtime
-symbolsTrading pairs (comma-separated)BTCUSDT
-intervalKline interval1h
-klinesNumber of klines50
-runsRuns per model1
-outputOutput report path-

Report Examples

HTML reports include:

  • Leaderboard - Overall model rankings
  • Score Bar Chart - Visual comparison
  • Radar Chart - Indicator capability analysis
  • Heatmap - Indicator score matrix
  • Latency Comparison - Response speed analysis
  • Detail Cards - Per-model statistics

Evaluation Methodology

┌─────────────────────────────────────────┐│         Unified Data Source (Klines)    ││        CoinAnk API / Static Snapshots   │└─────────────────┬───────────────────────┘                  │        ┌─────────┴─────────┐        ▼                   ▼┌───────────────┐   ┌───────────────┐│ Local Calc    │   │  LLM Calc     ││ (Ground Truth)│   │ (Under Test)  │└───────┬───────┘   └───────┬───────┘        │                   │        └─────────┬─────────┘                  ▼        ┌───────────────────┐        │   Compare & Score │        │   Error → Score   │        └───────────────────┘

Project Structure

FinBench/├── cmd/finbench/       # CLI entry point├── benchmark/          # Benchmark engine│   ├── engine.go       # Main engine│   ├── llm.go          # LLM client│   ├── models.go       # Model configuration│   ├── scorer.go       # Scoring logic│   └── calculator.go   # Indicator calculation├── market/             # Market data│   ├── kline.go        # Kline fetching│   └── indicators.go   # Indicator implementation├── provider/           # Data providers│   └── coinank/        # CoinAnk API├── scripts/            # Utility scripts│   └── generate_report.py  # Report generator├── datasets/           # Datasets│   └── snapshots/      # Snapshot data└── docs/               # Documentation

Security Notice

Do not commit files containing API Keys

The following files are ignored by.gitignore:

  • config.json /config*.json (except template)
  • *_report.json /report.json
  • finbench_report.html

License

MIT License

Related Projects

  • nofx - AI Quantitative Trading System

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2026 Movatter.jp