# AlphaBook Reversion MCP (`neeenja/alphabook-reversion`) Actor

- **URL**: https://apify.com/neeenja/alphabook-reversion.md
- **Developed by:** [Neeen Ja](https://apify.com/neeenja) (community)
- **Categories:** MCP servers, AI
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 reversion analysis calls

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## AlphaBook Reversion MCP

Mean-reversion signal engine as a remote MCP server. It tells your agent **whether a price is stretched to an extreme and likely to snap back, with an invalidation level** — not a pile of raw oscillator numbers. Seven tools cover Bollinger/CCI/Williams %R, rolling Z-score, RSI divergence, KDJ, intraday VWAP reversion, short-term reversal baskets, and a valuation-band check.

Works on China A-shares, HK and US through free public data. No API key. **Not investment advice.**

> **Regime honesty:** mean reversion works best in a ranging market (ADX < 20). When ADX > 25 the tools say so and do not pretend a reversion signal is reliable. A-share intraday VWAP reversion is explicitly rejected (T+1: you cannot close the same day), and the tool says so instead of fabricating a signal.

### Tools

| Tool | Event | Returns |
|------|-------|---------|
| `get_reversion_signal` | tool-call $0.02 | Bollinger + CCI + Williams %R verdict, invalidation level |
| `compute_deviation_zscore` | tool-call $0.02 | Rolling Z-score of price vs its mean, historical percentile |
| `detect_divergence` | tool-call $0.02 | Bullish / bearish RSI divergence + confirmation state |
| `get_kdj_signal` | tool-call $0.02 | KDJ cross + zone + MA20 trend filter |
| `get_intraday_vwap_reversion` | tool-call $0.02 | Intraday VWAP deviation (rejects A-shares) |
| `get_short_term_reversal` | **screen-call $0.05** | 5-day reversal basket ranking, up to 10 codes |
| `get_valuation_band_reversion` | tool-call $0.02 | PE(TTM)/PB(MRQ) band classification (East Money snapshot) |

### Connect (MCP client)

The server is exposed as a Streamable HTTP MCP endpoint:

```
https://neeenja--alphabook-reversion.apify.actor/mcp
```

Authenticate with your Apify token:

```
Authorization: Bearer <APIFY_TOKEN>
```

POST JSON-RPC messages: `initialize`, `tools/list`, `tools/call`. Example `tools/call`:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": { "name": "get_reversion_signal", "arguments": { "code": "600519", "bars": 120 } }
}
```

### Pricing

Pay-per-event. `initialize` and `tools/list` are free (so your client can always connect). Each analysis call is **$0.02**; a basket reversal ranking (`get_short_term_reversal`) is **$0.05** because it pulls up to 10 symbols.

### Data sources & honest limits

- **Daily / minute bars:** Tencent `gtimg.cn` / `ifzq.gtimg.cn` (A/HK/US) and Yahoo (global). Free, no key.
- **Valuation:** East Money datacenter snapshot. **Snapshot only — no historical time-series**, so the valuation-band tool reports a current band, not a true percentile. It says so.
- Missing data → `n/a`, never a fabricated `0`.
- All output carries a `NOT_ADVICE` disclaimer. Market risk is real; verify before acting.

***

## AlphaBook 均值回归 MCP

均值回归信号引擎，以远程 MCP 服务器形式提供。它告诉你的 agent **当前价格是否偏离极值、是否可能回归，并给出失效位**——而不是甩一堆摆荡指标原始数值。七个工具覆盖布林带 / CCI / 威廉指标、滚动 Z-Score、RSI 背离、KDJ、日内 VWAP 回归、短期反转篮子和估值带检查。

支持 A 股、港股、美股，使用免费公开数据，无需 API Key。**不构成投资建议。**

> **关于市场状态的诚实声明：** 均值回归在震荡市（ADX < 20）最有效。当 ADX > 25（趋势市）时，工具会明确提示，不会假装回归信号可靠。A 股日内 VWAP 回归被显式拒绝（T+1：当日不可平仓），工具会如实说明，而非编造信号。

### 工具

| 工具 | 计费事件 | 返回 |
|------|----------|------|
| `get_reversion_signal` | tool-call $0.02 | 布林+CCI+威廉 综合回归判定与失效位 |
| `compute_deviation_zscore` | tool-call $0.02 | 价格相对均值的滚动 Z-Score 及历史分位 |
| `detect_divergence` | tool-call $0.02 | 看涨/看跌 RSI 背离及确认状态 |
| `get_kdj_signal` | tool-call $0.02 | KDJ 金叉/死叉 + 超买超卖区 + MA20 趋势过滤 |
| `get_intraday_vwap_reversion` | tool-call $0.02 | 日内 VWAP 偏离（拒绝 A 股） |
| `get_short_term_reversal` | **screen-call $0.05** | 5 日短期反转篮子排名，最多 10 只 |
| `get_valuation_band_reversion` | tool-call $0.02 | PE(TTM)/PB(MRQ) 估值带分类（东方财富快照） |

### 连接（MCP 客户端）

服务器以 Streamable HTTP MCP 端点暴露：

```
https://neeenja--alphabook-reversion.apify.actor/mcp
```

使用 Apify token 鉴权：

```
Authorization: Bearer <APIFY_TOKEN>
```

发送 JSON-RPC 消息：`initialize`、`tools/list`、`tools/call`。`tools/call` 示例：

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": { "name": "get_reversion_signal", "arguments": { "code": "600519", "bars": 120 } }
}
```

### 计费

按事件付费。`initialize` 与 `tools/list` 免费（保证客户端始终能连上）。每次分析调用 **$0.02**；篮子反转排名（`get_short_term_reversal`）为 **$0.05**，因其最多拉取 10 只标的。

### 数据源与诚实边界

- **日线 / 分钟线：** 腾讯 `gtimg.cn` / `ifzq.gtimg.cn`（A/港/美）与 Yahoo（全球），免费、无需 Key。
- **估值：** 东方财富 datacenter 快照。**仅当前快照，无历史时间序列**，故估值带工具只报当前水位，不报真实分位，且会如实声明。
- 数据缺失 → 返回 `n/a`，绝不编造 `0`。
- 所有输出均带 `NOT_ADVICE` 免责声明。市场风险真实存在，行动前请自行核实。

***

## AlphaBook 均值回歸 MCP

均值回歸訊號引擎，以遠端 MCP 伺服器形式提供。它告訴你的 agent **目前價格是否偏離極值、是否可能回歸，並給出失效位**——而不是丟一堆擺盪指標原始數值。七個工具涵蓋布林帶 / CCI / 威廉指標、滾動 Z-Score、RSI 背離、KDJ、日內 VWAP 回歸、短期反轉籃子與估值帶檢查。

支援 A 股、港股、美股，使用免費公開資料，無需 API Key。**不構成投資建議。**

> **關於市場狀態的誠實聲明：** 均值回歸在震盪市（ADX < 20）最有效。當 ADX > 25（趨勢市）時，工具會明確提示，不會假裝回歸訊號可靠。A 股日內 VWAP 回歸被顯式拒絕（T+1：當日不可平倉），工具會如實說明，而非編造訊號。

### 工具

| 工具 | 計費事件 | 回傳 |
|------|----------|------|
| `get_reversion_signal` | tool-call $0.02 | 布林+CCI+威廉 綜合回歸判定與失效位 |
| `compute_deviation_zscore` | tool-call $0.02 | 價格相對均值的滾動 Z-Score 與歷史分位 |
| `detect_divergence` | tool-call $0.02 | 看漲/看跌 RSI 背離與確認狀態 |
| `get_kdj_signal` | tool-call $0.02 | KDJ 黃金/死亡交叉 + 超買超賣區 + MA20 趨勢過濾 |
| `get_intraday_vwap_reversion` | tool-call $0.02 | 日內 VWAP 偏離（拒絕 A 股） |
| `get_short_term_reversal` | **screen-call $0.05** | 5 日短期反轉籃子排名，最多 10 檔 |
| `get_valuation_band_reversion` | tool-call $0.02 | PE(TTM)/PB(MRQ) 估值帶分類（東方財富快照） |

### 連線（MCP 用戶端）

伺服器以 Streamable HTTP MCP 端點暴露：

```
https://neeenja--alphabook-reversion.apify.actor/mcp
```

使用 Apify token 鑑權：

```
Authorization: Bearer <APIFY_TOKEN>
```

發送 JSON-RPC 訊息：`initialize`、`tools/list`、`tools/call`。`tools/call` 範例：

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": { "name": "get_reversion_signal", "arguments": { "code": "600519", "bars": 120 } }
}
```

### 計費

按事件付費。`initialize` 與 `tools/list` 免費（確保用戶端隨時能連上）。每次分析呼叫 **$0.02**；籃子反轉排名（`get_short_term_reversal`）為 **$0.05**，因其最多抓取 10 檔標的。

### 資料來源與誠實邊界

- **日線 / 分鐘線：** 騰訊 `gtimg.cn` / `ifzq.gtimg.cn`（A/港/美）與 Yahoo（全球），免費、無需 Key。
- **估值：** 東方財富 datacenter 快照。**僅當前快照，無歷史時間序列**，故估值帶工具只報目前水位，不報真實分位，且會如實聲明。
- 資料缺失 → 回傳 `n/a`，絕不編造 `0`。
- 所有輸出均附 `NOT_ADVICE` 免責聲明。市場風險真實存在，行動前請自行核實。

# Actor input Schema

## Actor input object example

```json
{}
```

# Actor output Schema

## `mcpEndpoint` (type: `string`):

Streamable HTTP MCP endpoint of this Actor run. Connect an MCP client here (Authorization: Bearer \<APIFY_TOKEN>). POST JSON-RPC messages: initialize, tools/list, tools/call.

## `tools` (type: `string`):

Comma-separated list of the seven tools: get_reversion_signal, compute_deviation_zscore, detect_divergence, get_kdj_signal, get_intraday_vwap_reversion, get_short_term_reversal, get_valuation_band_reversion.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("neeenja/alphabook-reversion").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("neeenja/alphabook-reversion").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call neeenja/alphabook-reversion --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,neeenja/alphabook-reversion"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/feO7BkUlXT4thHKJx/builds/1RJtDx0HdoYQZISAp/openapi.json
