Financial Time Series Toolbox    
tsmom

Momentum between periods

Syntax

Arguments

data
Data series
nperiods
(Optional) Number of periods. Default = 12.
tsobj
Financial time series object

Description

Momentum is the difference between two prices (data points) separated by a number of periods.

mom = tsmom(data, nperiods) calculates the momentum of a data series data. If nperiods is specified, tsmom uses that value instead of the default 12.

momts = tsmom(tsobj, nperiods) calculates the momentum of all data series in the financial time series object tsobj. Each data series in tsobj is treated individually. momts is a financial time series object with similar dates and data series names as tsobj. If nperiods is specified, tsmom uses that value instead of the default 12.

Examples

Compute the momentum for Disney stock and plot the results:

See Also

tsaccel


  tsaccel tsmovavg