Advanced Hybrid AI expert system for NASDAQ & Oil (WTI) ETF trading. Merges Quantitative ML, LLMs (Gemma 4, Gemini free or not), TimesFM 3, Visual Chart Analysis, and EIA Fundamentals for high-accuracy signals. Features dual-ticker strategy and Trading 212 execution.
3
stars
332
commits
Python
primary language
Sep 10, 2026
updated
English | 中文 | हिंदी | Español | Français | العربية | বাংলা | Русский | Português | Bahasa Indonesia
An expert decision-support system for NASDAQ and Oil (WTI) ETF trading, leveraging a 14-model hybrid artificial intelligence powered by unified cloud LLMs for robust and nuanced trading signals.
This project is an expert decision-support system for ETF trading, using a 14-model hybrid AI approach. It is designed to provide a comprehensive and robust analysis by combining several AI perspectives.
The system uses an innovative approach to maximize model accuracy:
^NDX for Nasdaq, CL=F for WTI Crude Oil). These indices offer longer history and "purer" trends, without the noise related to trading hours or ETF fees.SXRV.DE, CRUDP.PA), using T212 live prices (via positions API) for position sizing. Portfolio state is synchronized directly from T212 (sync_state_from_t212()), and live prices are injected into the analysis pipeline (_inject_t212_live_price() in src/data.py).The system merges thirteen distinct signals (plus a meta-model):
NexusAI-Client with automatic failover across multiple free and paid frontier cloud providers.enhanced_trading_chart.png).The goal is to produce a final decision (BUY, SELL, HOLD) with an absolute priority on Accuracy First.
Unlike classic trading algorithms that panic as soon as volatility explodes, this system applies an informed investor approach:
SELL), but if cognitive models (Text LLM, Vision, TimesFM) remain neutral, the system will prefer HOLD.VERY_HIGH risk mode, HOLD serves as a shield. It prevents entering an unstable market and avoids exiting prematurely on a simple technical correction.morning_brief/morning_brief.py) running daily via schedule.py. Synthesizes market reports and injects fundamental awareness into daily trading cycles.AdvancedRiskManager centralizes Anti-Loss (Stop-Loss) and Trailing Stop logic.Python 3.12+pandas, numpy, yfinance, pyarrow, pandas_datareader, hyperliquid-python-sdkscikit-learn, shap, stable-baselines3, gymnasiumnexusai-client, google-genaibeautifulsoup4, duckduckgo_search, crawl4aimatplotlib, seaborn, mplfinancetqdm, rich, python-dotenv, scheduleThe system leverages NexusAI-Client to unify all cloud AI model calls into a resilient, zero-maintenance gateway:
Trading-AI/
├── morning_brief/ # Overnight autonomous agent for fundamental analysis
│ ├── morning_brief.py # Brief orchestrator via NexusAI-Client
│ └── output/ # Generated daily markdown reports
├── src/ # Core modules
│ ├── adaptive_weight_manager.py # Dynamic model weighting based on performance
│ ├── advanced_risk_manager.py # Trend-Aware risk management and sizing
│ ├── bootstrap.py # Core initialization logic
│ ├── chart_generator.py # Generates technical charts for visual LLM
│ ├── classic_model.py # Scikit-learn quantitative models ensemble
│ ├── config_weights.py # Base weights configuration for the hybrid engine
│ ├── data.py # Data fetching, caching, and preprocessing
│ ├── database.py # SQLite database management for metrics
│ ├── eia_client.py # Energy Information Administration API client
│ ├── enhanced_decision_engine.py # Hybrid fusion engine orchestrating all models
│ ├── enhanced_trading_example.py # Pipeline execution and orchestration
│ ├── features.py # Technical and macroeconomic feature engineering
│ ├── grebenkov_model.py # Trend-Following math model
│ ├── hmm_model.py # Hidden Markov Model for regime detection
│ ├── llm_client.py # Unified LLM inference via NexusAI-Client
│ ├── news_fetcher.py # Financial news crawling and parsing
│ ├── oil_bench_model.py # Energy-specialized WTI trading model
│ ├── performance_monitor.py # P&L and risk metrics monitoring
│ ├── sentiment_analysis.py # Sentiment analysis engine
│ ├── t212_executor.py # Trading 212 order execution & state sync
│ ├── tensortrade_model.py # Reinforcement learning model
│ ├── timesfm_model.py # Google TimesFM foundation model wrapper
│ ├── vincent_ganne_model.py # Geopolitical bottom-detection model
│ ├── web_researcher.py # Dynamic web research query generator
│ ├── council/ # Weekend AI Council deliberation suite
│ │ ├── weekend_council.py # 3-round multi-provider debate orchestrator
│ │ └── council_prompts.py # Personas and debate templates
│ └── agents/ # FinAcumen cognitive ReAct agent
├── tests/ # Comprehensive unit and integration test suite
├── main.py # Pipeline entry point
├── schedule.py # Production scheduler
└── scheduler_config.json # Centralized parameter configuration
uv).env (Gemini, Groq, Mistral, Nvidia, Alpha Vantage, EIA, etc. — see .env.example)uv: astral.sh/uvuv sync
uv run python -m playwright install chromium
.env.example to .env and fill in your API keys.uv run python tests/smoke_timesfm3.py
# Paper trading simulation (NASDAQ)
uv run main.py --simul
# Paper trading simulation (Oil)
uv run main.py --simul --ticker CRUDP.PA
# Live/Demo execution on Trading 212
uv run main.py --t212
# Run full automated scheduler (8:30 AM - 6:00 PM)
uv run schedule.py
# Run Weekend AI Council on demand
uv run python -m src.council.weekend_council --days 7
# Run Morning Market Brief on demand
uv run python morning_brief/morning_brief.py
Contributions are welcome! Please open an issue or submit a PR.
This project is licensed under the MIT License - see the LICENSE file for details.
267 commits
65 commits
Python
97.0%
HTML
2.8%
Advanced Hybrid AI expert system for NASDAQ & Oil (WTI) ETF trading. Merges Quantitative ML, LLMs (Gemma 4, Gemini free or not), TimesFM 3, Visual Chart Analysis, and EIA Fundamentals for high-accuracy signals. Features dual-ticker strategy and Trading 212 execution.
3
stars
332
commits
Python
primary language
Sep 10, 2026
updated
English | 中文 | हिंदी | Español | Français | العربية | বাংলা | Русский | Português | Bahasa Indonesia
An expert decision-support system for NASDAQ and Oil (WTI) ETF trading, leveraging a 14-model hybrid artificial intelligence powered by unified cloud LLMs for robust and nuanced trading signals.
This project is an expert decision-support system for ETF trading, using a 14-model hybrid AI approach. It is designed to provide a comprehensive and robust analysis by combining several AI perspectives.
The system uses an innovative approach to maximize model accuracy:
^NDX for Nasdaq, CL=F for WTI Crude Oil). These indices offer longer history and "purer" trends, without the noise related to trading hours or ETF fees.SXRV.DE, CRUDP.PA), using T212 live prices (via positions API) for position sizing. Portfolio state is synchronized directly from T212 (sync_state_from_t212()), and live prices are injected into the analysis pipeline (_inject_t212_live_price() in src/data.py).The system merges thirteen distinct signals (plus a meta-model):
NexusAI-Client with automatic failover across multiple free and paid frontier cloud providers.enhanced_trading_chart.png).The goal is to produce a final decision (BUY, SELL, HOLD) with an absolute priority on Accuracy First.
Unlike classic trading algorithms that panic as soon as volatility explodes, this system applies an informed investor approach:
SELL), but if cognitive models (Text LLM, Vision, TimesFM) remain neutral, the system will prefer HOLD.VERY_HIGH risk mode, HOLD serves as a shield. It prevents entering an unstable market and avoids exiting prematurely on a simple technical correction.morning_brief/morning_brief.py) running daily via schedule.py. Synthesizes market reports and injects fundamental awareness into daily trading cycles.AdvancedRiskManager centralizes Anti-Loss (Stop-Loss) and Trailing Stop logic.Python 3.12+pandas, numpy, yfinance, pyarrow, pandas_datareader, hyperliquid-python-sdkscikit-learn, shap, stable-baselines3, gymnasiumnexusai-client, google-genaibeautifulsoup4, duckduckgo_search, crawl4aimatplotlib, seaborn, mplfinancetqdm, rich, python-dotenv, scheduleThe system leverages NexusAI-Client to unify all cloud AI model calls into a resilient, zero-maintenance gateway:
Trading-AI/
├── morning_brief/ # Overnight autonomous agent for fundamental analysis
│ ├── morning_brief.py # Brief orchestrator via NexusAI-Client
│ └── output/ # Generated daily markdown reports
├── src/ # Core modules
│ ├── adaptive_weight_manager.py # Dynamic model weighting based on performance
│ ├── advanced_risk_manager.py # Trend-Aware risk management and sizing
│ ├── bootstrap.py # Core initialization logic
│ ├── chart_generator.py # Generates technical charts for visual LLM
│ ├── classic_model.py # Scikit-learn quantitative models ensemble
│ ├── config_weights.py # Base weights configuration for the hybrid engine
│ ├── data.py # Data fetching, caching, and preprocessing
│ ├── database.py # SQLite database management for metrics
│ ├── eia_client.py # Energy Information Administration API client
│ ├── enhanced_decision_engine.py # Hybrid fusion engine orchestrating all models
│ ├── enhanced_trading_example.py # Pipeline execution and orchestration
│ ├── features.py # Technical and macroeconomic feature engineering
│ ├── grebenkov_model.py # Trend-Following math model
│ ├── hmm_model.py # Hidden Markov Model for regime detection
│ ├── llm_client.py # Unified LLM inference via NexusAI-Client
│ ├── news_fetcher.py # Financial news crawling and parsing
│ ├── oil_bench_model.py # Energy-specialized WTI trading model
│ ├── performance_monitor.py # P&L and risk metrics monitoring
│ ├── sentiment_analysis.py # Sentiment analysis engine
│ ├── t212_executor.py # Trading 212 order execution & state sync
│ ├── tensortrade_model.py # Reinforcement learning model
│ ├── timesfm_model.py # Google TimesFM foundation model wrapper
│ ├── vincent_ganne_model.py # Geopolitical bottom-detection model
│ ├── web_researcher.py # Dynamic web research query generator
│ ├── council/ # Weekend AI Council deliberation suite
│ │ ├── weekend_council.py # 3-round multi-provider debate orchestrator
│ │ └── council_prompts.py # Personas and debate templates
│ └── agents/ # FinAcumen cognitive ReAct agent
├── tests/ # Comprehensive unit and integration test suite
├── main.py # Pipeline entry point
├── schedule.py # Production scheduler
└── scheduler_config.json # Centralized parameter configuration
uv).env (Gemini, Groq, Mistral, Nvidia, Alpha Vantage, EIA, etc. — see .env.example)uv: astral.sh/uvuv sync
uv run python -m playwright install chromium
.env.example to .env and fill in your API keys.uv run python tests/smoke_timesfm3.py
# Paper trading simulation (NASDAQ)
uv run main.py --simul
# Paper trading simulation (Oil)
uv run main.py --simul --ticker CRUDP.PA
# Live/Demo execution on Trading 212
uv run main.py --t212
# Run full automated scheduler (8:30 AM - 6:00 PM)
uv run schedule.py
# Run Weekend AI Council on demand
uv run python -m src.council.weekend_council --days 7
# Run Morning Market Brief on demand
uv run python morning_brief/morning_brief.py
Contributions are welcome! Please open an issue or submit a PR.
This project is licensed under the MIT License - see the LICENSE file for details.
267 commits
65 commits
Python
97.0%
HTML
2.8%