和顺 / 衡律 返回所属 Agent
9.11

在线模式识别与可交易性评价

原能力

实现在线模式识别,分别评价研究描述、信号及实际可交易条件。(合同附件 R7 9.11)

首选项目

River(BSD-3-Clause)。 River

匹配范围

在线漂移检查与行情/订单对象提供信号输入。

源码

River · class ADWIN

river/drift/adwin.py · 7–20 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
class ADWIN(DriftDetector):
    r"""Adaptive Windowing method for concept drift detection[^1].

    ADWIN (ADaptive WINdowing) is a popular drift detection method with mathematical guarantees.
    ADWIN efficiently keeps a variable-length window of recent items; such that it holds that
    there has no been change in the data distribution. This window is further divided into two
    sub-windows $(W_0, W_1)$ used to determine if a change has happened. ADWIN compares the average of
    $W_0$ and $W_1$ to confirm that they correspond to the same distribution. Concept drift is detected
    if the distribution equality no longer holds. Upon detecting a drift, $W_0$ is replaced by $W_1$ and a
    new $W_1$ is initialized. ADWIN uses a significance value $\delta=\in(0,1)$ to determine
    if the two sub-windows correspond to the same distribution.

    Parameters
    ----------

实现与验收要点

原模式判定、流动性、成本、时点和用途门槛。