CFMTech/Deep-RL-for-Portfolio-Optimization — reverse-engineered prompt
Reverse engineered prompt
Build me a Python research project for experimenting with deep reinforcement learning for portfolio optimization. I want to be able to define a market environment, create a DDPG style agent, train it on a few simple portfolio cost models, then evaluate whether it learns the known good trading or allocation behavior.
Please include clean Python files for the environment, agent, replay memory, models, utilities, and evaluation, plus a summary notebook that walks through the whole flow from setup to training to results. The code should be documented enough that I can change things like uniform versus prioritized sampling without digging through everything.
Use PyTorch and make it easy to run in a conda environment. During training, log useful things like portfolio positions, actions, rewards, signal values, and actor and critic losses so I can inspect them in TensorBoard. Keep it practical and reproducible, like a companion repo for a research paper rather than a polished finance app.
Want more depth? Deep Reverse