Quantcast

Documentation Center

  • Trial Software
  • Product Updates

Loading Data with the Financial Time Series App

Overview

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

  • Obtain live data from various external data servers using either Datafeed Toolbox™ or Database Toolbox™ software.

  • Load data you previously obtained and stored in a file.

  • View data contained within the MATLAB® workspace.

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:

  • Bloomberg®

  • eSignal®

  • FactSet®

  • Federal Reserve Economic Data (FRED®)

  • Haver Analytics® financial data

  • Interactive Data™

  • IQFEED®

  • Kx Systems®, Inc. kdb+ database

  • Thomson Reuters™

  • SIX Financial Information

  • Yahoo!®

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.

    Tip   If you open Datafeed Toolbox or Database Toolbox software before starting the Financial Time Series app, the Financial Time Series app is unable to recognize the toolboxes. When working with the Financial Time Series app, select File > Load to open these toolboxes.

Obtaining External Data with Datafeed Toolbox Software

  1. From the Financial Time Series app, 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 the Financial Time Series app.

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

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

  5. Click Close to exit Datafeed Toolbox software. The Financial Time Series app clears the Data source and Active variable fields.

Obtaining External Data with Database Toolbox Software

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

  2. From the Visual Query Builder window, select the data you want to load into the Financial Time Series app.

  3. After using Database Toolbox software to select data and name the MATLAB workspace variable, click Execute and then, using the Financial Time Series app, click Refresh variable list. The Data source field in the Financial Time Series app displays the name of the highlighted data source that you selected from the Data list box in the Visual Query Builder window. The Financial Time Series app 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, the Financial Time Series app clears the Data source and Active variable fields.

Obtaining Internal Data

You can use the Financial Time Series app to load data from files previously stored on your computer. The types of data files you can load are as follows:

  • MATLAB .mat files, with or without fints objects

  • ASCII text files (.dat or .txt suffixes)

  • Excel® .xls files

To obtain internal data:

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

  2. Select the data you want to load into the Financial Time Series app.

    • 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:   The Financial Time Series app 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. The format for the ascii data must be:

      • Dates must be in a valid date string format:

        • 'ddmmmyy' or 'ddmmmyyyy'

        • 'mm/dd/yy' or 'mm/dd/yyyy'

        • 'dd-mmm-yy' or 'dd-mmm-yyyy'

        • 'mmm.dd,yy' or 'mmm.dd,yyyy'

      • Time information must be in 'hh:mm' format.

      • Each column must be separated either by spaces or a tab.

      For more information on converting ascii data to a fints object, see ascii2fts.

    • 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 app, select File > Save to save the data you 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 the Financial Time Series app, 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.

Was this topic helpful?