| Financial Toolbox™ | ![]() |
[TickSeries, TickTimes] = ret2tick(RetSeries, StartPrice, RetIntervals, StartTime, Method)
RetSeries | Number of observations (NUMOBS) by number of assets (NASSETS) time series array of asset returns associated with the prices in TickSeries. The ith return is quoted for the period TickTimes(i) to TickTimes(i+1) and is not normalized by the time increment between successive price observations. |
StartPrice | (Optional) 1-by-NASSETS vector of initial asset prices or a single scalar initial price applied to all assets. Prices start at 1 if StartPrice is not specified. |
RetIntervals | (Optional) Scalar or NUMOBS-by-1 vector of interval times between observations. If this argument is not specified, all intervals are assumed to have length 1. |
StartTime | (Optional) Starting time for first observation, applied to the price series of all assets. The default is zero. |
Method | (Optional) Character string indicating the method to convert asset returns to prices. Must be 'Simple' (default) or 'Continuous'. If Method is 'Simple', ret2tick uses simple periodic returns. If Method is 'Continuous', the function uses continuously compounded returns. Case is ignored for Method. |
[TickSeries, TickTimes] = ret2tick(RetSeries, StartPrice, RetIntervals, StartTime, Method) generates price values from the starting prices of NASSETS investments and NUMOBS incremental return observations.
TickSeries is a NUMOBS+1-by-NASSETS times series array of equity prices. The first row contains the oldest observations and the last row the most recent. Observations across a given row occur at the same time for all columns. Each column is a price series of an individual asset. If Method is unspecified or 'Simple', the prices are
TickSeries(i+1) = TickSeries(i)*[1 + RetSeries(i)]
If Method is 'Continuous', the prices are
TickSeries(i+1) = TickSeries(i)*exp[RetSeries(i)]
TickTimes is a NUMOBS+1 column vector of monotonically increasing observation times associated with the prices in TickSeries. The initial time is zero unless specified in StartTime, and sequential observation times occur at unit increments unless specified in RetIntervals.
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
![]() | resamplets | ret2tick (fts) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |