| 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 |
proc = prcroc(closep, nTimes) procts = prcroc(tsobj, nTimes) procts = prcroc(tsobj, nTimes, ParameterName, ParameterValue)
closep | Closing price |
nTimes | (Optional) Time difference. Default = 12. |
tsobj | Financial time series object |
proc = prcroc(closep, nTimes) calculates the price rate of change proc from the closing price closep. If nTimes time is specified, the price rate of change is calculated between the current closing price and the closing price nTimes ago.
procts = prcroc(tsobj, nTimes) 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 nTimes is specified, the price rate of change is calculated between the current closing price and the closing price nTimes ago.
procts = prcroc(tsobj, nTimes, ParameterName, ParameterValue) specifies the name for the required data series when it is different from the default name. The valid parameter name is
CloseName: closing price series name
The parameter value is a string that represents the valid parameter name.
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 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')

Achelis, Steven B., Technical Analysis from A to Z, Second printing, McGraw-Hill, 1995, pp. 243 - 245.
![]() | prbyzero | prdisc | ![]() |
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 |