Backtest a CLIENT-COMPUTED signal/position series - the bridge for "backtest my custom
or AI-generated signal" with NO code run on Helvetic's servers. Your AI computes the
signal (an ML score, sentiment, a custom factor - anything) in its own environment and
passes it here with the matching prices; Helvetic holds that position, applies costs,
and returns the full institutional result, stored with a backtest_id so every analytics
tool (robustness_scorecard, significance_analysis, generate_report, factor_exposure, ...)
works on it.
price_json: prices aligned to the signal, one of:
- [{"date":"2023-01-03","close":101.2}, ...] (date + close)
- {"2023-01-03": 101.2, ...}
signal_json: the per-bar target position aligned to the same dates, one of:
- [{"date":"2023-01-03","signal":1}, ...] (+1 long, -1 short, 0 flat, or any value
in [-max_leverage, max_leverage] for sizing)
- {"2023-01-03": 1, ...}
- a bare list [1, 0, -1, ...] in the same order as the prices
Executed with a >=1 bar lag (no look-ahead) and held until it changes.
params_json (optional): {"name","initial_capital","cost_bps","signal_lag_bars",
"max_leverage","price_adjustment","warmup_bars"}. cost_bps is charged per unit
of position turnover. price_adjustment should say "adjusted close" or "raw close"
when known; if omitted, Helvetic reports it as unknown. >=30 aligned observations
required.