Field placeholder replacement (DATA_FIELD1 → actual fields)
Infinite retry for critical errors
Real-time progress monitoring
Build support for Windows (EXE), Linux (DEB), macOS (DMG)
Introduction: Difference between Pre-Consultant and Consultant
Pre-Consultant has maximum 5 concurrent simulations
Pre-Consultant has fewer operators and data fields options
Agent N8N
Incoming... lol
Naive-Ollama Alpha Generator (Recommended)
A sophisticated alpha factor generation system that uses Ollama with financial language models to generate, test, and submit alpha factors to WorldQuant Brain. This system replaces the previous Kimi interface with a local Ollama-based solution for better performance and control.
Key Features
Local LLM Integration: Uses Ollama with llama3.2:3b or llama2:7b models
GPU Acceleration: Full NVIDIA GPU support for faster inference
Web Dashboard: Real-time monitoring and control interface
Automated Orchestration: Continuous alpha generation, mining, and submission
WorldQuant Brain Integration: Direct API integration for testing and submission
Docker Support: Easy deployment with Docker and Docker Compose
Daily Rate Limiting: Ensures compliance with WorldQuant submission limits
️ Architecture
…
Quick Start
1. Setup Credentials
Create naive-ollama/credential.txt with your WorldQuant Brain credentials:
cd naive-ollama
# Start the complete system with GPU acceleration
docker-compose -f docker-compose.gpu.yml up -d
# Or use the convenience script
start_gpu.bat
This is basically a closed loop system where it starts with alpha_generator.py, which generates alpha ideas with Kimi AI. Then it dumps promising alpha to a local log file, which promising_alpha_miner.py will mine for better results, and dumps refined alpha to a local log file, which you can run successful_alpha_submitter.py to submit to the WorldQuant platform. These script can run concurrently.
While alpha_expression_miner.py is more of a utility script to mine alpha expressions from a given expression manually but not within the aforementioned closed loop system.
alpha_101_testing is currently under development.
alpha_polisher.py is currently under development.
Installation
bash
pip install -r requirements.txt
Usage
Alpha Generator
The pre-consultant Python alpha generator uses Kimi AI to generate alpha expressions. Notice this may get you some alpha ideas as long as you are fine with the cost.
Human in the loop control is the future development direction of this script.
bash
python alpha_generator.py
Alpha Expression Miner
This script is used to mine alpha expressions from a given expression.
…
Clean Up Logs
This script is used to clean up the logs.
bash
python clean_up_logs.py
Successful Alpha Submitter
This script is used to submit successful alphas to the WorldQuant platform. It's not recommended to use this script as of now because it submits alphas in one batch instead of once per day.
bash
python successful_alpha_submitter.py
Pre-Consultant Non-AI
The machine_lib.py module provides core functionality for alpha generation and testing through the WorldQuant platform. Here are the key components:
WorldQuantBrain Class
The main class that handles interactions with WorldQuant's API and alpha generation logic:
Authentication and session management with WorldQuant platform
Fetching and processing data fields (matrix and vector types)
Generating alpha expressions using operators and data fields
Running simulations to test alpha performance
Processing and analyzing simulation results
Key Features
Automated alpha generation using combinations of:
Data fields (matrix and vector types)
Mathematical operators (+, -, *, /, etc.)
Ranking and scoring functions
Time series operations
Simulation capabilities:
Single alpha testing
Batch simulation support
Performance metrics calculation
Result processing:
Filtering based on performance thresholds
Storing successful alphas
Error handling and logging
Data Processing
Data field categorization (matrix vs vector)
Expression validation
Performance metric calculations:
Information Ratio (IR)
Returns
Turnover
Correlation analysis
The library serves as the foundation for automated alpha mining and testing, providing the necessary tools to interact with WorldQuant's platform programmatically.