panda_factor  by PandaAI-Tech

Quant finance library for factor research and production

Created 5 months ago
2,027 stars

Top 22.0% on SourcePulse

GitHubView on GitHub
Project Summary

PandaFactor is a high-performance quantitative factor library designed for financial data analysis, technical indicator calculation, and factor construction. It caters to both quantitative traders with programming experience and those who prefer a formula-based approach, aiming to streamline the process of developing and utilizing alpha factors.

How It Works

The library supports two primary methods for factor creation: a Python-based object-oriented approach inheriting from a Factor class and a formula-based syntax for simpler expressions. The Python method requires implementing a calculate method that returns a Pandas Series with a multi-index of 'symbol' and 'date'. The formula method allows for complex expressions using built-in functions, operators, and intermediate variables, with the system evaluating the last line as the factor value. This dual approach offers flexibility and ease of use for different user skill levels.

Quick Start & Requirements

  • Installation: For individual users, a pre-packaged database is available upon request; run bin/db_start.bat after extraction. For teams, clone the source and set up MongoDB, configuring panda_common/config.yaml.
  • Prerequisites: MongoDB is required for team deployments.
  • Data: Includes five years of historical data; automatic nightly updates are planned for Tushare, RiceQuant, Tqsdk, QMT, Wind, and Choice data sources.
  • Usage: Integrate factors into existing systems via panda_data.init() and panda_data.get_factor_by_name().
  • Developer Setup: Mark relevant directories as "Sources root" in PyCharm or run pip install -e . in each submodule's directory in VS Code.

Highlighted Details

  • Supports both Python class-based and formula-based factor definition.
  • Includes a factor persistence feature for saving and fast retrieval of computed factors.
  • Offers LLM integration for OpenAI-compatible APIs, including Deepseek.
  • Provides a project structure with modules for common functions, data handling, LLM integration, and a web interface.

Maintenance & Community

The project welcomes contributions via forks, issues, and pull requests. Community support and business inquiries can be directed through provided channels.

Licensing & Compatibility

Licensed under GPLV3. This license may impose copyleft restrictions, requiring derivative works to also be open-sourced under GPLV3, which could affect commercial use or integration into closed-source proprietary systems.

Limitations & Caveats

The project is actively integrating several data sources, with some listed as "testing" or "in progress," indicating potential instability or incomplete support for these sources. The GPLV3 license may present compatibility challenges for commercial, closed-source applications.

Health Check
Last Commit

3 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
2
Star History
326 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Gabriel Almeida Gabriel Almeida(Cofounder of Langflow), and
5 more.

lit by PAIR-code

0.1%
4k
Interactive ML model analysis tool for understanding model behavior
Created 5 years ago
Updated 4 weeks ago
Feedback? Help us improve.