feat: add HTML report screenshot generation via Playwright

- Add html_report.py module for Playwright-based screenshot generation
- Add generate_html_report() method to SimpleRotationStrategy
- Modify backtest_viewer.html to use window-scoped variables for external injection
- Inject monthly/yearly returns table into screenshot
- Auto-generate HTML report in __main__ after export_results()

Output: simple_rotation_html_report.png with ranking table + monthly returns
This commit is contained in:
2026-06-07 22:43:12 +08:00
parent 06df8767b9
commit f370caeff9
4 changed files with 332 additions and 5 deletions

6
.gitignore vendored
View File

@@ -199,3 +199,9 @@ zhihu-articles/
# Results directory (test outputs, charts, etc.)
results/
# Node.js (local testing only)
node_modules/
package.json
package-lock.json
rotation/test_screenshot.mjs