Documentation Center

  • Trial Software
  • Product Updates

Using the Financial Time Series GUI

Getting Started

To use the Financial Time Series GUI, first start the financial time series GUI 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.

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

If you don't see the MAT-file, look in the directory matlabroot\toolbox\finance\findemos, where matlabroot is the MATLAB root directory (the directory where MATLAB is installed).

    Note   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.

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.

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 on the window that shows the time series data for Walt Disney Co. (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.

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.

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. Note that 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.

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.

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.

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

    Note   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.

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.

The result is shown below.

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.

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.

The chart that results is shown below.

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.

    Note   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.

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).

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.

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

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

Was this topic helpful?