Text Generation
Transformers
English
Chinese
finance
reinforcement-learning
reasoning
qwen3
alpha-screening
quantitative-finance
Instructions to use AFatRat/Alpha-R1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AFatRat/Alpha-R1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AFatRat/Alpha-R1")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AFatRat/Alpha-R1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AFatRat/Alpha-R1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AFatRat/Alpha-R1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AFatRat/Alpha-R1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AFatRat/Alpha-R1
- SGLang
How to use AFatRat/Alpha-R1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "AFatRat/Alpha-R1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AFatRat/Alpha-R1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "AFatRat/Alpha-R1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AFatRat/Alpha-R1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AFatRat/Alpha-R1 with Docker Model Runner:
docker model run hf.co/AFatRat/Alpha-R1
Update README.md
Browse files
README.md
CHANGED
|
@@ -21,7 +21,7 @@ tags:
|
|
| 21 |
<img src="https://huggingface.co/front/assets/huggingface_logo.svg" width="120">
|
| 22 |
</p>
|
| 23 |
|
| 24 |
-
**Alpha-R1** is a reasoning-enhanced Large Language Model for quantitative
|
| 25 |
|
| 26 |
It is the official implementation accompanying the paper:
|
| 27 |
|
|
@@ -53,7 +53,7 @@ The model is optimized using reinforcement learning with trading performance as
|
|
| 53 |
- 📊 Strong generalization across different asset pools
|
| 54 |
- 💰 Optimized for alpha generation instead of language modeling
|
| 55 |
|
| 56 |
-
|
| 57 |
|
| 58 |
| Dataset | Annual Return | Sharpe | Max Drawdown |
|
| 59 |
|----------|--------------|---------|--------------|
|
|
@@ -70,14 +70,14 @@ According to the paper, Alpha-R1 achieves:
|
|
| 70 |
| Model Type | Causal Language Model |
|
| 71 |
| Training | Reinforcement Learning Fine-tuning |
|
| 72 |
| Domain | Quantitative Finance |
|
| 73 |
-
| Language | English |
|
| 74 |
-
| Intended Task |
|
| 75 |
|
| 76 |
---
|
| 77 |
|
| 78 |
# Training
|
| 79 |
|
| 80 |
-
Alpha-R1 is initialized from **Qwen3-8B** and further optimized using
|
| 81 |
|
| 82 |
The training objective encourages the model to generate reasoning trajectories that maximize downstream portfolio performance instead of only predicting next tokens.
|
| 83 |
|
|
@@ -90,31 +90,35 @@ The model is trained using:
|
|
| 90 |
|
| 91 |
More details can be found in the accompanying paper.
|
| 92 |
|
| 93 |
-
---
|
| 94 |
-
|
| 95 |
## Training Data
|
| 96 |
|
| 97 |
-
Alpha-R1 was trained
|
| 98 |
|
| 99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
|
| 101 |
-
|
| 102 |
|
| 103 |
-
|
| 104 |
|
| 105 |
-
|
| 106 |
-
- Quantitative investment
|
| 107 |
-
- Alpha mining
|
| 108 |
-
- LLM-based decision making
|
| 109 |
-
- Reinforcement learning for finance
|
| 110 |
|
| 111 |
-
|
| 112 |
|
| 113 |
-
|
| 114 |
-
- Explain factor exposure.
|
| 115 |
-
- Analyze market news.
|
| 116 |
-
- Compare investment opportunities.
|
| 117 |
-
- Generate reasoning for stock selection.
|
| 118 |
|
| 119 |
---
|
| 120 |
|
|
@@ -132,9 +136,10 @@ Example prompts include:
|
|
| 132 |
If you find Alpha-R1 useful, please cite:
|
| 133 |
|
| 134 |
```bibtex
|
| 135 |
-
@article{
|
| 136 |
title={Alpha-R1: Alpha Screening with LLM Reasoning via Reinforcement Learning},
|
| 137 |
-
author={
|
|
|
|
| 138 |
year={2025}
|
| 139 |
}
|
| 140 |
```
|
|
|
|
| 21 |
<img src="https://huggingface.co/front/assets/huggingface_logo.svg" width="120">
|
| 22 |
</p>
|
| 23 |
|
| 24 |
+
**Alpha-R1** is a reasoning-enhanced Large Language Model for quantitative alpha selection, trained with Group Relative Policy Optimization(GRPO) on top of **Qwen3-8B**.
|
| 25 |
|
| 26 |
It is the official implementation accompanying the paper:
|
| 27 |
|
|
|
|
| 53 |
- 📊 Strong generalization across different asset pools
|
| 54 |
- 💰 Optimized for alpha generation instead of language modeling
|
| 55 |
|
| 56 |
+
Alpha-R1 achieves:
|
| 57 |
|
| 58 |
| Dataset | Annual Return | Sharpe | Max Drawdown |
|
| 59 |
|----------|--------------|---------|--------------|
|
|
|
|
| 70 |
| Model Type | Causal Language Model |
|
| 71 |
| Training | Reinforcement Learning Fine-tuning |
|
| 72 |
| Domain | Quantitative Finance |
|
| 73 |
+
| Language | English \ Chinese |
|
| 74 |
+
| Intended Task | Alpha Selection & Financial Reasoning |
|
| 75 |
|
| 76 |
---
|
| 77 |
|
| 78 |
# Training
|
| 79 |
|
| 80 |
+
Alpha-R1 is initialized from **Qwen3-8B** and further optimized using GRPO.
|
| 81 |
|
| 82 |
The training objective encourages the model to generate reasoning trajectories that maximize downstream portfolio performance instead of only predicting next tokens.
|
| 83 |
|
|
|
|
| 90 |
|
| 91 |
More details can be found in the accompanying paper.
|
| 92 |
|
|
|
|
|
|
|
| 93 |
## Training Data
|
| 94 |
|
| 95 |
+
Alpha-R1 was trained on a proprietary financial reasoning dataset constructed by the authors. Rather than relying on an existing benchmark, the training data was generated through a multi-stage pipeline that integrates quantitative market information with semantic reasoning.
|
| 96 |
|
| 97 |
+
The data construction process consists of the following stages:
|
| 98 |
+
|
| 99 |
+
1. **Market Data Abstraction.** Historical market observations were transformed into structured textual descriptions, including price-based market summaries derived from technical indicators, trading activity, and sector rotation, as well as news-based market summaries generated from financial news and macroeconomic events.
|
| 100 |
+
|
| 101 |
+
2. **Iterative Market Memory Construction.** Weekly market descriptions were recursively summarized by an LLM to build a long-term historical market memory, enabling the model to reason over evolving market regimes instead of isolated daily observations.
|
| 102 |
+
|
| 103 |
+
3. **Factor Profiling.** A dynamic factor zoo was constructed from computationally feasible Alpha101 factors. Each factor was systematically backtested over historical data to obtain quantitative performance statistics, including return, volatility, and decay characteristics. These statistics, together with the historical market memory, were used to generate semantic factor descriptions that explain the economic intuition, applicable market regimes, and potential limitations of each factor.
|
| 104 |
+
|
| 105 |
+
4. **Reasoning Training Samples.** Each training sample contains:
|
| 106 |
+
- the current market state,
|
| 107 |
+
- semantic descriptions of candidate factors,
|
| 108 |
+
- historical market memory,
|
| 109 |
+
- and the corresponding factor candidates to be screened.
|
| 110 |
+
|
| 111 |
+
During training, candidate factors were randomly sampled from the full factor pool to encourage reasoning and generalization rather than memorization of specific factors.
|
| 112 |
|
| 113 |
+
5. **Reinforcement Learning Signals.** Instead of human preference annotations, Alpha-R1 employs objective market feedback as supervision. Rewards are computed from realized portfolio performance using a linear reward model, allowing the reasoning policy to be optimized through GRPO toward superior risk-adjusted investment performance.
|
| 114 |
|
| 115 |
+
The training dataset is internally constructed for research purposes and is not publicly released.
|
| 116 |
|
| 117 |
+
## Intended Use
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
|
| 119 |
+
Alpha-R1 is intended solely for **alpha screening** in quantitative investment research. Given the current market state, historical market memory, and semantic descriptions of candidate alpha factors, the model identifies factors that are more likely to generate excess returns under the prevailing market regime.
|
| 120 |
|
| 121 |
+
The model is designed as a research tool for factor selection and should be used together with downstream portfolio construction, risk management, and execution systems. It does not generate trading signals, execute trades, provide investment advice, or manage portfolios autonomously.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
|
| 123 |
---
|
| 124 |
|
|
|
|
| 136 |
If you find Alpha-R1 useful, please cite:
|
| 137 |
|
| 138 |
```bibtex
|
| 139 |
+
@article{jiang2025alphar1,
|
| 140 |
title={Alpha-R1: Alpha Screening with LLM Reasoning via Reinforcement Learning},
|
| 141 |
+
author={Jiang, Zuoyou and Zhao, Li and Sun, Rui and Sun, Ruohan and Li, Zhongjian and Li, Jing and Jiang, Daxin and Bai, Zuo and Hua, Cheng},
|
| 142 |
+
journal={arXiv preprint arXiv:2512.23515},
|
| 143 |
year={2025}
|
| 144 |
}
|
| 145 |
```
|