Technical Indicator Backtest
GET/api/v1.0/quote/{symbol}/indicator-backtestGet historical backtest statistics (total occurrences, next-day up/down counts, probability of rising, average return, max gain/drawdown) for a specific indicator polarity signal on a stock.
Request
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
symbol | string | path | yes | Stock symbol (path param), e.g. US.TSLA / US.AAPL / HK.00700 |
indicator_id | int | query | yes | Indicator enum ID (1~15, same as quote.indicator_polarity) |
polarity | string | query | no | Polarity state to backtest, default OVER_SOLD |
period | string | query | no | K-line period: DAY_1 (default) / HOUR_1 / MINUTE_1 |
Example
bash
curl -X GET 'https://webapi.futunn.com/api/v1.0/quote/US.AAPL/indicator-backtest?indicator_id=1&polarity=1&period=1' \
-H 'Authorization: Bearer <AccessToken>' | jqResponse
| Field | Type | Description |
|---|---|---|
data.occurs_total | integer | Total historical occurrences |
data.occurs_up | integer | Next-day up occurrences |
data.occurs_down | integer | Next-day down occurrences |
data.probability_up | number | Probability of rising next day (percent) |
data.probability_down | number | Probability of falling next day (percent) |
data.avg_change_pct | number | Average next-day percentage change (percent) |
data.max_up_pct | number | Maximum gain (percent) |
data.max_down_pct | number | Maximum drawdown (percent) |
Errors
| ret_code | error.code | Description |
|---|---|---|
| 0 | — | Success |
| -3 | invalid_parameter | Missing or invalid parameter |
| -7 | invalid_symbol | Unknown symbol |
| -8 | unsupported | Market or product is not supported |
| -9 | permission_denied | Missing permission |
| -10 | no_data | No data |
| -11 | rate_limited | Too many requests |
Sample
json
{
"ret_code": 0,
"ret_msg": "success",
"data": {
"occurs_total": 0,
"occurs_up": 0,
"occurs_down": 0,
"probability_up": "example",
"probability_down": "example",
"avg_change_pct": "example",
"max_up_pct": "example",
"max_down_pct": "example"
}
}