feat: cockpit
This commit is contained in:
@@ -256,6 +256,16 @@ def portfolio_risk():
|
||||
return _sanitize(result)
|
||||
|
||||
|
||||
@router.get("/portfolio-risk-radar")
|
||||
def portfolio_risk_radar():
|
||||
"""5-axis risk radar (Concentration/Volatility/Correlation/Exposure/Drawdown) for the
|
||||
Cockpit's Risk card. Separate from /portfolio-risk above — this one makes live
|
||||
yfinance calls (per-position volatility + a correlation matrix), heavier and slower,
|
||||
so it's not bundled into the lighter endpoint other pages may poll more often."""
|
||||
from services.portfolio_risk import compute_portfolio_risk_radar
|
||||
return _sanitize(compute_portfolio_risk_radar())
|
||||
|
||||
|
||||
class TradeCheckRequest(BaseModel):
|
||||
underlying: str
|
||||
strategy: str
|
||||
|
||||
Reference in New Issue
Block a user