AI-powered financial analysis and investment recommendation system using multi-agent AI orchestration (CrewAI). Analyzes global markets to generate daily investment signals with confidence scores.
π Complete CLI Documentation
FalconSignals is designed to help investors make informed decisions by providing daily, data-driven investment analysis. The system combines fundamental analysis, technical indicators, and news sentiment to generate actionable investment signals with confidence scores.
Key Features:
- π€ Multi-agent AI system with 5 specialized analysis agents
- π Dual analysis modes: LLM-powered (AI) and Rule-based (technical indicators)
- π Static website publishing with MkDocs + GitHub Pages
- π° Cost-conscious design: Target β¬50-90/month operational cost
- π Global market coverage: 1000+ US, Nordic, and EU instruments
- β‘ Fast execution: Complete analysis in <15 minutes
- π Confidence-scored recommendations with detailed reasoning
- Python 3.12+
- UV package manager
- API keys:
ANTHROPIC_API_KEYorOPENAI_API_KEY(required for LLM mode)ALPHA_VANTAGE_API_KEY(required - Premium tier recommended for news + earnings)FINNHUB_API_KEY(optional - for analyst recommendations)
# Clone and setup
git clone <repository>
cd falconsignals
# Install dependencies
uv sync
# Initialize configuration
uv run python -m src.main config-init
# Edit configuration (optional)
# nano config/local.yaml# LLM API Key (choose one - Anthropic recommended)
export ANTHROPIC_API_KEY=your_key # For AI-powered analysis
# OR
export OPENAI_API_KEY=your_key # Alternative to Anthropic
# Financial Data APIs
export ALPHA_VANTAGE_API_KEY=your_key # Premium tier: 75 requests/min, news + earnings
export FINNHUB_API_KEY=your_key # Optional: analyst recommendationsOr create .env file in project root:
ANTHROPIC_API_KEY=your_key
FINNHUB_API_KEY=your_key
ALPHA_VANTAGE_API_KEY=your_key
π‘ Note on Analysis Modes:
- LLM Mode (
--llmflag): AI-powered analysis with enhanced sentiment and qualitative insights- Rule-Based Mode (default): Technical indicators and quantitative methods
- Both modes generate valid trading signals
uv run python -m src.main validate-config# Quick test
uv run python -m src.main analyze --test
# Analyze specific market
uv run python -m src.main analyze --market us --limit 20
# Analyze global markets
uv run python -m src.main analyze --market global
# Analyze specific stocks
uv run python -m src.main analyze --ticker AAPL,MSFT,GOOGL
# Analyze by category
uv run python -m src.main analyze --group us_tech_software
uv run python -m src.main analyze --group us_ai_ml,us_cybersecurity --limit 30Use intelligent CrewAI agents with Claude/GPT reasoning:
# Quick test with LLM
uv run python -m src.main analyze --test --llm
# Single stock with LLM analysis
uv run python -m src.main analyze --ticker INTU --llm
# Multiple stocks with LLM
uv run python -m src.main analyze --ticker AAPL,MSFT,GOOGL --llm
# With custom config
uv run python -m src.main analyze --ticker INTU --llm --config config/local.yaml
# JSON output instead of Markdown
uv run python -m src.main analyze --ticker INTU --llm --format json
# With LLM debug mode (saves inputs/outputs)
uv run python -m src.main analyze --ticker INTU --llm --debug-llmWhat LLM mode does:
- Activates 5 intelligent agents: Market Scanner, Technical Analyst, Fundamental Analyst, Sentiment Analyst, Signal Synthesizer
- Each agent uses Claude/GPT to reason about the analysis
- Combines insights with proper weighting (35% fundamental, 35% technical, 30% sentiment)
- Tracks token usage and costs in EUR
- Falls back to rule-based analysis if LLM fails
Cost: ~β¬0.65 per stock analyzed (adjustable by model choice)
uv run python -m src.main list-categories# Generate report from cached data
uv run python -m src.main report --date 2024-01-15Publish analysis results to a static website:
# Publish and deploy to GitHub Pages
uv run python -m src.main publish --session-id 123
# Publish specific date
uv run python -m src.main publish --date 2025-12-10
# Build only (no deployment)
uv run python -m src.main publish --session-id 123 --build-onlyFeatures:
- π Static site with MkDocs + Material theme
- π·οΈ Tag-based filtering (ticker, signal type, date)
- π Privacy-first (removes portfolio allocations)
- π Automated GitHub Actions deployment
- π± Responsive design with dark/light mode
See Website Publishing Guide for setup and deployment details.
uv run python -m src.main --help
uv run python -m src.main analyze --helpCreate config/local.yaml from template:
uv run python -m src.main config-init --output config/local.yamlKey settings:
capital:
starting_capital_eur: 2000
monthly_deposit_eur: 500
risk:
tolerance: moderate # conservative, moderate, aggressive
max_position_size_percent: 10
max_sector_concentration_percent: 20
markets:
included: [nordic, eu, us] # Available markets
included_instruments: [stocks, etfs]
analysis:
weight_fundamental: 0.35
weight_technical: 0.35
weight_sentiment: 0.30
llm:
provider: anthropic # anthropic, openai, local
model: claude-sonnet-4-20250514
temperature: 0.7FalconSignals uses a multi-agent CrewAI architecture:
Configuration Layer (YAML/CLI)
β
Data Fetching (Multiple APIs + Caching)
β
Analysis Mode Selection
ββ LLM Mode: CrewAI Multi-Agent System
β ββ Market Scanner Agent (anomaly detection, screening)
β ββ Fundamental Analysis Agent (earnings, valuations, growth)
β ββ Technical Analysis Agent (indicators: SMA, RSI, MACD, ATR)
β ββ News & Sentiment Agent (news processing, sentiment scoring)
β ββ Signal Synthesis Agent (weighted scoring + confidence)
β
ββ Rule-Based Mode: Direct Analysis Pipeline
ββ Technical Indicators (SMA, RSI, MACD, ATR)
ββ Fundamental Metrics (P/E, EV/EBITDA, margins)
ββ Signal Scoring (weighted combination)
β
Report Generation (Markdown/JSON)
β
Output (Files, Terminal)
For detailed architecture diagrams, see:
- System Architecture - Complete system overview
- Analyze Command Workflow - Detailed command flow
falconsignals/
βββ src/
β βββ main.py # CLI entry point
β βββ config/ # Configuration system
β β βββ schemas.py # Pydantic validation
β β βββ loader.py # YAML loading
β β βββ llm.py # LLM client initialization
β βββ data/ # Data layer
β β βββ models.py # Pydantic data models
β β βββ providers.py # Abstract provider
β β βββ yahoo_finance.py # Yahoo Finance impl
β β βββ alpha_vantage.py # Alpha Vantage impl
β β βββ finnhub.py # Finnhub impl (analyst recommendations only)
β β βββ screening.py # Instrument filtering
β β βββ normalization.py # Data cleaning
β β βββ portfolio.py # Portfolio state
β βββ cache/ # Caching layer
β β βββ manager.py # Cache management
β βββ agents/ # Agent system
β β βββ base.py # BaseAgent and AgentConfig
β β βββ crew.py # AnalysisCrew orchestrator
β β βββ scanner.py # MarketScannerAgent
β β βββ analysis.py # Technical & Fundamental agents
β β βββ sentiment.py # Sentiment & Signal Synthesis agents
β β βββ crewai_agents.py # CrewAI Agent factory
β β βββ hybrid.py # Hybrid intelligence wrapper
β βββ tools/ # Agent tools
β β βββ base.py # BaseTool and ToolRegistry
β β βββ fetchers.py # PriceFetcherTool, NewsFetcherTool
β β βββ analysis.py # Technical & Sentiment tools
β β βββ reporting.py # ReportGeneratorTool
β βββ llm/ # LLM integration
β β βββ token_tracker.py # Token usage & cost tracking
β β βββ prompts.py # Prompt templates
β β βββ tools.py # CrewAI tool adapters
β βββ orchestration/ # Analysis orchestration
β β βββ unified.py # UnifiedAnalysisOrchestrator (LLM + rule-based)
β βββ analysis/ # Analysis modules
β β βββ technical.py # Technical indicators
β β βββ fundamental.py # Fundamental analysis
β β βββ signals.py # Signal generation
β β βββ report.py # Report generation
β βββ pipeline/ # Pipeline orchestration
β β βββ orchestrator.py # AnalysisPipeline
β βββ utils/ # Utilities
β βββ logging.py # Logging setup
β βββ llm_check.py # LLM configuration check
βββ config/
β βββ default.yaml # Configuration template
βββ data/
β βββ cache/ # API response cache
β βββ features/ # Preprocessed data
β βββ reports/ # Generated reports
β βββ tracking/ # Token usage tracking
βββ tests/ # Test suite
βββ docs/
βββ architecture.mermaid # System architecture
βββ analyze_workflow.mermaid # Analyze command workflow
βββ roadmap.md # Implementation plan
βββ CLI_GUIDE.md # CLI guide
# Format and lint
uv run poe lint
# Run pre-commit hooks
uv run poe pre-commit# Run all tests
pytest
# Run single test file
pytest tests/unit/data/test_models.py
# Run with coverage
pytest --cov=srcecho $ANTHROPIC_API_KEY
echo $ALPHA_VANTAGE_API_KEY
echo $FINNHUB_API_KEYuv run python -m src.main config-initmkdir -p data/cache data/features data/reportsuv run poe lint- CLI Guide - Complete command reference with examples
- Configuration Guide - Configuration options and best practices
- Architecture - System architecture diagrams
- Roadmap - Development roadmap and completed features
| Component | Technology |
|---|---|
| CLI | Typer |
| Config | Pydantic + YAML |
| Data | Pydantic models |
| Providers | yfinance, requests |
| Caching | JSON (local) |
| AI/LLM | CrewAI + Anthropic/OpenAI |
| Logging | Loguru |
| Package Manager | UV |
| Code Quality | Black, Ruff, Pre-commit |