feat: Implement Alpha list and metrics enhancements
Deploy production / deploy (push) Successful in 1m12s

- Added new metrics fields: sub_universe_sharpe, robust_universe_sharpe, two_year_sharpe, prod_correlation, pnl, check_type, and neutralization to the Alpha model.
- Updated snapshot_columns function to derive new metrics and check types from platform snapshots.
- Enhanced API to include failed checks and check types in responses.
- Created migration script to backfill existing Alpha records with new metrics and check types.
- Updated frontend components to display new metrics and allow editing of custom tags.
- Improved filtering and sorting capabilities for new metrics in the Alpha list.
- Added tests for new functionality including checks classification and metrics filtering.
This commit is contained in:
yuxuanhui
2026-09-09 19:02:37 +08:00
parent e57b1f7a2e
commit ba0ed9d03f
13 changed files with 678 additions and 22 deletions
+7
View File
@@ -79,6 +79,13 @@ class Alpha(Base):
turnover: Mapped[float | None] = mapped_column(Float)
margin: Mapped[float | None] = mapped_column(Float)
drawdown: Mapped[float | None] = mapped_column(Float)
sub_universe_sharpe: Mapped[float | None] = mapped_column(Float)
robust_universe_sharpe: Mapped[float | None] = mapped_column(Float)
two_year_sharpe: Mapped[float | None] = mapped_column(Float)
prod_correlation: Mapped[float | None] = mapped_column(Float)
pnl: Mapped[float | None] = mapped_column(Float)
neutralization: Mapped[str | None] = mapped_column(Text)
check_type: Mapped[str] = mapped_column(String(20), default="PENDING", server_default="PENDING", index=True)
date_created: Mapped[datetime | None] = mapped_column(DateTime(timezone=True), index=True)
date_submitted: Mapped[datetime | None] = mapped_column(DateTime(timezone=True))
synced_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), default=now)