Skip to Main Content Skip to Search
Product Documentation

Loading Data with FTSTool

Overview

The Data source pane in the Financial Time Series Tool window lets you do the following:

Obtaining External Data

You can obtain external data using Datafeed Toolbox or Database Toolbox software. Datafeed Toolbox software lets you obtain data from several financial data servers, including:

Except for Federal Reserve Economic Data (FRED) and Yahoo!, these data servers require that you obtain a license from the vendor before you can access their data.

Obtaining External Data with Datafeed Toolbox Software

  1. From the Financial Time Series Tool window, select File > Load > Datafeed Toolbox to open the toolbox.

  2. Click the Connection tab in Datafeed Toolbox software to select the data source you want to load into FTSTool.

  3. Click the Data tab in Datafeed Toolbox software to select the security and the associated data that you want to load into FTSTool.

  4. After using Datafeed Toolbox software to define the connection, security, data, and MATLAB variable name, click Get Data and then, using FTSTool, click Refresh variable list. The Data source field in FTSTool displays the name of the security you selected from the Data tab in Datafeed Toolbox software. The FTSTool Active variable field indicates the name of the MATLAB workspace variable you chose for this security.

  5. Click Close to exit Datafeed Toolbox software. FTSTool clears the Data source and Active variable fields.

Obtaining External Data with Database Toolbox Software

  1. From the Financial Time Series Tool window, select File > Load > Database Toolbox to open the toolbox.

  2. From the Visual Query Builder window, select the data you want to load into FTSTool.

  3. After using Database Toolbox software to select data and name the MATLAB workspace variable, click Execute and then, using FTSTool, click Refresh variable list. The Data source field in FTSTool displays the name of the highlighted data source that you selected from the Data list box in the Visual Query Builder window. The FTSTool Active variable field indicates the name of the MATLAB workspace variable you chose for the security in the Visual Query Builder window.

  4. From the Database Toolbox software, select Query > Close Visual Query Builder, FTSTool clears the Data source and Active variable fields.

Obtaining Internal Data

You can use FTSTool to load data from files previously stored on your computer. The types of data files you can load are as follows:

To obtain internal data:

  1. From the Financial Time Series Tool window, select File > Load > File to open the Load a MAT, ASCII, .XLS File dialog box.

  2. Select the data you want to load into FTSTool.

    • If you load a MATLAB MAT-file, the variables in the file are placed into the MATLAB workspace. The MATLAB Workspace Variables list box shows the variables that have been added to the workspace. For example, if you load the file disney.mat, which is distributed with the toolbox, the MATLAB Workspace Variables list box displays the variables in that MAT-file.

        Note   FTSTool automatically generates a line plot for each workspace variables unless you disable this feature by resetting the default action under File > Preferences > Generate line plot on load.

    • If you load a .dat or an ASCII .txt file, the ASCII File Parameters dialog box opens. Use this dialog box to transform a text data file into a MATLAB financial time series fints object. (See the reference page for ascii2fts for further explanation of the fields in the ASCII File Parameters dialog box.

    • If you load an Excel .xls file, the Excel File Parameters dialog box opens. Use this dialog box to transform Excel worksheet data into a MATLAB financial time series (fints) object.

  3. From the Financial Time Series Tool window, select File > Save to save the data you gave loaded from an internal file.

Viewing the MATLAB Workspace

The MATLAB Workspace Variables list box displays all existing MATLAB workspace variables. Double-click any variable to display the data in the Data Table. You can only display financial time series (fints) objects, MATLAB doubles, and cell arrays of double data in the Data Table.

In addition, you can click Refresh variable list to refresh the MATLAB Workspace Variables list box. You need to refresh this list periodically because it is refreshed automatically only for operations performed with FTSTool, not for operations performed within MATLAB itself.

Click Remove variable(s) to remove variable from the MATLAB Workspace Variables list and from the MATLAB workspace.

  


Free Interactive Computational Finance CD

View demos and recorded presentations led by industry experts.

Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS