電子信箱 service [at] bituzi.com
幣圖誌首頁 facebook粉絲團 google plus google plus


開發商品的交易系統 - 基礎篇 [26] 正負成交量指標



正成交量指標PVI ( Positive Volume Index ) 又稱為正量指標,首次由費班克(Norman Forback)在《 StockMarket Logic》一書中發表。PVI指標的理論觀點認為,當日的市況如果量增價漲時,表示散戶主導市場。相反的,如果當日的成交值縮減,表示精明大戶正不動聲色的收購股票。也就是說,PVI指標主要的功能,在於偵測行情是否屬於散戶市場。


正成交量指標的計算公式
PVI=PVIn+(CLS-CISn)÷CLSn×PVIn
第一次計算時,PVI一律以100代替。
圖表上除了顯示PVI曲線之外,另外須配合一條PVI的N天移動平均線。
本公式須先比較當日成交量,與前一日成交量後才能計算。

正成交量指標的作用
1、辨別目前的股價,處於多頭市場或者空頭市場。
2、追蹤散戶資金流向。

正成交量指標的研判
1、PVI指標位於其N天移動平均線之上時,表示目前處於多頭市場。
2、PVI指標由下往上穿越其N天移動平均線,代表中期買進訊號。
3、PVI指標位於其N天移動平均線之下時,表示目前處於空頭市場。
4、PVI指標由上往下穿越其N天移動平均線時,代表中期賣出訊號。

負成交量指標NVI ( Negative Volume Index ) 又稱為負量指標,是費班克(Norman Forback)研發的成果。其作用與正量指標相類似,主要用途除了被利用於尋找買賣點之外,更是偵測大多頭市場的主要分析工具。NVI指標的理論觀點認為,當日的市況如果價跌量縮時,表示大戶主導市場。也就是說,NVI指標主要的功能,在於偵測行情是否屬於大戶市場。

由於散戶扮演著行情追隨者的角色,並且具有追漲殺跌的特徵。因此,當行情出現價漲量增的走勢時,散戶的信心增加,介入市場的動機轉為積極。此時,財力雄厚的“莊家”或者“大戶”,正好趁行情活絡的機會,順勢調節股票。相反的,散戶因為資金相對不足的原故,無法在股市行情不好的時候,逢低向下分批承接。因此,當行情呈現價跌量縮的走勢時,大部分散戶會退場觀望,此時,大戶反而伺機吸納股票。因此理論上,NVI指標將萎縮的成交量視為大戶介入的資金。



雖然大戶的資金,對於推動股價行情,具有關鍵性的力量。但是,散戶的資金也是一股不可忽視的力量。只有大戶資金的市場,行情的發展有限。一個全面大多頭的行情,必須擁有大戶與散戶集體推動的力量。因此,NVI指標與PVI指標,實際上是同樣的作用,只是觀察的目標不同而已。如果兩種指標的訊號同時發生,一般可視為“大多頭”行情來臨前的重要徵兆。

負成交量指標的計算公式
NVI=NVIn+(CLS-CLSn)÷CLSn×NVIn
第一次計算時,昨日的NVI一律以100代替。
圖表上除了顯示NVI曲線之外,另外須配合一條NVI的N天移動平均線。
本公式須先比較當日成交量與前一日成交量後才能逐步計算。

負成交量指標的研判
1、NVI指標位於其N天移動平均線之上時,表示目前處於多頭市場。
2、NVI指標由下往上穿越其N天移動平均線,代表長期買進訊號。
3、NVI指標位於其N天移動平均線之下時,表示目前處於空頭市場。
4、NVI指標由上往下穿越其N天移動平均線時,代表長期賣出訊號。
5、NVI指標與PVI指標,分別向上穿越其N天移動平均線時,視為大多頭訊號。

注意這個兩個指標的設計原理,是先從量的變動,再來算出價格變動的累計值.所以在看正量指標PVI時,一定要牢記它指的是「量增」時的情況,這條線如果向上,那是代表「量增價漲」的所謂「量價配合」的情況,PVI線如果向下的話,那麼代表的是「量增價跌」的所謂「量價背離」的情況,也就是暗示投資人對股價有「恐慌」的意味.所以,PVI線如果長期向上則是正常的,表示股價長期間量價配合,反之,如果長期向下,則是不正常的,表示長期量價背離,空頭的力道強勁.

而在看負量指標NVI時,一定要牢記它指的是「量縮」時的情況,這條線如果向上,那是代表「量縮價漲」的所謂「量價背離」的情況,也就是暗示投資人對股價有「惜售」的意味.NVI線如果向下的話,那麼代表的是「量縮價跌」的所謂「量價配合」的情況.所以,NVI線如果長期向下則是正常的,表示股價長期間量價配合,反之,如果長期向上,則是不正常的,表示長期量價背離,股價惜售,多頭的力道強勁.
資料參考 MBA 智庫 / MoneyDJ 財經知識庫

{系統參數與變數}
input:EntryType(1),ExitType(2) ;
inputs:NBarL(55),NBarS(35),TradeProfit(0.04),TradeStopLoss(0.04),ATRs_L(12.7),ATRs_S(4.6);
vars: IsBalanceDay(False),MP(0),PF(0),PL(0),HLRange(100);
inputs:AvgL(55),AvgS(55),HighBar(5),LowBar(5);
vars:PVI(0),NVI(0),Vol(0);

MP = MarketPosition ;
if DAYofMonth(Date) > 14 and DAYofMonth(Date) < 22 and DAYofWeek(Date)= 3
then isBalanceDay = True else isBalanceDay =False ;

PF = AvgPrice*TradeProfit ;
PL = AvgPrice*TradeStopLoss ;

{買賣邏輯建立}
if BarNumber = 1 then Begin
PVI = 100 ; {第一次計算時 PVI /NVI 預設值 100 }
NVI = 100 ;
end;

{區分日K 與分K 取成交量}
Vol = iff(DataCompression > 1,Volume,Ticks) ;

{分別計算 PVI 與 NVI 值 }
if Close[1] <> 0 and BarNumber > 1 then Begin
if Vol > Vol[1] then PVI = PVI[1]+((Close-Close[1])/Close[1])*PVI[1] else PVI = PVI[1] ;
if Vol < Vol[1] then NVI = NVI[1]+((Close-Close[1])/Close[1])*NVI[1] else NVI = NVI[1] ;
end;

{根據上述定義可以有很多種組合}
if EntryType = 1 then begin {只使用 PVI -多空參數對稱}
if MP <> 1 and PVI > Average(PVI,AvgL) then Buy next bar at Highest(High,HighBar) stop ;
if MP <> -1 and PVI < Average(PVI,AvgL) then Sell next bar at Lowest(Low,HighBar) stop ; end;

if EntryType = 2 then begin {只使用 PVI -多空參數不對稱}
if MP <> 1 and PVI > Average(PVI,AvgL) then Buy next bar at Highest(High,HighBar) stop ;
if MP <> -1 and PVI < Average(PVI,AvgS) then Sell next bar at Lowest(Low,LowBar) stop ; end;

if EntryType = 3 then begin {只使用 NVI -多空參數對稱}
if MP <> 1 and NVI > Average(NVI,AvgL) then Buy next bar at Highest(High,HighBar) stop ;
if MP <> -1 and NVI < Average(NVI,AvgL) then Sell next bar at Lowest(Low,HighBar) stop ; end;

if EntryType = 4 then begin {只使用 NVI -多空參數不對稱}
if MP <> 1 and NVI > Average(NVI,AvgL) then Buy next bar at Highest(High,HighBar) stop ;
if MP <> -1 and NVI < Average(NVI,AvgS) then Sell next bar at Lowest(Low,LowBar) stop ; end;

if EntryType = 5 then begin {多方 PVI ,空方 NVI , 參數不對稱 }
if MP <> -1 and PVI > Average(PVI,AvgL) then Buy next bar at Highest(High,HighBar) stop ;
if MP <> 1 and NVI < Average(NVI,AvgS) then Sell next bar at Lowest(Low,LowBar) stop ; end;

****************************************************************************
if EntryType = 6 then begin {多方 PVI ,空方 NVI , 參數不對稱 ,反向進場}
if MP <> -1 and PVI > Average(PVI,AvgL) then Sell next bar at Lowest(Low,LowBar) stop ;
if MP <> 1 and NVI < Average(NVI,AvgS) then Buy next bar at Highest(High,HighBar) stop ; end;
*****************************************************************************

 { 以下進場邏輯可自行參考 }
if EntryType = 7 then begin
if MP <> 1 and PVI > Highest(PVI,HighBar) then Buy next bar at Market ;
if MP <> -1 and NVI < Lowest(NVI,LowBar) then Sell next bar at Market ;
end;

if EntryType = 8 then begin
if MP <> -1 and PVI < Lowest(PVI,LowBar) then Sell next bar at Market ;
if MP <> 1 and NVI > Highest(NVI,HighBar) then Buy next bar at Market ;
end;

if EntryType = 9 then begin
if MP <> 1 and PVI > Average(PVI,AvgL) and NVI > Average(NVI,AvgS) then Buy next bar at Highest(High,HighBar) stop ;
if MP <> -1 and PVI < Average(PVI,AvgL) and NVI < Average(NVI,AvgS) then Sell next bar at Lowest(Low,LowBar) stop ;
end;

if EntryType = 10 then begin
if MP <> 1 and PVI < Average(PVI,AvgL) and NVI > Average(NVI,AvgS) then Buy next bar at Highest(High,HighBar) stop ;
if MP <> -1 and PVI > Average(PVI,AvgL) and NVI < Average(NVI,AvgS) then Sell next bar at Lowest(Low,LowBar) stop ;
end;

if EntryType = 11 then begin
if MP <> 1 and PVI Cross over Average(PVI,AvgL) then Buy next bar at Highest(High,HighBar) stop ;
if MP <> -1 and NVI Cross under Average(NVI,AvgS) then Sell next bar at Lowest(Low,LowBar) stop ;
end;

if EntryType = 12 then begin
if MP <> 1 and PVI > Average(PVI,AvgL) then Buy next bar at Highest(High,HighBar) stop ;
if MP <> -1 and NVI < Average(NVI,AvgS) then Sell next bar at Lowest(Low,LowBar) stop ; end;

********************************************************************************
if EntryType = 13 then begin
if MP <> 1 and NVI > Average(NVI,AvgL) then Buy next bar at Highest(High,HighBar) stop ;
if MP <> -1 and PVI < Average(PVI,AvgS) then Sell next bar at Lowest(Low,LowBar) stop ; end;
*********************************************************************************


if ExitType = 1 then SetStopLoss(PL * BigPointValue) ;

if ExitType = 2 then Begin
SetStopLoss(PL * BigPointValue) ; setProfitTarget(PF * BigPointValue) ; end; if ExitType = 3 then Begin if MP > 0 and BarsSinceEntry = NBarL then ExitLong next bar at Market ;
if MP < 0 and BarsSinceEntry = NBarS then ExitShort next bar at Market ; end;

if ExitType = 4 then Begin
SetStopLoss(PL * BigPointValue) ; setProfitTarget(PF * BigPointValue) ;
if MP > 0 and BarsSinceEntry = NBarL then {Sell } ExitLong next bar at Market ;
if MP < 0 and BarsSinceEntry = NBarS then {Buy} ExitShort next bar at Market ;
end;

if IsBalanceDay then setExitonClose ;
進場邏輯 13 - 台指期 60 min K 留倉 交易期間 2004/11/29 ~ 2014/11/28 交易成本 1200


進場邏輯 6 - 台指期 30 min K 留倉 交易期間 2004/11/29 ~ 2014/11/28 交易成本 1200



PVI指標除了可以幫助投資人認清市場的結構,歸屬於大戶或者散戶市場之外,尚可以利用其指標的交叉訊號,做為中期買賣的依據。但是,其最大的功能是配合NVI指標,共同追蹤即將引發大多頭行情的股票。因此,PVI指標與NVI指標,實為一組不可分的指標組合。

0 意見: