Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save quantra-go-algo/ef4006bba17f82f65ae185ead57dbb67 to your computer and use it in GitHub Desktop.

Select an option

Save quantra-go-algo/ef4006bba17f82f65ae185ead57dbb67 to your computer and use it in GitHub Desktop.
guardrailed-llm-agent — Step 9: Results and Performance Metrics (snippet 1)
mt = metrics_table({
'Agent-only': eq_agent_oos,
'Agent + Guardrails': eq_guard_oos,
'Buy & Hold AAPL': eq_bh_oos,
})
# Expected output (approximate: depends on your LLM's policy calls):
#
# Sharpe CAGR Ann.Vol MaxDD
# Agent-only 1.066 19.83% 18.60% -23.58%
# Agent + Guardrails 1.040 17.13% 16.52% -18.94%
# Buy & Hold AAPL 1.139 29.30% 25.39% -33.36%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment