
2.3.1 摆动指标
随着标的物价格的变化,刻画价格变化的指标在一定的区间内震荡,通常可以归为摆动指标。下面我们介绍几种常见的摆动指标。
1.adosc:Accumulation/Distribution Oscillator(累积派发摆动指标)
● 计算方法:
ado=[(最高价-开盘价)+(收盘价-最低价)]/[2×(最高价-最低价)]×100
● Matlab调用方法:

其中
highp:最高价;lowp:最低价;openp:开盘价;closep:收盘价。
tsobj:time series object(详见Matlab帮助文件Timeseries Class)。
ParameterName:用于指定time series object中的序列名称。
● Matlab应用案例:Matlab自带了该指标的函数和迪士尼股价的数据,下面我们通过程序来计算该指标并画图展示。
如图2.6所示为累积派发摆动指标。

图2.6 累积派发摆动指标

2.chaikosc:Chaikin Oscillator(佳庆指标)
● 计算方法:
COt=3天A/D line的指数移动平均值t-10天A/D line的指数移动平均值t其中
A/D linet=A/D linet-1+收盘价位置常数t×成交量;
收盘价位置常数t=[(收盘价t-最低价t)-(最高价t-收盘价t)]/(最高价t-最低价t)t。
● Matlab调用方法:

其中
highp:最高价;lowp:最低价;closep:收盘价;tvolume:成交量。
tsobj:time series object(详见Matlab帮助文件Timeseries Class)。
ParameterName:用于指定time series object中的序列名称。
● Matlab应用案例:佳庆指标CHAIKIN(Chaikin Oscillator)是由Marc Chaikin发展的一种新成交量指标,他汲取Joseph Granville和Larry Williams两位教授的理论精华,将A/D VOLUME指标加以改良,衍生出佳庆指标。Matlab自带了佳庆指标和迪士尼股价的数据,下面我们通过程序来计算该指标并画图展示。
如图2.7所示为佳庆指标。

图2.7 佳庆指标

3.priceosc:价格摆动指标
● 计算方法:同花顺。
MA_short=12期价格移动平均值
MA_long=26期价格移动平均值
VOSC=(MA_short-MA_long)/MA_short
● Matlab调用方法:

● Matlab调用实例:我们编制了价格摆动指标并利用迪士尼股价的数据来介绍计算,下面通过程序来计算该指标并画图展示。
如图2.8所示为价格摆动指标。

图2.8 价格摆动指标


4.CMO钱德动量摆动指标
● 计算方法:
CMO=(Su-Sd)×100/(Su+Sd)
Su=N天内上涨日的总涨幅
Sd=N天内下跌日的总跌幅
● Matlab调用方法:

其中
Close:收盘价;Length:计算长度。
● Matlab调用实例:钱德动量摆动指标(Chande Momentum Oscillator,CMO)是由图莎尔·钱德发明的,与其他动量摆动指标如相对强弱指标(RSI)和随机指标(KDJ)不同,钱德动量指标在计算公式的分子中采用上涨日和下跌日的数据。以600000.mat的价格数据为例,我们计算该指标并与价格数据进行对比。
如图2.9所示为钱德动量摆动指标。

图2.9 钱德动量摆动指标

钱德动量摆动指标是作者参考连长的CMO指数改编的。CMO的代码如下。

