chaikvolat
Chaikin volatility
Description
calculates the Chaikin volatility from a data series of high and low stock prices.volatility
= chaikvolat(Data
)
adds optional name-value pair arguments. volatility
= chaikvolat(___,Name,Value
)
Examples
Calculate the Chaikin Volatility for a Stock
Load the file SimulatedStock.mat
, which provides a timetable (TMW
) for financial data for TMW stock.
load SimulatedStock.mat volatility = chaikvolat(TMW,'NumPeriods',14,'WindowSize',14); plot(volatility.Time,volatility.ChaikinVolatility) title('Chaikin Volatility for TMW')
Input Arguments
Data
— Data with high, low, open, close information
matrix | table | timetable
Data with high, low, open, close information, specified as a vector, matrix, table,
or timetable. For matrix input, Data
is an
M
-by-2
matrix of high and low prices stored in
the first and second columns. Timetables and tables with M
rows must
contain variables named 'High'
and 'Low'
(case
insensitive).
Data Types: double
| table
| timetable
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: volatility =
chaikvolat(TMW,'NumPeriods',10,'WindowSize',10)
NumPeriods
— Period difference
10
(default) | positive integer
Period difference, specified as the comma-separated pair consisting of
'NumPeriods'
and a scalar positive integer.
Data Types: double
WindowSize
— Length of the exponential moving average in periods
10
(default) | positive integer
Length of the exponential moving average in periods, specified as the
comma-separated pair consisting of 'WindowSize'
and a scalar
positive integer.
Data Types: double
Output Arguments
volatility
— Chaikin volatility
matrix | table | timetable
Chaikin volatility, returned with the same number of rows (M
) and
the same type (matrix, table, or timetable) as the input Data
.
More About
Chaikin volatility
Chaikin volatility calculates the Chaikin's volatility from the series of high and low stock prices.
By default, Chaikin's volatility values are based on a 10-period exponential moving average and 10-period difference.
References
[1] Achelis, S. B. Technical Analysis from A to Z. Second Edition. McGraw-Hill, 1995, pp. 304–305.
Version History
Introduced before R2006aR2023a: fints
support removed for Data
input argument
fints
object support for the Data
input argument
is removed.
R2022b: Support for negative price data
The Data
input accepts negative prices.
Ouvrir l'exemple
Vous possédez une version modifiée de cet exemple. Souhaitez-vous ouvrir cet exemple avec vos modifications ?
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)