- 量化研究体系:以7大模块为核心
- 李一邨
- 843字
- 2025-02-23 05:51:57
2.3.6 价格指标
价格指标是以标的物价格为计算对象,并且经过计算后最终量纲也是价格的指标。
1.hhigh:Highest High Price(前k期最高价)
● 计算方法:
hhigh=max(前k期价格)
k默认值为14。
● Matlab调用方法:

其中
data:价格;nperiods:指定前k期。
tsobj:time series object(详见Matlab帮助文件Timeseries Class)。
ParameterName:用于指定time series object中的序列名称。
● Matlab应用案例:我们运用迪士尼的股价数据,计算k期最高价,并与迪士尼收盘价序列做对比观察。
如图2.34所示为前k期最高价。

图2.34 前k期最高价

2.llow:Lowest Low Price(前k期最低价)
● 计算方法:
llv=min(前k期价格)
k默认值为14。
● Matlab调用方法:

其中
data:价格;nperiods:指定前k期。
tsobj:time series object(详见Matlab帮助文件Timeseries Class)。
ParameterName:用于指定time series object中的序列名称。
● Matlab应用案例:该函数是Matlab自带的函数,与hhigh相反,它求的是前k期的最低价,我们以迪士尼股票数据为例来计算并画图展示。
如图2.35所示为前k期最低价。

图2.35 前k期最低价


3.medprice:Median Price(平均价)
● 计算方法:
medprice=(最高价+最低价)/2
● Matlab调用方法:

其中
highp:最高价;lowp:最低价。
tsobj:time series object(详见Matlab帮助文件Timeseries Class)。
ParameterName:用于指定time series object中的序列名称。
● Matlab应用案例:平均价相对平稳,与收盘价比较接近,但是综合了一天内的最高价和最低价,所以有一定的表征意义。我们计算该指标并与收盘价并列展示。
如图2.36所示为平均价。

图2.36 平均价

4.typprice:Typical Price(典型价格)
● 计算方法:
typ=(收盘价+最高价+最低价)/3
● Matlab调用方法:

其中
highp:最高价;lowp:最低价;closep:收盘价。
tsobj:time series object(详见Matlab帮助文件Timeseries Class)。
ParameterName:用于指定time series object中的序列名称。
● Matlab应用案例:典型价格函数是Matlab自带的函数,我们以Matlab自带的迪士尼股票的价格数据为例,计算该指标并与价格数据进行对比。
如图2.37所示为典型价格。



图2.37 典型价格
5.wclose:Weighted Price(加权平均价)
● 计算方法:
wcls=(2×收盘价+最高价+最低价)/4
● Matlab调用方法:

其中
highp:最高价;lowp:最低价;closep:收盘价。
tsobj:time series object(详见Matlab帮助文件Timeseries Class)。
ParameterName:用于指定time series object中的序列名称。
● Matlab应用案例:加权平均价以收盘价作为更重要的加权对象,构成一种对当天价格的诠释。
如图2.38所示为加权平均价。

图2.38 加权平均价
