| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Datafeed Toolbox |
| Contents | Index |
| Learn more about Datafeed Toolbox |
data = fetch(Connect, 'Security')
data = fetch(Connect, 'Security', 'D1')
data = fetch(Connect, 'Security', 'D1', 'D2')
| Connect | FRED connection object created with the fred function. |
| 'Security' | MATLAB string containing the name of a security in a format recognizable by the FRED server. |
| 'D1' | MATLAB string or date number indicating the date from which to retrieve data. |
| 'D2' | MATLAB string or date number indicating the date range from which to retrieve data. |
For a given security, fetch returns historical data using the connection to the FRED data server.
data = fetch(Connect, 'Security') returns data for the security Security, using the connection object Connect.
data = fetch(Connect, 'Security', 'D1') returns data for the security Security, using the connection object Connect, for the date D1. If you specify today's date for D1, fetch returns data from yesterday.
data = fetch(Connect, 'Security', 'D1', 'D2') returns all data for the security Security, using the connection object Connect, for the date range 'D1' to 'D2'.
Note You can specify dates in any of the formats supported by datestr and datenum that show a year, month, and day. |
Fetch all available daily U.S. dollar to euro foreign exchange rates:
d = fetch(f,'DEXUSEU')
d =
Title: 'U.S. / Euro Foreign Exchange Rate'
SeriesID: 'DEXUSEU'
Source:
'Board of Governors of the Federal Reserve System'
Release: 'H.10 Foreign Exchange Rates'
SeasonalAdjustment: 'Not Applicable'
Frequency: 'Daily'
Units: 'U.S. Dollars to One Euro'
DateRange: '1999-01-04 to 2006-06-19'
LastUpdated: '2006-06-20 9:39 AM CT'
Notes: 'Noon buying rates in New York City for
cable transfers payable in foreign currencies.'
Data: [1877x2 double]Fetch data for 01/01/2007 through 06/01/2007:
d = fetch(f, 'DEXUSEU', '01/01/2007', '06/01/2007)
d =
Title: ' U.S. / Euro Foreign Exchange Rate'
SeriesID: ' DEXUSEU'
Source:
' Board of Governors of the Federal Reserve System'
Release: ' H.10 Foreign Exchange Rates'
SeasonalAdjustment: ' Not Applicable'
Frequency: ' Daily'
Units: ' U.S. Dollars to One Euro'
DateRange: ' 1999-01-04 to 2006-06-19'
LastUpdated: ' 2006-06-20 9:39 AM CT'
Notes: ' Noon buying rates in New York City for
cable transfers payable in foreign currencies.'
Data: [105x2 double]fred.close, fred.get, fred.isconnection
![]() | fred.close | fred.get | ![]() |
View demos and recorded presentations led by industry experts.
Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |