examples: synergy_market.py (anomalyx + agent-calc)#67
Conversation
Chains two contract-first CLIs through their typed JSON envelopes on the live market: anomalyx finds the anomalous days and the price regime shift (point.modz / mv.mahalanobis / coll.cusum), then agent-calc computes exact statistics on those findings — describe_sample (fat-tailed kurtosis), the worst day's tail probability under a fitted Gaussian (normal_cdf), a two-sample Welch t-test across the detected CUSUM break, and exact Pearson r of each basket name to the market. Read-only public data (yfinance), no key. Lives outside the Cargo workspace (shells out to both binaries), so no build or gate impact. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 2 minutes and 2 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Adds
examples/synergy_market.py— a worked example chaining two contract-first CLIs on the live market through their typed JSON envelopes:point.modz/mv.mahalanobis/coll.cusum.describe_sample— the return distribution (its fat-tailed kurtosis is the story);normal_cdf— the worst day's tail probability under a fitted Gaussian (routinely "1-in-millions", i.e. the model is what's broken, not the market);two_sample_t— a Welch test across the detected CUSUM break (is it a real shift in mean return, or only in trajectory?);correlation— exact Pearsonrof each basket name to the market proxy.The point of the pairing: both halves emit machine-readable contracts, so the detector's output feeds the math kernel with no prose and no float drift.
Read-only public data (yfinance), no API key. Lives outside the Cargo workspace (shells out to the
anomalyxandagent-calcbinaries via$ANOMALYX/$AGENT_CALC), so no build or gate impact.examples/README.mdandCHANGELOG.mdupdated.🤖 Generated with Claude Code