You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+18-17
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,20 @@
6
6
7
7
Automatic formulaic alpha generation with reinforcement learning.
8
8
9
-
Paper *Generating Synergistic Formulaic Alpha Collections via Reinforcement Learning* accepted by [KDD 2023](https://kdd.org/kdd2023/), Applied Data Science (ADS) track.
9
+
This repository contains the code for our paper *Generating Synergistic Formulaic Alpha Collections via Reinforcement Learning* accepted by [KDD 2023](https://kdd.org/kdd2023/), Applied Data Science (ADS) track, publically available on [ACM DL](https://dl.acm.org/doi/10.1145/3580305.3599831). Some extensions upon this work are also included in this repo.
10
10
11
-
Paper available on [ACM DL](https://dl.acm.org/doi/10.1145/3580305.3599831) or [arXiv](https://arxiv.org/abs/2306.12964).
11
+
## Repository Structure
12
+
13
+
-`/alphagen` contains the basic data structures and the essential modules for starting an alpha mining pipeline;
14
+
-`/alphagen_qlib` contains the qlib-specific APIs for data preparation;
15
+
-`/alphagen_generic` contains data structures and utils designed for our baselines, which basically follow [gplearn](https://github.com/trevorstephens/gplearn) APIs, but with modifications for quant pipeline;
16
+
-`/alphagen_llm` contains LLM client abstractions and a set of prompts useful for LLM-based alpha generation, and also provides some LLM-based automatic iterative alpha-generation routines.
17
+
-`/gplearn` and `/dso` contains modified versions of our baselines;
18
+
-`/scripts` contains several scripts for running the experiments.
12
19
13
-
## How to reproduce?
20
+
## Result Reproduction
14
21
15
-
Note that you can either use our builtin alpha calculation pipeline(see Choice 1), or implement an adapter to your own pipeline(see Choice 2).
22
+
Note that you can either use our builtin alpha calculation pipeline(see Choice 1), or implement an adapter to your own pipeline(see Choice 2).
16
23
17
24
### Choice 1: Stock data preparation
18
25
@@ -80,13 +87,14 @@ These parameters will define a RL run:
Please run the individual scripts at the root directory of this project as modules, i.e. `python -m scripts.NAME ARGS...`.
93
+
Use `python -m scripts.NAME -h` for information on the arguments.
88
94
89
-
Where `SEED` is random seed, e.g., `1` or `1,2`, `POOL_CAPACITY` is the size of combination model and, `NUM_STEPS` is the limit of RL steps.
95
+
-`scripts/rl.py`: Main experiments of AlphaGen/HARLA
96
+
-`scripts/llm_only.py`: Alpha generator based solely on iterative interactions with an LLM.
97
+
-`scripts/llm_test_validity.py`: Tests on how the system prompt affects the valid alpha rate of an LLM.
90
98
91
99
### After running
92
100
@@ -105,13 +113,6 @@ Where `SEED` is random seed, e.g., `1` or `1,2`, `POOL_CAPACITY` is the size of
105
113
106
114
[DSO](https://github.com/brendenpetersen/deep-symbolic-optimization) is a mature deep learning framework for symbolic optimization tasks. We maintained a minimal version of DSO to make it compatiable with our task. The corresponding experiment scipt is [dso.py](dso.py)
107
115
108
-
## Repository Structure
109
-
110
-
-`/alphagen` contains the basic data structures and the essential modules for starting an alpha mining pipeline;
111
-
-`/alphagen_qlib` contains the qlib-specific APIs for data preparation;
112
-
-`/alphagen_generic` contains data structures and utils designed for our baselines, which basically follow [gplearn](https://github.com/trevorstephens/gplearn) APIs, but with modifications for quant pipeline;
113
-
-`/gplearn` and `/dso` contains modified versions of our baselines.
114
-
115
116
## Trading (Experimental)
116
117
117
118
We implemented some trading strategies based on Qlib. See [backtest.py](backtest.py) and [trade_decision.py](trade_decision.py) for demos.
@@ -147,4 +148,4 @@ Thanks to the following contributors:
147
148
148
149
Thanks to the following in-depth research on our project:
0 commit comments