This is machine translation

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

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

Retrieve Historical Data Using Haver Analytics

This example shows how to connect to Haver Analytics® and retrieve historical data.

Connect to Haver Analytics

Connect to Haver Analytics using a daily file.

c = haver('c:\work\haver\haverd.dat');

Retrieve All Historical Data

Retrieve all historical data for the Haver Analytics variable FFED. The descriptor for this variable is Federal Funds [Effective] Rate (% p.a.).

variable = 'FFED'; % return data for FFED

d = fetch(c,variable);

Display the first three rows of data.

ans =

     715511.00          2.38
     715512.00          2.50
     715515.00          2.50

d contains the numeric representation of the date and the closing value.

Retrieve Historical Data for a Date Range

Retrieve historical data from January 1, 2005 through December 31, 2005 for FFED.

fromdate = '01/01/2005'; % beginning of date range for historical data
todate = '12/31/2005'; % ending of date range for historical data 

d = fetch(c,variable,fromdate,todate);

Close the Haver Analytics Connection


Open the Haver Analytics User Interface

Use the havertool function to open the Haver Analytics User Interface. You can observe different Haver Analytics variables in a chart format.

c = haver('c:\work\haver\haverd.dat');


For details, see the havertool function.

See Also

| | |

Was this topic helpful?