
極化分形効率 (Polarized Fractal Efficiency,PFE) 取引戦略は,分形幾何学と混沌理論の概念を適用して,価格運動の効率を測定する.価格運動は,越線性であり,効率的である.二つの点間の距離が短ければ,価格運動の効率も高い.
PFE取引戦略の核心指標は,極化分形効率 (PFE) である.この指標は以下の公式に基づいて計算される.
PFE = sqrt(pow(close - close[Length], 2) + 100)
その中,Lengthは回顧窓期であり,そのパラメータは入力設定による。PFEは実際にはLength期間中の価格の動きを測定する長であり,これはエオクリッド距離 ((直線距離) を用いて近似的に測定する。
価格運動の効率を評価するために,比較のための基準が必要である.この基準は,価格がLengthの期間中に実際の順序でつながった経路の長さであり,C2C ((Close to Close)) と呼ばれる.計算式は次のとおりである.
C2C = sum(sqrt(pow((close - close[1]), 2) + 1), Length)
価格変動の分形効率 xFracEff を計算できます.
xFracEff = iff(close - close[Length] > 0, round((PFE / C2C) * 100) , round(-(PFE / C2C) * 100))
価格が上がればスコアは正値で,下がれば負値である。絶対値が大きいほど運動が非効率である。
取引シグナルを生成するために,xEMA,つまりxFracEffの指数移動平均を計算し,購入と販売のチャネルを設定します.
xEMA = ema(xFracEff, LengthEMA)
BuyBand = input(50)
SellBand = input(-50)
xEMA上を通過BuyBand generate買取信号;xEMA下を通過SellBand generate売出信号。
PFE取引戦略は以下の利点があります.
PFEの取引戦略には以下のリスクがあります.
PFEの取引戦略は,以下の点で最適化できます.
PFE取引戦略は,分形幾何学とカオス理論の観点から立ち,価格運動の効率性を測定する新しい方法を提唱している.通常の技術指標に比べて,この方法には独特の利点があるが,一定程度の時間遅れ,パラメータ最適化,信号品質の問題にも直面している.継続的なテストと最適化により,PFE戦略は,信頼できる量化取引戦略の選択肢になる見通しがある.
/*backtest
start: 2024-01-07 00:00:00
end: 2024-01-14 00:00:00
period: 3m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=2
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 29/09/2017
// The Polarized Fractal Efficiency (PFE) indicator measures the efficiency
// of price movements by drawing on concepts from fractal geometry and chaos
// theory. The more linear and efficient the price movement, the shorter the
// distance the prices must travel between two points and thus the more efficient
// the price movement.
//
// You can change long to short in the Input Settings
// WARNING:
// - For purpose educate only
// - This script to change bars colors.
////////////////////////////////////////////////////////////
strategy(title="PFE (Polarized Fractal Efficiency)", shorttitle="PFE (Polarized Fractal Efficiency)")
Length = input(9, minval=1)
LengthEMA = input(5, minval=1)
BuyBand = input(50, step = 0.1)
SellBand = input(-50, step = 0.1)
reverse = input(false, title="Trade reverse")
hline(BuyBand, color=green, linestyle=line, title = "TopBand")
hline(SellBand, color=red, linestyle=line, title = "LowBand")
PFE = sqrt(pow(close - close[Length], 2) + 100)
C2C = sum(sqrt(pow((close - close[1]), 2) + 1), Length)
xFracEff = iff(close - close[Length] > 0, round((PFE / C2C) * 100) , round(-(PFE / C2C) * 100))
xEMA = ema(xFracEff, LengthEMA)
pos = iff(xEMA < SellBand, -1,
iff(xEMA > BuyBand, 1, nz(pos[1], 0)))
possig = iff(reverse and pos == 1, -1,
iff(reverse and pos == -1, 1, pos))
if (possig == 1)
strategy.entry("Long", strategy.long)
if (possig == -1)
strategy.entry("Short", strategy.short)
barcolor(possig == -1 ? red: possig == 1 ? green : blue )
plot(xEMA, color=blue, title="PFE")