This repository contains pseudocode and algorithms for the paper "$\text{Alpha}^2$: Discovering Logical Formulaic Alphas using Deep Reinforcement Learning". It does not contain a runnnable version of
utils
: utility functions for logging and loading configscomputation_data.py
: Generates a data file for the experiment ro runrun.py
: main file for running the experimentrun.sh
: script to start an experiment: first generate computation data, then start the runnerconfigs
configuration filestrainer.py
: definition of MCTS and network trainer actors for rayexpression
contains definition of the environment, including:evaluate.py
defines teh evaluation functionlegal_actions.py
calculates the legal actions when expanding an MCTS nodemeta_data.py
meta data of stock/futures marketoperands.py
definition of operandsoperators.py
definition of operatorstokens.py
tokens wrap the implementation of operators, and implements a "validity_check" function for legal action checkport.py
avoid ray recursive importstructure.py
defines the structure of tokens, tree nodes, dimensions and valuestree.py
defines the structure and computation of expression trees
mcts
contains MCTS and network related code, which is an modificated version of alphadev
@article{xu2024textalpha2,
title={$\text{Alpha}^2$: Discovering Logical Formulaic Alphas using Deep Reinforcement Learning},
author={Feng Xu and Yan Yin and Xinyu Zhang and Tianyuan Liu and Shengyi Jiang and Zongzhang Zhang},
journal={arXiv preprint arXiv:2406.16505},
year={2024}
}