Releases: Anarkitty1/semantic-frame
Releases · Anarkitty1/semantic-frame
v0.4.0
Trading Module for AI Agents 🤖📈
This release adds a complete trading intelligence toolkit for agent-based trading systems.
New Trading Functions
All available at top-level: from semantic_frame import describe_drawdown, ...
| Function | Description |
|---|---|
describe_drawdown |
Equity curve drawdown analysis with severity classification |
describe_trading_performance |
Win rate, Sharpe, profit factor, risk profile |
describe_rankings |
Compare multiple agents/strategies |
describe_anomalies |
Enhanced anomaly detection with severity levels |
describe_windows |
Multi-timeframe trend alignment |
describe_regime |
Market regime detection (bull/bear/sideways) |
describe_allocation |
Portfolio allocation suggestions (educational) |
Quick Start
from semantic_frame import describe_drawdown, describe_trading_performance
# Analyze equity curve
equity = [10000, 10500, 10200, 9800, 9500, 10000, 10800]
result = describe_drawdown(equity, context="BTC strategy")
print(result.narrative)
# "The BTC strategy has moderate drawdown risk (max 9.5% over 3 periods)..."
# Analyze trade performance
trades = [100, -50, 75, -25, 150, -30, 80]
result = describe_trading_performance(trades, context="My Agent")
print(result.narrative)
# "My Agent shows good performance with 57% win rate and 2.86x profit factor..."MCP Integration
All trading tools available via MCP for Claude Desktop and Claude Code:
mcp__semantic-frame__describe_drawdownmcp__semantic-frame__describe_trading_performancemcp__semantic-frame__describe_rankingsmcp__semantic-frame__describe_anomaliesmcp__semantic-frame__describe_windowsmcp__semantic-frame__describe_regimemcp__semantic-frame__describe_allocation
Test Coverage
- 1,347 tests passing
- 94% coverage
- 214 trading module tests
See CHANGELOG.md for full details.