| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Financial Toolbox |
| Contents | Index |
| Learn more about Financial Toolbox |
acc = tsaccel(data, nTimes, datatype) accts = tsaccel(tsobj, nTimes, datatype)
data | Data series. |
nTimes | (Optional) Number of times. Default = 12. |
datatype | (Optional) Indicates whether data contains the data itself or the momentum of the data: 0 = Data contains the data itself (default). 1 = Data contains the momentum of the data. |
tsobj | Name of an existing financial time series object. |
Acceleration is the difference of two momentums separated by some number of periods.
acc = tsaccel(data, nTimes, datatype) calculates the acceleration of a data series, essentially the difference of the current momentum with the momentum some number of periods ago. If nTimes is specified, tsaccel calculates the acceleration of a data series data with time distance of nTimes times.
accts = tsaccel(tsobj, nTimes, datatype) calculates the acceleration of the data series in the financial time series object tsobj, essentially the difference of the current momentum with the momentum some number of periods ago. Each data series in tsobj is treated individually. accts is a financial time series object with similar dates and data series names as tsobj.
Note, to compute a quantity over n periods, you must specify n+1 for nTimes. If you specify nTimes = 0, the function returns your original time series.
Compute the acceleration for Disney stock and plot the results:
load disney.mat
dis = rmfield(dis,'VOLUME') % remove VOLUME field
dis_Accel = tsaccel(dis);
plot(dis_Accel)
title('Acceleration for Disney')

Kaufman, P. J., The New Commodity Trading Systems and Methods, New York: John Wiley & Sons, 1987.
![]() | tr2bonds | tsmom | ![]() |
View demos and recorded presentations led by industry experts.
Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |