필터 지우기
필터 지우기

Using FETCH to Download DATA from FRED

조회 수: 1 (최근 30일)
Jake
Jake 2015년 7월 14일
댓글: Jake 2015년 7월 17일
Hi, MATLAB experts
I am trying to download a monthly data from FRED by using fetch function as follows (from Sep 2005 to now):
c = fred('https://research.stlouisfed.org/fred2/');
da = fetch(c,'BAMLH0A0HYM2','P','09/01/2005', [], 'M');
However, it downloads a daily data rather than a monthly one.
Can you please take a look at the code and let me know what is wrong with this??
Best Regards,
Jake

채택된 답변

Rohit Kudva
Rohit Kudva 2015년 7월 16일
Hi Jake,
Unfortunately there is no property associated with the 'fetch' function that will let you extract monthly data from FRED. You can find the valid syntax for fetching data from FRED in the following MATLAB documentation:
According to this documentation, once can access
  • All the data available for a given series
  • Data for a specific date
  • Data within a specific date interval
For the syntax you have provided
da = fetch(c,'BAMLH0A0HYM2','P','09/01/2005', [], 'M');
MATLAB will simply ignore all input parameter after the series input 'BAMLH0A0HYM2' and will return all the data available for the series 'BAMLH0A0HYM2'.
I work at MathWorks and I have forwarded your request to be able to access monthly data from FRED to the appropriate product team.
I hope this helps.
- Rohit
  댓글 수: 1
Jake
Jake 2015년 7월 17일
Thanks for your help, Rohit. Interesting to know that MATLAB will ignore all input parameter as you mentioned...

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Downloads에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by