β οΈ Preview Version Notice: This is currently a preview version of FinWorld. Some code components are still being updated and may not be fully available in this repository. We appreciate your patience and look forward to providing the complete implementation soon. Thank you for your understanding!
FinWorld is a comprehensive, all-in-one open-source platform that provides end-to-end support for the entire financial AI workflow, from data acquisition to experimentation and deployment. Built on the foundation of unified AI paradigms, heterogeneous data integration, and advanced agent automation, FinWorld addresses the critical limitations of existing financial AI platforms.
Paper: FinWorld: An All-in-One Open-Source Platform for End-to-End Financial AI Research and Deployment (Arxiv) Website: FinWorld Project Website - Interactive demo and detailed results
Figure 1: Overview of FinWorld's comprehensive architecture and workflow
Our main contributions are threefold:
-
Unified Framework: We propose a unified, end-to-end framework for training and evaluation of ML, DL, RL, LLMs, and LLM agents, covering four critical financial AI task types including time series forecasting, algorithmic trading, portfolio management, and LLM applications.
-
Modular Design: The framework features a modular architecture that enables flexible construction of custom models and tasks, including the development of personalized LLM agents. The system supports efficient distributed training and testing across multiple environments.
-
Comprehensive Benchmark: We provide support for multimodal heterogeneous data with over 800 million samples, establishing a comprehensive benchmark for the financial AI community. Extensive experiments across four task types demonstrate the framework's flexibility and effectiveness.
- Time Series Forecasting: Advanced models including Autoformer, Crossformer, DLinear, TimesNet, PatchTST, TimeMixer, and TimeXer
- Algorithmic Trading: RL-based (PPO, SAC) and ML/DL-based trading strategies
- Portfolio Management: Multi-asset portfolio optimization with various risk measures
- LLM Applications: Financial reasoning and LLM agent training with RL fine-tuning
- Structured Data: OHLCV price data, technical indicators, financial factors
- Unstructured Data: News articles, financial reports, earnings calls
- Multi-source Support: FMP, Alpaca, AKShare, TuShare APIs
- Market Coverage: DJ30, SP500, SSE50, HS300 across US and Chinese markets
- Machine Learning: LightGBM, XGBoost, and traditional ML models
- Deep Learning: Transformer, LSTM, and state-of-the-art architectures
- Reinforcement Learning: PPO, SAC, and custom RL algorithms
- Large Language Models: GPT-4.1, Claude-4-Sonnet, Qwen series, and custom LLMs
- LLM Agents: Multi-agent systems with tool use and reasoning capabilities
- Distributed Training: Multi-GPU training and testing support
- Auto Presentation: Automated report generation and visualization
- Experiment Tracking: Integration with WandB and TensorBoard
- Modular Architecture: Extensible framework for rapid prototyping
- Python 3.11+
- CUDA 12.4+ (for GPU acceleration)
- Conda or Miniconda
- 16+ GB RAM (recommended for large datasets)
conda create -n finworld python=3.11
conda activate finworld# Install base dependencies
make install-base
# Install browser automation tools
make install-browser
# Install VERL framework
make install-verl# Install Poetry
pip install poetry
# Install dependencies
poetry install# Download DJ30 data (example)
python scripts/download/download.py --config configs/download/dj30/dj30_fmp_price_1day.py
python scripts/download/download.py --config configs/download/dj30/dj30_fmp_price_1min.py# Train PPO trading models for multiple stocks
CUDA_VISIBLE_DEVICES=0 python scripts/rl_trading/train.py --config=configs/rl_trading/ppo/AAPL_ppo_trading.py# Train PPO portfolio models for different indices
CUDA_VISIBLE_DEVICES=0 python scripts/rl_portfolio/train.py --config=configs/rl_portfolio/ppo/dj30_ppo_portfolio.py# Run example scripts
bash examples/ppo_trading.sh
bash examples/ppo_portfolio.sh
bash examples/download.shOur comprehensive evaluation on DJ30 and HS300 datasets demonstrates the superiority of deep learning approaches:
- TimeXer achieves MAE of 0.0529 and MSE of 0.0062 on DJ30, significantly outperforming LightGBM (MAE: 0.1392, MSE: 0.0235)
- TimeMixer and TimeXer show superior performance on HS300 with MAEs of 0.3804 and 0.3727 respectively
- Deep learning models consistently achieve higher RankICIR scores compared to traditional ML methods
RL-based methods demonstrate clear advantages in trading performance:
- SAC achieves 101.55% ARR on TSLA with superior risk-adjusted returns
- PPO attains 2.10 SR on META, outperforming all baseline methods
- RL methods consistently deliver higher returns and better risk metrics across all evaluated stocks
RL-based portfolio optimization shows significant improvements:
- SAC achieves up to 31.2% annualized returns on SP500 with Sharpe ratios above 1.5
- RL methods consistently outperform rule-based and ML-based approaches
- Superior risk-adjusted performance across all major indices
Our FinReasoner model demonstrates state-of-the-art performance:
- Financial Reasoning: Leads all four benchmarks (FinQA, FinEval, ConvFinQA, CFLUE)
- Trading Capabilities: Strong performance across all evaluated stocks with comprehensive risk management
- Domain-specific Training: Outperforms generic instruction-tuned models
FinWorld employs a layered, object-oriented architecture with seven core layers:
- Built on
mmenginefor unified experiment management - Registry mechanism for flexible component management
- Support for configuration inheritance and overrides
- Downloader Module: Multi-source data acquisition (FMP, Alpaca, AKShare)
- Processor Module: Feature engineering and preprocessing (Alpha158 factors)
- Dataset Module: Task-specific data organization
- Environment Module: RL environment encapsulation
- ML Models: Traditional ML algorithms (LightGBM, XGBoost)
- DL Models: Neural architectures (Transformer, LSTM, VAE)
- RL Models: Actor-critic networks with financial constraints
- LLM Models: Unified interface for commercial and open-source LLMs
- Optimizer: Adam, AdamW, SGD with gradient centralization
- Loss: Regression, classification, and RL surrogate losses
- Scheduler: Cosine, linear, and adaptive learning rate scheduling
- Trainer: Task-specific training pipelines with distributed support
- Metrics: Financial-specific metrics (ARR, SR, MDD, CR, SoR)
- Visualization: K-line charts, cumulative returns, compass plots
- Standardized Protocols: Consistent evaluation across all tasks
- Time Series Forecasting: Multi-step prediction with various horizons
- Algorithmic Trading: Single-asset trading with risk management
- Portfolio Management: Multi-asset allocation with constraints
- LLM Applications: Financial reasoning and agent training
- Auto-reporting: LaTeX technical reports and HTML dashboards
- Multi-channel Publishing: GitHub, GitHub Pages, and experiment tracking
- Version Control: Systematic archiving and knowledge transfer
FinWorld/
βββ configs/ # Configuration files
β βββ _asset_list_/ # Asset list configurations
β βββ agent/ # Agent configurations
β βββ download/ # Data download configurations
β βββ finreasoner/ # Financial reasoning configs
β βββ ml_portfolio/ # ML portfolio configurations
β βββ ml_trading/ # ML trading configurations
β βββ process/ # Data processing configurations
β βββ rl_portfolio/ # RL portfolio configurations
β βββ rl_trading/ # RL trading configurations
β βββ rule_portfolio/ # Rule-based portfolio configs
β βββ rule_trading/ # Rule-based trading configs
β βββ storm/ # Storm framework configs
β βββ time/ # Time series model configs
β βββ vae/ # VAE model configurations
βββ finworld/ # Core framework
β βββ agent/ # Multi-agent system
β βββ base/ # Base classes and utilities
β βββ calendar/ # Calendar management
β βββ config/ # Configuration management
β βββ data/ # Data processing modules
β βββ diffusion/ # Diffusion models
β βββ downloader/ # Data downloaders
β βββ downstream/ # Downstream tasks
β βββ environment/ # Trading environments
β βββ evaluator/ # Evaluation metrics
β βββ exception/ # Exception handling
β βββ factor/ # Factor models
β βββ log/ # Logging system
β βββ loss/ # Loss functions
β βββ memory/ # Memory management
β βββ metric/ # Performance metrics
β βββ models/ # AI models and architectures
β βββ mverl/ # Multi-agent VERL
β βββ optimizer/ # Optimization algorithms
β βββ plot/ # Visualization tools
β βββ processor/ # Data processors
β βββ proxy/ # Proxy management
β βββ reducer/ # Dimensionality reduction
β βββ scheduler/ # Task scheduling
β βββ task/ # Task definitions
β βββ tools/ # Utility tools and integrations
β βββ trainer/ # Training frameworks
β βββ trajectory/ # Trajectory management
β βββ utils/ # Utility functions
β βββ verify/ # Verification tools
βββ scripts/ # Training and execution scripts
βββ examples/ # Example usage scripts
βββ tests/ # Unit tests
βββ libs/ # External libraries (VERL)
βββ res/ # Resources and assets
βββ tools/ # Development tools
- US Markets: DJ30 (Dow Jones 30), SP500 (S&P 500)
- Chinese Markets: SSE50 (Shanghai Stock Exchange 50), HS300 (CSI 300)
- FMP: Financial Modeling Prep - Comprehensive financial data
- Alpaca: US market data and news feeds
- AKShare: Chinese market data and financial information
- TuShare: Chinese financial data and research tools
- Price Data: OHLCV at daily and minute frequencies
- News Data: Financial news and sentiment analysis
- Technical Indicators: Alpha158 factors and custom indicators
- LLM Reasoning: Financial QA datasets and reasoning benchmarks
FinWorld uses a flexible configuration system based on YAML files and the mmengine framework:
- Experiment Management: Centralized configuration for reproducibility
- Component Registry: Flexible component instantiation and management
- Inheritance Support: Configuration inheritance and override mechanisms
- Validation: Automatic configuration validation and error checking
- ARR: Annualized Rate of Return
- SR: Sharpe Ratio
- MDD: Maximum Drawdown
- CR: Calmar Ratio
- SoR: Sortino Ratio
- VOL: Volatility
- MAE: Mean Absolute Error
- MSE: Mean Squared Error
- RankIC: Rank Information Coefficient
- RankICIR: Rank Information Coefficient Information Ratio
- Accuracy: Task-specific accuracy scores
- F1 Score: Precision and recall balance
- Financial Reasoning: Domain-specific evaluation metrics
We welcome contributions from the research community! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style and architecture patterns
- Add comprehensive tests for new functionality
- Update documentation for new features
- Ensure compatibility with existing components
This project is licensed under the MIT License - see the LICENSE file for details.
We thank the following organizations and tools for their contributions:
- VERL: Reinforcement learning framework
- FMP: Financial data API
- Alpaca: Market data provider
- AKShare: Chinese financial data
- MMEngine: Training framework
For questions, issues, or contributions:
- Open an issue on GitHub
- Visit our Project Website for interactive demo and detailed results
- Check the documentation in the
docs/directory - Review example scripts in the
examples/directory
If you find FinWorld useful in your research, please cite our paper:
@article{zhang2025finworld,
title={FinWorld: An All-in-One Open-Source Platform for End-to-End Financial AI Research and Deployment},
author={Zhang, Wentao and Zhao, Yilei and Zong, Chuqiao and Wang, Xinrun and An, Bo},
journal={arXiv preprint arXiv:2508.02292},
year={2025}
}- TradeMaster: A Unified Trading Platform
- Qlib: An AI-oriented Quantitative Investment Platform
- FinRL-Meta: A Universe of Near-Real Market Envirionments
Visit our interactive project website for detailed results, visualizations, and comprehensive documentation:
https://dvampire.github.io/FinWorld/
The website features:
- Interactive architecture overview
- Detailed empirical results with visualizations
- Platform comparison tables
- Quick start guides and examples
FinWorld - Empowering Financial AI Research and Applications
Built with β€οΈ by the FinWorld Team