Main Content

Using the Financial Time Series GUI

Getting Started

To use the Financial Time Series GUI, start the financial time series user interface with the command ftsgui. Then load (or import) the time series data.

For example, if your data is in a MATLAB® MAT-file, select Load from the File menu.

Financial Time Series main window File menu

Load a MAT file

For illustration purposes, choose the file ftsdata.mat from the dialog box presented.

If you do not see the MAT-file, look in the folder matlabroot\toolbox\finance\findemos, where matlabroot is the MATLAB root folder (the folder where MATLAB is installed).


Data loaded through the Financial Time Series GUI is not available in the MATLAB workspace. You can access this data only through the GUI itself, not with any MATLAB command-line functions.

Each financial time series object inside the MAT-file is presented as a line plot in a separate window. The status window is updated accordingly.

Financial Time Series main window display for different stocks

Whirlpool (WHR) is the last plot displayed, as indicated on the title bar of the main window.

Data Menu

The Data menu provides functions that manipulate time series data.

Financial Time Series main window Data menu

Here are some example tasks that illustrate the use of the functions on this menu.

Fill Missing Data

First, look at filling missing data. The Fill Missing Data item uses the toolbox function fillts. With the data loaded from the file ftsdata, you have three time series: IBM® Corp. (IBM), Walt Disney Co. (DIS), and Whirlpool (WHR). Click the window that shows the time series data for Walt Disney Co. (DIS).

Financial Time Series display for DIS

To view any missing data in this time series data set, zoom into the plot using the Zoom tool (the magnifying glass icon with the plus sign) from the toolbar and select a region.

Financial Time Series for DIS with zoom

The gaps represent the missing data in the series. To fill these gaps, select Data > Fill Missing Data. This selection automatically fills the gaps and generates a new plot that displays the filled time series data.

Financial Time Series display for DIS with missing data filled in

You cannot see the filled gaps when you display the entire data set. However, when you zoom into the plot, you see that the gaps have been eliminated. The title bar has changed; the title has been prefixed with the word Filled to reflect the filled time series data.

Frequency Conversion

The Data menu also provides access to frequency conversion functions.

Frequency conversion tool

This example changes the DIS time series data frequency from daily to monthly. Close the Filled Walt Disney Company (DIS) window, and click the Walt Disney Company (DIS) window to make it active (current) again. Then, from the Data menu, select Convert Data Frequency To and To Monthly.

A new figure window displays the result of this conversion.

Financial Time Series display for DIS after frequency conversion

The title reflects that the data displayed had its frequency changed to monthly.

Analysis Menu

The Analysis menu provides functions that analyze time series data, including the technical analysis functions. (See Chart Technical Indicators for a complete list of the technical analysis functions and several usage examples.)

For example, you can use the Analysis menu to calculate the natural logarithm (log) of the data contained within the data set ftsdata.mat. This data file provides time series data for IBM (IBM), Walt Disney (DIS), and Whirlpool (WHR). Click the window displaying the data for IBM Corporation (IBM) to make it active (current). Then select the Analysis menu, followed by Log( ... ). The result appears in its own window.

Financial Time Series display for IBM with analysis for log

Close the above window and click again on the IBM data window to make it active (current).


Before proceeding with any time series analysis, make certain that the title bar confirms that the active data series is the correct one.

From the Analysis menu on the main window, select Technical Analysis and MACD. The result, again, is displayed in its own window.

Financial Time Series display for IBM with MACD analysis

Other analysis functions work similarly.

Graphs Menu

The Graphs menu displays time series data using the provided graphics functions. Included in the Graphs menu are several types of bar charts (bar, barh and bar3, bar3h), line plot (plot), candle plot (candle), and High-Low plot (highlow). The Graphs menu also provides access to the interactive charting function, chartfts.

Candle Plot

For example, you can display the candle plot of a set of time series data and start up the interactive chart on the same data set.

Load the ftsdata.mat data set, and click the window that displays the Whirlpool (WHR) time series data to make it active (current). From the main window, select the Graphs menu and then Candle Plot.

Financial Time Series display for WHR

The result is shown below.

Candle plot for WHR

This does not look much like a candle plot because there are too many data points in the data set. All the candles are too compressed for effective viewing. However, when you zoom into a region of this plot, the candles become apparent.

Candle plot for WHR

Interactive Chart

To create an interactive chart (chartfts) on the Whirlpool data, click the window that displays the Whirlpool (WHR) data to make it active (current). Then, go to the Graphs menu and select Interactive Chart.

Interactive chart tool

The chart that results is shown below.

Interactive chart for WHR

You can use this interactive chart as if you had invoked it with the chartfts command from the MATLAB command line. For a tutorial on the use of chartfts, see Visualizing Financial Time Series Objects.

Saving Time Series Data

The Save and Save As items on the main window File menu let you save the time series data that results from your analyses and computations. These items save all time series data that has been loaded or processed during the current session, even if the window displaying the results of a computation has previously been dismissed.


The Save and Save As items on the File menu of the individual plot windows will not save the time series data, but will save the actual plot.

You can save your time series data in two ways:

  • Into the latest MAT-file loaded (Save)

  • Into a MAT-file chosen (or named) from the window (Save As)

To illustrate this, start by loading the data file testftsdata.mat (located in matlabroot/toolbox/finance/findemos). Then, convert the Disney (DIS) data from daily (the original frequency) to monthly data. Next, run the MACD analysis on the Whirlpool (WHR) data. You now have a set of five open figure windows.

Multiple stock windows displayed in main window

Saving into the Original File (Save)

To save the data back into the original file (testftsdata.mat), select Save from the File menu.

A confirmation window appears. It confirms that the data has been saved in the latest MAT-file loaded (testftsdata.mat in this example).

Save dialog

Saving into a New File (Save As)

To save the data in a different file, choose Save As from the File menu.

The dialog box that appears lets you choose an existing MAT-file from a list or type in the name of a new MAT-file you want to create.

File selection dialog

After you click the Save button, another confirmation window appears.

Save dialog

This confirmation window indicates that the data has been saved in a new file named myftstestdata.mat.

See Also


Related Examples

More About