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 runnerconfigsconfiguration filestrainer.py: definition of MCTS and network trainer actors for rayexpressioncontains definition of the environment, including:evaluate.pydefines teh evaluation functionlegal_actions.pycalculates the legal actions when expanding an MCTS nodemeta_data.pymeta data of stock/futures marketoperands.pydefinition of operandsoperators.pydefinition of operatorstokens.pytokens wrap the implementation of operators, and implements a "validity_check" function for legal action checkport.pyavoid ray recursive importstructure.pydefines the structure of tokens, tree nodes, dimensions and valuestree.pydefines the structure and computation of expression trees
mctscontains 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}
}