| Financial Toolbox | ![]() |
Syntax
[TickSeries, TickTimes] = ret2tick(RetSeries, StartPrice,
RetIntervals, StartTime)
Description
ret2tick
generates price values from the starting prices of NASSETS investments and NUMOBS incremental return observations.
TickSeries is a NUMOBS+1-by-NASSETS matrix of prices of equity assets. The first row is the starting price of the assets.
TickTimes is a NUMOBS+1-by-1 vector of tick observation times. The initial time is zero unless specified in StartTime.
Examples
Compute the price increase of two stocks over a year's time based on three incremental return observations.
RetSeries = [0.10 0.12
0.05 0.04
-0.05 0.05];
RetIntervals = [182
91
92];
StartTime = datenum('18-Dec-2000');
[TickSeries,TickTimes] = ret2tick(RetSeries,[],RetIntervals,...
StartTime)
TickSeries =
1.0000 1.0000
1.1000 1.1200
1.1550 1.1648
1.0973 1.2230
TickTimes =
730838
731020
731111
731203
datestr(TickTimes)
ans =
18-Dec-2000
18-Jun-2001
17-Sep-2001
18-Dec-2001
| pyld2zero | second | ![]() |