haver.fetch - Request data from Haver Analytics database

Syntax

D = fetch(H,S) 
D = fetch(H,S,Startdate,Enddate) 
D = fetch(H,S,Startdate,Enddate,P) 

Arguments

H

Haver Analytics connection object created with the haver function.

S

Haver Analytics variable.

Startdate

MATLAB® string or date number indicating the startdate from which to retrieve data.

Enddate

MATLAB string or date number indicating the enddate of the date range.

P

A specified period. You can enter the period as:

  • D for daily values

  • W for weekly values

  • M for monthly values

  • Q for quarterly values

  • A for annual values

Description

fetch returns historical data via a Haver Analytics connection object.

Examples

Establish a Connection to a Haver Analytics Database

Connect to the Haver Analytics daily demonstration database haverd.dat:

H = haver('d:\work\haver\data\haverd.dat')

Retrieving Variable Data

Return data for the variable FFED:

D = fetch(H,'FFED')

Retrieving Variable Data for a Specified Date Range

Return data for FFED from 01/01/1997 to 09/01/2007:

D = fetch(H,'FFED','01/01/1997','09/01/2007')

Retrieving Monthly Variable Data for a Specified Date Range

Return data for FFED, converted to monthly values, from 01/01/1997 to 09/01/2007:

D = fetch(H,'FFED','01/01/1997','09/01/2007','M')

See Also

haver.close, haver.get, haver.isconnection, haver, haver.info, haver.nextinfo

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS