価格パフォーマンス指数戦略


作成日: 2023-09-21 16:19:31 最終変更日: 2023-09-21 16:19:31
コピー: 0 クリック数: 611
1
フォロー
1621
フォロワー

概要

この戦略は,価格パフォーマンス指数 ((PPI) を使って市場の傾向の方向を判断し,PPIが上昇すると多めにし,下落すると空っぽにする.PPIは,一定の周期の価格変化のパーセントを計算することによって,価格動力と将来の方向を判断する.

戦略原則

論理的には

  • PPIは,一定の周期 (デフォルトは14日) の価格変化のパーセントを計算します.

  • PPIが上昇すると,物価が上昇する,もっとやる

  • PPIが下がると,価格が下がって空白になります.

  • 選択可能な反転取引シグナル

PPIの上昇は,価格が動力を蓄積していることを示し,下降は価格動力を下向きを表している.一定のパラメータでPPI曲線を追跡し,中長線価格トレンドを捉えることができる.

戦略的優位性

  • 価格の動向と動力を判断する簡単な指標

  • パラメータは,様々な品種に対応し,自由に設定できます.

  • 取引の論理が明確で直感的です

  • 市場環境を考慮した反転取引

戦略リスク

  • ショートショートノイズを排除できず,偽突破が容易です.

  • ポジション管理とストップを考慮していない

  • パラメータが正しくない場合,トレンドを逃したり,過剰に取引したりします.

どう対処するか?

  • オプティマイゼーションパラメータ,バランスのとれた安定性と感度

  • 単一損失を抑えるためのストップ・ロース戦略を強化する

  • ポジション管理を考慮し,単一リスクを下げる

戦略最適化の方向性

  • 異なる品種の組み合わせをテストする

  • 偽信号をフィルターする他の指標と組み合わせる

  • ダイナミックポジション管理メカニズムの開発

  • 移動停止または時間停止の増加

  • 信号の質を判断する機械学習

要約する

この戦略は,価格パフォーマンス指数に基づく傾向判断に,シンプルさと普遍性がある.パラメータ最適化,リスク管理措置などによりさらに向上し,安定した量化取引戦略になることができる.それは,単純な指標に基づく傾向判断に有効な思いつきを提供する.

ストラテジーソースコード
/*backtest
start: 2022-09-14 00:00:00
end: 2023-09-20 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=2
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 23/03/2018
// The Performance indicator or a more familiar term, KPI (key performance indicator), 
// is an industry term that measures the performance. Generally used by organizations, 
// they determine whether the company is successful or not, and the degree of success. 
// It is used on a business’ different levels, to quantify the progress or regress of a 
// department, of an employee or even of a certain program or activity. For a manager 
// it’s extremely important to determine which KPIs are relevant for his activity, and 
// what is important almost always depends on which department he wants to measure the 
// performance for.  So the indicators set for the financial team will be different than 
// the ones for the marketing department and so on.
//
// Similar to the KPIs companies use to measure their performance on a monthly, quarterly 
// and yearly basis, the stock market makes use of a performance indicator as well, although 
// on the market, the performance index is calculated on a daily basis. The stock market 
// performance indicates the direction of the stock market as a whole, or of a specific stock 
// and gives traders an overall impression over the future security prices, helping them decide 
// the best move. A change in the indicator gives information about future trends a stock could 
// adopt, information about a sector or even on the whole economy. The financial sector is the 
// most relevant department of the economy and the indicators provide information on its overall 
// health, so when a stock price moves upwards, the indicators are a signal of good news. On the 
// other hand, if the price of a particular stock decreases, that is because bad news about its 
// performance are out and they generate negative signals to the market, causing the price to go 
// downwards. One could state that the movement of the security prices and consequently, the movement 
// of the indicators are an overall evaluation of a country’s economic trend.
//
// You can change long to short in the Input Settings
// WARNING:
//  - For purpose educate only
//  - This script to change bars colors.
////////////////////////////////////////////////////////////
strategy(title="Perfomance index Backtest")
Period = input(14, minval=1)
reverse = input(false, title="Trade reverse")
xKPI = (close - close[Period]) * 100 / close[Period]
clr = iff(xKPI > 0, green, red)
p1 = plot(xKPI, color=blue, title="KPI")
p2 = plot(0, color=blue, title="0")
pos = iff(xKPI > 0, 1,
       iff(xKPI < 0, -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 ) 
fill(p1,p2,color=clr)