About the System
AIvestor is an experimental, autonomous investment system designed with a multi-agent architecture and real-time event-driven processing. It combines advanced language models with analytical modules to process market data, news, and macroeconomic indicators, then generate, verify, and execute investment decisions according to defined strategy and safety limits.
The system operates in automatic, semi-automatic, and manual modes, allowing users both full automation and manual decision-making. Every action is logged, described in natural language, and available for audit.
Features
Key System Capabilities
- Multi-agent architecture – dedicated modules for different areas: news analysis, sentiment research, market scanning, portfolio management, and order execution.
- Real-time news analysis – automatic retrieval of ESPI communications and other sources, filtering and impact assessment using large language models.
- Sentiment and market condition assessment – integration of signals from market, macroeconomic data, and news.
- Investment recommendation generation – AI-backed decisions, each with full justification.
- Strategy personalization – defining investment rules, risk parameters, and preferred instruments in natural language.
- Event-driven reactions – immediate response to market changes, significant news, TP/SL level achievement, and other key events.
- Full transparency – logging and presentation of all decisions, transactions, and recommendations in the user interface.
- Demo mode – ability to work on a simulation account with real-time market data.
- Portfolio division – separation of strategic (long-term) from tactical (short-term) investments.
- Advanced web interface – market view, portfolio, instruments, decision history, and strategy and limits configuration panel.
Simplified System Architecture
AIvestor was designed as an autonomous multi-agent system with its own execution runtime. The architecture is based on a central event bus, persistent state in PostgreSQL, and concurrency control, ensuring determinism, auditability, and fault tolerance.
Main Components
Data Sources
- Historical and real-time data from WSE
- Macroeconomic indicators (VIX, interest rates)
- ESPI communications and industry news
- Technical and fundamental company data
- ~30 data sources retrieved “on-demand” when the system deems it necessary
Agent Layer
- EspiNewsAgent – news and company communication analysis
- MarketSentimentAgent – market sentiment assessment
- PortfolioManagerAgent – strategy and allocation management
- InstrumentAgent – position monitoring (TP/SL, modifications)
- OrderExecutor – order execution through broker API
Central Platform
- PostgreSQL – persistent agent state and decision history
- EventBus – real-time communication between agents
- LLM Integration – language models for analysis and decision-making
User Interface
- Web panel for monitoring and control
- Work modes: automatic, semi-automatic, manual
- Strategy configuration in natural language
- Safety limits and notifications
Market Event Responses
The AIvestor system responds in real-time to various types of market events. Below are example sequence diagrams showing how the system processes information and makes decisions.
Response to Significant News
Example Flow:
- EspiNewsAgent retrieves new ESPI communication
- LLM assesses news impact on instrument price
- PortfolioManagerAgent checks strategy and limits
- InstrumentAgent generates recommendation (buy/sell/hold)
- OrderExecutor places order through broker API
- System saves decision and justification in database
Open Position Management
Example Monitoring:
- InstrumentAgent tracks price in real-time
- Detection of Take Profit or Stop Loss level achievement
- Verification of market conditions and strategy
- Decision to modify, close, or maintain position
- Automatic order execution with full logging
Why Custom Architecture?
Security and Control
- Persistent agent state resistant to system restarts
- Concurrency control prevents decision conflicts
- Deterministic audit of all actions
Transparency
- Every decision with full justification in natural language
- History of LLM prompts and responses
- Real-time event logs available
Agents (Roles)
- EspiNewsAgent – retrieves ESPI, evaluates news (LLM), emits
NEWS_TRIGGER. - MarketSentimentAgent – bullish/bearish/neutral based on macro and market signals.
- MarketScannerAgent – anomalies, volumes, trend detection, recommendations.
- PortfolioManagerAgent – capital allocation (Strategic/Tactical), limits, validation.
- LLMAllocator – translates recommendations into order parameters (type, size, TP/SL).
- InstrumentAgent – per instrument: TP/SL, reductions, closures, state and event log.
- OrderExecutor – orders to broker, retry, statuses.



