A quant trading system platform based on FinGPT, demonstrating new applications of large pre-trained Language Models in quantitative finance.
Python
30
179 commits
updated May 14, 2026
A quantitative trading system that combines Falcon-7B language model-driven sentiment analysis with technical market analysis to identify cryptocurrency trading opportunities. The system's core innovation is its confidence-weighted sentiment scoring mechanism, which integrates both the sentiment value and the model's confidence level to generate more reliable trading signals.
FinGPT Trader processes financial news and market data in parallel, combining both sources to identify potential trading opportunities. The system uses:
β = Implemented | π§ = Partially Implemented | π = Planned | β οΈ = Implementation Issues
Sentiment Analysis
Market Data Processing
Trading Execution
Risk Management
The system's key innovation is its confidence-weighted sentiment scoring mechanism. Rather than using raw sentiment scores, FinGPT Trader weighs the model's confidence (60%) against sentiment strength (40%) to generate more reliable signals:
# Calculate confidence-weighted sentiment score
weighted_score = (confidence * 0.6) * (abs(sentiment_score) * 0.4)
# Generate signal if weighted score exceeds detection threshold
if weighted_score > detection_threshold:
signals.append({
'symbol': pair,
'type': 'SENTIMENT',
'direction': 1 if sentiment_score > 0 else -1,
'strength': abs(sentiment_score),
'confidence': confidence,
'price': current_price,
'timestamp': datetime.now()
})
This approach helps filter out low-confidence predictions, reducing false signals.
The system maintains a history of sentiment and price movements to calculate correlation coefficients:
# Calculate correlation between sentiment changes and price changes
correlation = np.corrcoef(
sentiment_changes[:min_length],
price_changes[:min_length]
)[0, 1]
# Update correlation record for position sizing
self.market_correlation[symbol] = {
'value': correlation,
'updated_at': datetime.now(),
'samples': min_length
}
This correlation data helps adjust signal strength based on historical sentiment-price relationships.
graph TD
A[Falcon-7B Model] -->|Sentiment Analysis| B[Market Analysis Engine]
B -->|Signal Generation| C[Trading Core]
D[Binance API] -->|Market Data| B
C -->|Orders| D
E[Risk Monitor] -->|Position Limits| C
F[Portfolio Tracker] -->|Positions| C
G[Market Inefficiency Detector] -->|Trading Signals| B
H[News Data Feed] -->|Real-time News| A
style A fill:#d0f0c0
style B fill:#d0f0c0
style C fill:#f0e0a0
style D fill:#d0f0c0
style E fill:#f0e0a0
style F fill:#d0f0c0
style G fill:#d0f0c0
style H fill:#d0f0c0
classDef implemented fill:#d0f0c0;
classDef partial fill:#f0e0a0;
classDef planned fill:#f0d0d0;
The system uses a hierarchical YAML-based configuration system:
trading.yaml: Core trading parameters, thresholds, and position sizingstrategies.yaml: Strategy-specific parameters and detection thresholdsmodel.yaml: ML model configurationsservices.yaml: External service connectivity parameters# Create virtual environment
python -m venv venv
source venv/bin/activate # or activate on Windows
# Install dependencies
pip install -r requirements.txt
# Windows-specific: Set console to UTF-8 mode
chcp 65001 # If running in cmd.exe
# Set up your .env file with required API keys:
BINANCE_API_KEY=your_key_here # Obtain from Binance Testnet
BINANCE_API_SECRET=your_secret_here # Obtain from Binance Testnet
CRYPTOPANIC_API_KEY=your_key_here # Required for news feeds
HUGGINGFACE_TOKEN=your_token_here # Optional for model access
# Basic run
python main.py
# Run with minimal console output
python main.py -q
# Run with verbose debugging output
python main.py -v
API Connectivity
base_url parameterSentiment Analysis
analyze() and analyze_text()Trading Execution
execute_trade() methodAPI Connectivity
Method Compatibility
Position Sizing
Error Handling
API Connectivity
Sentiment Analysis
analyze() and analyze_text()Trading Execution
System Stability
Binance Client Initialization
base_url parameter in AsyncClient.create()Trading Execution
Position Sizing
Sentiment Analysis
Current development priorities:
Future enhancements:
β οΈ IMPORTANT: This system is in early development stage and not production-ready:
MIT License - See LICENSE for details.
This project builds on the foundation of several important open-source projects and research:
FinGPT Research: Core ideas on financial sentiment analysis and market prediction using large language models were inspired by research from the FinGPT paper.
llama.cpp: Our inferencing pipeline leverages the llama.cpp framework for running language models with minimal computational resources.
Binance API: Trading functionality is built on the Binance exchange API and Python client libraries.
Python AsyncIO: The asynchronous architecture is powered by Python's AsyncIO framework.
Contributions are welcome! Please fork the repository and submit a pull request with your changes. Ensure to follow the code style and include tests for new features. See CONTRIBUTING.md for more details.
A quant trading system platform based on FinGPT, demonstrating new applications of large pre-trained Language Models in quantitative finance.
Python
30
179 commits
updated May 14, 2026
A quantitative trading system that combines Falcon-7B language model-driven sentiment analysis with technical market analysis to identify cryptocurrency trading opportunities. The system's core innovation is its confidence-weighted sentiment scoring mechanism, which integrates both the sentiment value and the model's confidence level to generate more reliable trading signals.
FinGPT Trader processes financial news and market data in parallel, combining both sources to identify potential trading opportunities. The system uses:
β = Implemented | π§ = Partially Implemented | π = Planned | β οΈ = Implementation Issues
Sentiment Analysis
Market Data Processing
Trading Execution
Risk Management
The system's key innovation is its confidence-weighted sentiment scoring mechanism. Rather than using raw sentiment scores, FinGPT Trader weighs the model's confidence (60%) against sentiment strength (40%) to generate more reliable signals:
# Calculate confidence-weighted sentiment score
weighted_score = (confidence * 0.6) * (abs(sentiment_score) * 0.4)
# Generate signal if weighted score exceeds detection threshold
if weighted_score > detection_threshold:
signals.append({
'symbol': pair,
'type': 'SENTIMENT',
'direction': 1 if sentiment_score > 0 else -1,
'strength': abs(sentiment_score),
'confidence': confidence,
'price': current_price,
'timestamp': datetime.now()
})
This approach helps filter out low-confidence predictions, reducing false signals.
The system maintains a history of sentiment and price movements to calculate correlation coefficients:
# Calculate correlation between sentiment changes and price changes
correlation = np.corrcoef(
sentiment_changes[:min_length],
price_changes[:min_length]
)[0, 1]
# Update correlation record for position sizing
self.market_correlation[symbol] = {
'value': correlation,
'updated_at': datetime.now(),
'samples': min_length
}
This correlation data helps adjust signal strength based on historical sentiment-price relationships.
graph TD
A[Falcon-7B Model] -->|Sentiment Analysis| B[Market Analysis Engine]
B -->|Signal Generation| C[Trading Core]
D[Binance API] -->|Market Data| B
C -->|Orders| D
E[Risk Monitor] -->|Position Limits| C
F[Portfolio Tracker] -->|Positions| C
G[Market Inefficiency Detector] -->|Trading Signals| B
H[News Data Feed] -->|Real-time News| A
style A fill:#d0f0c0
style B fill:#d0f0c0
style C fill:#f0e0a0
style D fill:#d0f0c0
style E fill:#f0e0a0
style F fill:#d0f0c0
style G fill:#d0f0c0
style H fill:#d0f0c0
classDef implemented fill:#d0f0c0;
classDef partial fill:#f0e0a0;
classDef planned fill:#f0d0d0;
The system uses a hierarchical YAML-based configuration system:
trading.yaml: Core trading parameters, thresholds, and position sizingstrategies.yaml: Strategy-specific parameters and detection thresholdsmodel.yaml: ML model configurationsservices.yaml: External service connectivity parameters# Create virtual environment
python -m venv venv
source venv/bin/activate # or activate on Windows
# Install dependencies
pip install -r requirements.txt
# Windows-specific: Set console to UTF-8 mode
chcp 65001 # If running in cmd.exe
# Set up your .env file with required API keys:
BINANCE_API_KEY=your_key_here # Obtain from Binance Testnet
BINANCE_API_SECRET=your_secret_here # Obtain from Binance Testnet
CRYPTOPANIC_API_KEY=your_key_here # Required for news feeds
HUGGINGFACE_TOKEN=your_token_here # Optional for model access
# Basic run
python main.py
# Run with minimal console output
python main.py -q
# Run with verbose debugging output
python main.py -v
API Connectivity
base_url parameterSentiment Analysis
analyze() and analyze_text()Trading Execution
execute_trade() methodAPI Connectivity
Method Compatibility
Position Sizing
Error Handling
API Connectivity
Sentiment Analysis
analyze() and analyze_text()Trading Execution
System Stability
Binance Client Initialization
base_url parameter in AsyncClient.create()Trading Execution
Position Sizing
Sentiment Analysis
Current development priorities:
Future enhancements:
β οΈ IMPORTANT: This system is in early development stage and not production-ready:
MIT License - See LICENSE for details.
This project builds on the foundation of several important open-source projects and research:
FinGPT Research: Core ideas on financial sentiment analysis and market prediction using large language models were inspired by research from the FinGPT paper.
llama.cpp: Our inferencing pipeline leverages the llama.cpp framework for running language models with minimal computational resources.
Binance API: Trading functionality is built on the Binance exchange API and Python client libraries.
Python AsyncIO: The asynchronous architecture is powered by Python's AsyncIO framework.
Contributions are welcome! Please fork the repository and submit a pull request with your changes. Ensure to follow the code style and include tests for new features. See CONTRIBUTING.md for more details.