minqiyang/equity-factor-research ? reverse-engineered prompt

Reverse engineered prompt

Build me a Python project for equity factor research that is easy to audit and repeat. I want a small toolkit that can load local CSV data or synthetic fixtures, build factor panels, run simple momentum and multi factor demos, and produce clear diagnostics and backtest results with drift aware portfolio accounting.

Please make it feel research grade, with strict data checks, explicit lag handling, reproducible experiment records, and outputs saved as readable markdown and JSON under a reports folder. Include a few runnable demo scripts so I can test the whole workflow end to end with synthetic data, and add guardrails so the backtests do not accidentally use future information.

It should come with tests, a clean project setup, and a quick way to run everything locally. If anything needs current library docs or best practices, look them up online and follow them.