prcroc - Price rate of change

Syntax

proc = prcroc(closep, nperiods)
procts = prcroc(tsobj, nperiods)
procts = prcroc(tsobj, nperiods, ParameterName, ParameterValue)

Arguments

closep

Closing price

nperiods

(Optional) Period difference. Default = 12.

tsobj

Financial time series object

Description

proc = prcroc(closep, nperiods) calculates the price rate of change proc from the closing price closep. If nperiods periods is specified, the price rate of change is calculated between the current closing price and the closing price nperiods ago.

procts = prcroc(tsobj, nperiods) calculates the price rate of change procts from the financial time series object tsobj. tsobj must contain a data series named Close. The output procts is a financial time series object with similar dates as tsobj and a data series named PriceROC. If nperiods is specified, the price rate of change is calculated between the current closing price and the closing price nperiods ago.

procts = prcroc(tsobj, nperiods, ParameterName, ParameterValue) specifies the name for the required data series when it is different from the default name. The valid parameter name is

The parameter value is a string that represents the valid parameter name.

Examples

Compute the price rate of change for Disney stock and plot the results:

load disney.mat
dis_PriceRoc = prcroc(dis)
plot(dis_PriceRoc)
title('Price Rate of Change for Disney')

References

Achelis, Steven B., Technical Analysis from A to Z, Second printing, McGraw-Hill, 1995, pp. 243 - 245.

See Also

volroc

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS