Main Content

totalreturnprice

Total return price time series

totalreturnprice will be removed in a future release. Use adjustedClosingPrices instead.

Description

Return = totalreturnprice(Price,Action,Dividend) generates a total return price time series given price data, action or split data, and dividend data. All input data is unadjusted.

Input Arguments

collapse all

Price of security, specified as a table or an NUMOBS-by-2 matrix. If Price is a table, the dates can either be a datetime array, string array, date character vectors, or serial date numbers. If Price is an NUMOBS-by-2 matrix of price data, column 1 contains MATLAB® serial date numbers and column 2 contains price values.

Data Types: double | char | string | datetime | table

Action or split data, specified as a table or an NUMOBS-by-2 matrix. If Action is a table, the dates can either be a datetime array, string array, date character vectors, or serial date numbers. If Action is an NUMOBS-by-2 matrix of price data, column 1 contains MATLAB serial date numbers and column 2 contains split ratios.

Data Types: double | char | string | datetime | table

Dividend payouts, specified as a table or an NUMOBS-by-2 matrix. If Dividend is a table, the dates can either be serial date numbers, date character vectors, or datetime arrays. If Dividend is a NUMOBS-by-2 matrix of price data, column 1 contains MATLAB serial date numbers and column 2 contains dividend payouts.

Data Types: double | table

Output Arguments

collapse all

Total return price time series, returned as a NUMOBS-by-2 matrix (if all inputs are matrices) or table (if any inputs are tables) of price data, where column 1 is dates and column 2 is total return price values. Dates in column 1 are in datetime format if any inputs specify dates in datetime format. Dates in column 1 are in date character vector format if no inputs specify dates in datetime format, but any of them use date character vector format. Otherwise, dates in column 1 are specified as serial date numbers. Use the function datetime to convert serial date numbers to formatted datetime arrays.

Version History

Introduced before R2006a