Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Loading Data with the Financial Time Series App

Overview

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

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

  • View data contained within the MATLAB® workspace.

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 variable 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 character vector 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.

See Also

| | | | | | | | | | | | | | | | | | | | |

Related Topics

Was this topic helpful?