Products & Services Solutions Academia Support User Community Company

Learn more about Financial Toolbox   

lagts - Lag time series object

Syntax

newfts = lagts(oldfts)
newfts = lagts(oldfts, lagperiod)
newfts = lagts(oldfts, lagperiod, padmode)

Arguments

oldfts

Financial time series object

lagperiod

Number of lag periods expressed in the frequency of the time series object

padmode

Data padding value

Description

lagts delays a financial time series object by a specified time step.

newfts = lagts(oldfts) delays the data series in oldfts by one time series date entry and returns the result in the object newfts. The end will be padded with zeros, by default.

newfts = lagts(oldfts, lagperiod) shifts time series values to the right on an increasing time scale. lagts delays the data series to happen at a later time. lagperiod is the number of lag periods expressed in the frequency of the time series object oldfts. For example, if oldfts is a daily time series, lagperiod is specified in days. lagts pads the data with zeros (default).

newfts = lagts(oldfts, lagperiod, padmode) lets you pad the data with an arbitrary value, NaN, or Inf rather than zeros by setting padmode to the desired value.

See Also

leadts

  


Free Interactive Computational Finance CD

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