StratCraft

百分比排名 (Percent Rank)

滚动百分位排名的 QuantNexus 指标页面。

Route: /quantnexus/indicators/pctrank/

作用

PCTRANK 将当前值与最近的回看窗口进行排名,并返回其百分位位置。

公式

PctRank = 当前价格在过去 n 个周期柱线中的百分位排名

参数

  • period - 默认 50

C++23 API

#include <nonabt/indicators/pctrank.hpp>
auto pctRank = std::make_unique<nonabt::PCTRANK>(data().close(), 50);

常见用法

  • 用于衡量价格在其近期分布中所处的位置。
  • 有助于均值回归和极值研究。
  • 将其与趋势过滤器结合,以避免过早逆势交易。