Using the Financial Time Series App

Creating a Financial Time Series Object

Using the Create tab in the FINTS Objects and Outputs pane for the Financial Time Series app, you can create a financial time series (fints) object from one or more selected variables.

    Note:   When you first start the Financial Time Series app, the Create tab appears on top, unless you reset the default using File > Preferences > Show Create tab when ftstool starts.

To create a financial time series (fints) object from one or more selected variables:

  1. Load data into the Financial Time Series app from either an external data source using Datafeed Toolbox™ or Database Toolbox™ software or an internal data source using File > Load > File.

  2. Select one or more variables from the MATLAB Workspace Variables list.

  3. Click the Create tab and then click Active variable.

    When combining multiple variables, you can type a new variable name for the combined variables in the MATLAB workspace variable box. The new variable name is added to the MATLAB Workspace Variables list. (If you do not choose a name for the MATLAB workspace variable, the Financial Time Series app uses the default name myFts.)

  4. Click Create FINTS object to display the result in the Data Table.

Merge Financial Time Series Objects

Using the Create tab in the FINTS Objects and Outputs pane for the Financial Time Series app, you can create a new financial time series object by merging (joining) multiple existing financial time series objects.

    Note:   When you first start the Financial Time Series app, the Create tab appears on top, unless you reset the default using File > Preferences.

To create a financial time series (fints) object by merging multiple existing financial time series objects:

  1. Load data into the Financial Time Series app from either an external data source using Datafeed Toolbox or Database Toolbox software or an internal data source using File > Load > File.

  2. To merge multiple existing financial time series objects, click the Create tab, click Components, and then select a value for the Time vector source and one or more items from the Data sources list.

      Note:   You can merge at once multiple financial time series objects. For more information on merging fints objects, see merge.

  3. Click Create FINTS object to display the result in the Data Table.

Converting a Financial Time Series Object to a MATLAB Double-Precision Matrix

Using the Convert tab in the FINTS Objects and Outputs pane for the Financial Time Series app, you can convert a financial time series (fints) object to a MATLAB® double-precision matrix.

To create a financial time series object from one or more selected variables:

  1. Load data into the Financial Time Series app from either an external data source using Datafeed Toolbox or Database Toolbox software or an internal data source using File > Load > File.

  2. Select a variable from the MATLAB Workspace Variables list box.

  3. Click the Convert tab and then determine whether to include or exclude dates in the conversion by clicking Include dates or Exclude dates.

  4. Type a variable name in the Output variable name box. (If you do not choose a variable name, the Financial Time Series app uses the default name myDbl.)

  5. Click Convert FINTS to double matrix. (This operation is equivalent to performing fts2mat on a financial time series object.)

Plotting the Output in Several Formats

Using the Plot tab in the FINTS Objects and Outputs pane for the Financial Time Series app, you can create several forms of plotted output by using a selection list. You can create four types of bar charts, candle plots, high-low plots, line plots, and interactive charts (the latter is created by using the interoperation of the Financial Time Series app with the function chartfts).

The set of plots supported by the Financial Time Series app are identical to the set provided by the Graphs menu of the Financial Time Series GUI. (See Graphs Menu.) You can find more detailed information for the supported plots by consulting the reference page for each individual type of plot.

To create a plotted output:

  1. Load data into the Financial Time Series app from either an external data source using Datafeed Toolbox or Database Toolbox software or an internal data source using File > Load > File.

  2. Select a variable from the MATLAB Workspace Variables list box or select data from the Data Table.

  3. Click the Plot tab and indicate whether you are plotting based on a workspace variable or data from the Data Table.

  4. From the Type drop-down list, select the type of plot.

  5. Click Plot. The plot is displayed.

      Note:   If the selected workspace variable that you are plotting is not a fints object, a fints object is created when you click Plot. The new fints object uses the name designated by the MATLAB workspace variable box on the Create tab.

Viewing Data for a Financial Time Series Object in the Data Table

Once a financial time series (fints) object is created, the Financial Time Series app Data Table displays user-designated data, including financial time series objects, MATLAB double-precision variables, and cell arrays of doubles. (Cell arrays of doubles is often the resulting format when using Database Toolbox software.)

When displaying double variables (or a cell array of doubles) in the Data Table, the column headings for a double variable or cell array of doubles displayed in the Data Table are labeled A, B, C, and so on.

Overwriting Data in the Data Table Display

If you use the command line to overwrite data previously retrieved using Datafeed Toolbox or Database Toolbox software, two events could occur:

  • If the new data contains the same number of columns as before, the headers remain unchanged when you attempt to create a financial time series (fints) object using the modified data.

  • If the data contains a different number of columns, a warning dialog box appears.

For example, assume that you use Datafeed Toolbox software to obtain Close, Date, High, Low, Open, and Volume data for the equity GOOG. You store the data in the MATLAB workspace with the variable name cur1. From the command line, if you redefine the variable cur1, eliminating the second column (Close)

cur1(:,2) = [ ]

and then return to the Financial Time Series app and attempt to create a financial time series object, a warning dialog box appears.

Modifying Data for a Financial Time Series Object in the Data Table

The Financial Time Series app lets you update your data displayed in the Data Table by adding or removing rows or columns.

    Note:   Modifying data in the Data Table will not update the MATLAB workspace variable. To update the workspace variable after modifying the Data Table, click Update workspace variable.

Adding and Removing Rows

To add a row of data displayed in the Data Table:

  1. Select a row from the Data Table display where you want to add a row. Click Additional options to open the Data Table Options dialog box.

  2. Click Add row. The default is to add the row up. To add a row down, select Insertion option and then click Add down. In addition, you can select the Insertion option of Date to designate a specific date. (If a date is not specified, the added row will contain a date that is chronologically in order with respect to the initial row.)

    When you add rows, the Data Table display is immediately updated.

To remove a row of data from the Data Table:

  1. Select one or more rows in the Data Table display that you want to remove. Click Additional options to open the Data Table Options dialog box.

  2. Click Remove row(s). The default is to remove the selected rows. In addition, to remove selected rows, select Removal options and then select other options for row removal from the Remove rows list box. You can specify a Start and End date or you can click the Non-uniform range setting option to designate a range.

    When you remove rows, the Data Table display is updated immediately.

Adding and Removing Columns

To add a column of data displayed in the Data Table:

  1. Select a column from the Data Table display where you want to add a column. Click Additional options to open the Data Table Options dialog box.

  2. Click Add column. The default is to add the column to the left of the selected column.

      Note:   For time series objects, you cannot add a column to the left of the Date/Times column; there is no restriction for double data.

    To add a column to the right, select Insertion option and then click Add right. In addition, you can use the Insertion option of New Column Name to designate a specific column name. (If a New Column Name is not specified, an added column will contain a column name of series1, series2, and so on.)

    When you add columns, the Data Table display is updated immediately.

To remove a column of data displayed in the Data Table:

  1. Select one or more columns in the Data Table display that you want to remove. Click Additional options to open the Data Table Options dialog box.

  2. Click Remove column(s). The default is to remove the selected rows. In addition, to remove selected columns, select Removal options and then select columns for removal from the Remove columns list box.

    When you remove columns, the Data Table display is updated immediately.

Viewing and Modifying the Properties for a FINTS Object

The FINTS Object Properties pane in the Financial Time Series app lets you modify financial time series (fints) object properties. This area becomes active whenever the Data Table displays a financial time series object.

To modify the properties for a fints object:

  1. After you create a fints object, double-click the object name in the MATLAB Workspace Variables list box to open the Data Table and display the fints object properties.

  2. Click to modify the Description, Frequency, or Series Names fields.

    The Frequency drop-down list supports the following conversion functions:

    FunctionNew Frequency
    toannualAnnual
    todailyDaily
    tomonthyMonthly
    toquarterlyQuarterly
    tosemiSemiannually
    toweeklyWeekly

  3. Click Update properties to save the changes. This action also updates the associated workspace variable.

Was this topic helpful?