We are grateful to Dimitris Papanikolaou (the Editor), two anonymous referees, David Avramov, Agostino Capponi, Bing Han, Serhiy Kozak, Andreas Neuhierl, Tom Sargent, and Guofu Zhou for detailed feedback and to Si Cheng for kindly sharing the data on market illiquidity. We also thank Ludwig Chincarini, John Cochrane, Gianluca De Nard, Marcos de Prado, Gavin Feng, Itay Goldstein, Jillian Grennan, Cam Harvey, Andrew Karolyi, Bryan Kelly, Sophia Zhengzi Li, Alejandro Lopez-Lira, Stefan Nagel, Markus Pelger, Amin Shams, Jinfei Sheng, Zhan Shi, Stathis Tompaidis, Neng Wang, Michael Weber, Dacheng Xiu, Mao Ye, Lu Zhang, Luofeng Zhou, and conference and seminar reviewers and participants at the 38th ABFC International Forum, Annual Conference in Digital Economics, Cambridge Algorithmic Trading Society Quant Conference, 2024 CCER Summer Institute, 2nd Conference on FinTech, Innovation and Development (Hangzhou), 2021 Academic Research Colloquium, 2022 AFA Annual Meeting, Australasian Banking and Finance conference, 5th Big Data Econometrics Theory and Applications Conference, Blackrock FMG Webinar, Bloomberg CTO Data Science Speaker Series, Boston Fed, BU, 10th Annual Workshop of Business Financing and Banking Research Group(USyd), Baylor University, CKGSB, 2021 CICF (Shanghai), 15th China International Conference on Insurance and Risk Management, 3rd China International Forum on Finance and Policy, The Chinese Economist Society Annual Deans’ Forum, Cornell SC Johnson, Cornell Tech, Center for Research in Economics and Statistics and Ecole Polytechnique, 3rd Joint Conference of Statistics and Data Science in China, CUHK, CUHK (Shenzhen), Econometric Society World Congress (Milan), Duke Fuqua, 2024 EFMA Annual Meeting, Financial Markets and Corporate Governance Conference (FMCG), 2025 FMA Annual Meeting, Fudan, Georgetown University Global Virtual Seminar Series on FinTech “Machine Learning Day,” Global Digital Economy Summit for Small and Medium Enterprises, Global Quantitative and Macro Investment Conference (Wolfe QES), Goethe University Frankfurt, Harvest Fund 25th Anniversary Ceremony, HKU-SCF FinTech Academy Distinguished Lecture, HK Baptist, Lingnan (HK), HKMA & Academy of Finance, IIF International Research Conference & Award Summit, 2021 I NFORMS Annual Meeting, INQUIRE UK/Europe Webinar, KAIST Digital Finance Conference, London Quant Group (LQG) webinar, Luohan Academy Webinar, 13th International Risk Management Conference (IRMC), Machine Lawyering Conference: Human Sovereignty and Machine Efficiency in the Law, 1st Annual MARC Conference at the University of Toronto, 2023 Mid-South DATA Conference (Memphis), Midwest Finance Association Annual Meeting, NUS DAO-ISEM-IORA, National Excellent Students Summer Camp at Fudan, NTU (Dean’s Distinguished Speaker Series), 1st Annual MARC Conference at UoT, NUS, 2021 NBER Conference on Big Data and Securities Markets, 2024 NBER Summer Institute (Asset Pricing), P HBS, PKU-NSD, Peking University School of Mathematical Sciences, PolyU Digital Finance Symposium, QJF 2024 Forum, RSiFEB, SAIF, 6th Shanghai Financial Forefront Symposium, Shenzhen Loop Area Institute, Singapore Initiative on Digital Economics Annual Workshop, Southwestern Finance Association Annual Meeting, Annual Meeting of the Swiss Society for Financial Market Research (SGF), SFS Cavalcade (Seoul), Stanford MS&E, Stanford SITE “Macro Finance and Computation,” Toulouse School of Economics, University of Turin Collegio Carlo Alberto, UF Research Conference on Machine Learning in Finance, University of Virginia McIntire School of Commerce and Darden School of Business, World Finance Conference, 4th Workshop on Big Data Econometric Theory and Application, Xi’an Jiaotong University, 2023 XJTL U AI and Big Data in Accounting and Finance Conference, XueShuo/DEFT Summer Institute in Digital Finance, Yangtze River Delta International Forum “Corporate Finance and Financial Markets,” and Zhongnan University of Economics and Law for their comments. Jiahao Wen and Yang Zhang provided exceptional and integral technical contributions assisting the project; Pietro Bini, Fujie Wang, Hanyao Zhang, and Guanyu Zhou also provided excellent research assistance. This research was funded in part by the Ewing Marion Kauffman Foundation, INQ UIRE UK, ICPM Research Award, and Cornell Center for Social Sciences. The contents of this article are solely the responsibility of the authors. The paper was previously titled “Goal-Orient ed Portfolio Management Through Transformer-Based Reinforcement Learning” and includes partial results from the earlier working paper under the title “Direct Construction Through Deep Reinforcement Learning and Interpretable AI” (jointly with Yang Zhang). Send correspondence to Cong. The views expressed herein are those of the authors and do not necessarily reflect the views of the National Bureau of Economic Research.