Financial Time Series Toolbox    
ascii2fts

Create financial time series object from ASCII data file

Syntax

Arguments

filename
ASCII data file
descrow
(Optional) Row number in the data file that contains the description to be used for the description field of the financial time series object
colheadrow

(Optional) Row number that has the column headers/names

skiprows
(Optional) Scalar or vector of row numbers to be skipped in the data file
timedata
Set to 'T' if time-of-day data is present in the ASCII data file or to 'NT' if no time-of-day data is present.

Description

tsobj = ascii2fts(filename, descrow, colheadrow, skiprows) creates a financial time series object tsobj from the ASCII file named filename. This form of the function can only read a data file without time-of-day information and create a financial time series object without time information. If time information is present in the ASCII file, an error message appears.

The general format of the text data file is

tsobj = ascii2fts(filename, timedata, descrow, colheadrow, skiprows) creates a financial time series object containing time-of-day data. Set timedata to 'T' to create a financial time series object containing time-of-day data.

Examples

Example 1. If your data file contains no description or column header rows

you can create a financial time series object from it with the simplest form of the ascii2fts function:

Example 2: If your data file contains description and column header information with the data series immediately following the column header row

you must specify the row numbers containing the description and column headers:

Example 3: If your data file contains rows between the column headers and the data series, e.g.,

you need to indicate to ascii2fts the rows in the file that must be skipped. Assume that you have called the data file containing the Staples data above staples.dat. The command

indicates that the fourth and fifth rows in the file should be skipped in creating the financial time series object:

Example 4. Create a financial time series object containing time-of-day information.

First create a data file with time information:

Now read the data file back and create a financial time series object:

See Also

fints, fts2ascii


  adosc bar, barh