| GARCH Toolbox | ![]() |
Convert a price series to a return series
Syntax
Description
[RetSeries,RetIntervals] = price2ret(TickSeries,TickTimes,Method)
computes asset returns for NUMOBS price observations of NUMASSETS assets.
Input Arguments
Output Arguments
Examples
Create a stock price process continuously compounded at 10 percent, then convert the price series to a 10 percent return series.
S = 100*exp(0.10 * [0:19]'); % Create the stock price series R = price2ret(S); % Convert the price series to a 10 percent % return series [S [R;NaN]] % Pad the return series so vectors are of same % length. price2ret computes theith return from%theith andi+1th prices. ans = 100.0000 0.1000 110.5171 0.1000 122.1403 0.1000 134.9859 0.1000 149.1825 0.1000 164.8721 0.1000 182.2119 0.1000 201.3753 0.1000 222.5541 0.1000 245.9603 0.1000 271.8282 0.1000 300.4166 0.1000 332.0117 0.1000 366.9297 0.1000 405.5200 0.1000 448.1689 0.1000 495.3032 0.1000 547.3947 0.1000 604.9647 0.1000 668.5894 NaN
See Also
ret2price
| parcorr | ret2price | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2009 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |