Analysis Tools
18 tools for drawdown analysis, Monte Carlo, Kelly criterion, win/loss stats, and more.
Analysis tools operate on your trade history (R-multiples, equity values, P&L) to reveal the structure of your edge.
analyze_drawdown
Cost: $0.005 | Analyze drawdown periods from an equity curve.
| Parameter | Type | Required | Description |
|---|---|---|---|
equity_values | string[] | Yes | Equity after each trade (e.g. ["100000", "101500", "99800"]). |
starting_equity | string | Yes | Initial equity before the first trade. |
net_profit | string | No | Total net profit. Used for recovery factor calculation. |
Returns: max_drawdown_pct, max_drawdown_usd, current_drawdown, avg_drawdown, drawdown_count, longest_duration, time_in_drawdown, recovery_factor, ulcer_index, drawdown_periods.
run_monte_carlo
Cost: $0.008 | Simulate future equity paths using historical R-multiples.
| Parameter | Type | Required | Description |
|---|---|---|---|
r_multiples | string[] | Yes | Historical R-multiples (minimum 2). |
starting_equity | string | Yes | Starting equity for simulation. |
num_simulations | int | No | Number of simulations (default 1000, max 10000). |
trades_per_simulation | int | No | Trades per path (default 100). |
risk_per_trade | string | No | Risk fraction per trade (default "0.01"). |
Returns: probability_of_profit, probability_20pct_gain, probability_20pct_drawdown, probability_50pct_drawdown, median_final_equity, p5_final_equity, p95_final_equity, mean_final_equity, best_case, worst_case.
calculate_kelly
Cost: $0.004 | Calculate Kelly criterion position sizing fractions.
| Parameter | Type | Required | Description |
|---|---|---|---|
r_multiples | string[] | Yes | R-multiples from trade history (minimum 2). |
Returns: full_kelly, half_kelly (recommended), quarter_kelly (conservative), risk_of_ruin.
find_variance_killers
Cost: $0.006 | Identify trades that damage geometric growth the most.
A variance killer is a trade whose deviation from the mean hurts G, even if individually profitable. High variance erodes geometric returns.
| Parameter | Type | Required | Description |
|---|---|---|---|
r_multiples | string[] | Yes | R-multiples from trade history (minimum 2). |
trade_ids | string[] | No | Trade identifiers (parallel to r_multiples). |
symbols | string[] | No | Symbols (parallel to r_multiples). |
Returns: top 5 killers each with index, r_multiple, g_impact, variance_contribution, potential_g_improvement.
analyze_win_loss
Cost: $0.004 | Calculate win/loss statistics from R-multiples.
| Parameter | Type | Required | Description |
|---|---|---|---|
r_multiples | string[] | Yes | R-multiples from trade history. |
pnl_values | string[] | No | USD P&L per trade (parallel to r_multiples). |
Returns: win_rate, loss_rate, avg_win_r, avg_loss_r, avg_win_usd, avg_loss_usd, payoff_ratio, profit_factor, expectancy, net_pnl.
run_what_if
Cost: $0.008 | Explore G improvement scenarios.
Shows how G would change if losses were capped at different levels, or if the worst trades were avoided.
| Parameter | Type | Required | Description |
|---|---|---|---|
r_multiples | string[] | Yes | R-multiples from trade history (minimum 2). |
Returns: loss_cap_scenarios (G at -0.5R, -1R, -1.5R, -2R caps), avoidance_scenarios (G after removing worst 5%/10%/15%/20% of trades), top_variance_killers.
detect_regime
Cost: $0.006 | Detect current market regime from OHLCV bars.
Classifies: TRENDING_UP, TRENDING_DOWN, RANGING, LOW_VOLATILITY, VOLATILE.
| Parameter | Type | Required | Description |
|---|---|---|---|
bars | object[] | Yes | OHLCV bars (minimum 200). Each bar has open, high, low, close, volume as strings. |
Returns: regime, trend_direction, trend_strength, volatility_state, volatility_percentile, atr.
analyze_confidence
Cost: $0.005 | Confidence interval analysis on R-multiples. Returns mean, standard deviation, and confidence bounds at 90%, 95%, and 99% levels.
| Parameter | Type | Required |
|---|---|---|
r_multiples | string[] | Yes |
analyze_consistency
Cost: $0.005 | Measure trading consistency. Compares recent performance windows to detect behavioral drift.
| Parameter | Type | Required |
|---|---|---|
r_multiples | string[] | Yes |
analyze_correlation
Cost: $0.005 | Correlation analysis between R-multiples and external factors. Detects serial correlation in trade outcomes.
| Parameter | Type | Required |
|---|---|---|
r_multiples | string[] | Yes |
analyze_distribution
Cost: $0.005 | Analyze the statistical distribution of R-multiples. Returns skewness, kurtosis, normality test, percentiles, and tail risk.
| Parameter | Type | Required |
|---|---|---|
r_multiples | string[] | Yes |
analyze_recovery
Cost: $0.005 | Analyze recovery patterns after drawdowns. Returns average recovery time, recovery R needed, and worst recovery period.
| Parameter | Type | Required |
|---|---|---|
r_multiples | string[] | Yes |
analyze_risk_adjusted
Cost: $0.005 | Risk-adjusted return metrics. Returns Sharpe-like ratio, Sortino equivalent, Calmar ratio, and risk-adjusted G.
| Parameter | Type | Required |
|---|---|---|
r_multiples | string[] | Yes |
segment_trades
Cost: $0.005 | Analyze G metrics by segment to find where your edge lives.
| Parameter | Type | Required | Description |
|---|---|---|---|
trades | object[] | Yes | Trade objects with pnl_r, pnl_usd, and optional symbol, day_of_week, strategy_id, regime. |
segment_by | string | No | Dimension: "symbol", "day_of_week", "strategy", "regime". Default "symbol". |
Returns per-segment: g, expected_r, variance, win_rate, total_pnl, helps_g (bool).
analyze_execution_quality
Cost: $0.005 | Analyze trade execution using MAE/MFE analysis.
| Parameter | Type | Required | Description |
|---|---|---|---|
r_multiples | string[] | Yes | R-multiples from trade history. |
mae_values | string[] | No | Maximum Adverse Excursion in R. |
mfe_values | string[] | No | Maximum Favorable Excursion in R. |
hold_times_hours | string[] | No | Hold time in hours per trade. |
Returns: avg_mae_r, avg_mfe_r, entry_efficiency, exit_efficiency, avg_winner_hold_time, avg_loser_hold_time.
detect_peak_valley
Cost: $0.005 | Detect peaks and valleys in an equity curve.
| Parameter | Type | Required | Description |
|---|---|---|---|
equity_values | string[] | Yes | Equity values after each trade. |
starting_equity | string | Yes | Initial equity. |
Returns: ath_count, atl_depth, avg_peak_to_valley_drop, avg_valley_to_peak_gain, current_state (AT_PEAK, AT_VALLEY, BETWEEN).
calculate_rolling_g
Cost: $0.005 | Calculate rolling G over sliding windows to track edge evolution.
| Parameter | Type | Required | Description |
|---|---|---|---|
r_multiples | string[] | Yes | R-multiples from trade history (minimum 2). |
window_size | int | No | Rolling window size (default 10). |
Returns: rolling_g_values, trend (IMPROVING, STABLE, DECLINING), trend_slope.
calculate_system_r_score
Cost: $0.005 | Calculate the System R Score (0 to 100 composite grade) from R-multiples.
| Parameter | Type | Required |
|---|---|---|
r_multiples | string[] | Yes |
Returns: score (0 to 100), grade (A+ through F), components breakdown.
| Python SDK | pip install systemr |
| MCP Server | agents.systemr.ai/mcp/sse |
| OpenAPI Spec | agents.systemr.ai/openapi.json |
| Machine Docs | agents.systemr.ai/llms.txt |
| GitHub | System-R-AI |
| X | @Systemrai |
| YouTube | @systemr_ai |
| hello@systemr.ai | |
| Phone | 628 333 6693 |
| Address | 7901 4TH ST N, STE 28529, ST PETERSBURG, FL 33702 |
| Terms | Terms of Service |
| Privacy | Privacy Policy |
| Security | Security Policy |