New provider request (Federal Reserve Economic Data "FRED")
Author: richard1000
Creation Date: 11/16/2011 7:42 PM
profile picture

richard1000

#1
It appears Federal Reserve has tons of free economic data.

http://research.stlouisfed.org/fred2/

How about adding a new provider Federal Reserve Economic Data "FRED"?

Data overload!!!

There's also a developer API link on the left side of above page or at

http://api.stlouisfed.org/
profile picture

Eugene

#2
We'd be very lucky if 1% of our customers would be using just 1% of those 40,000 arcane economic data series provided by this datafeed. Major ones like CPI, PPI and about 180 other are already available to YCharts Pro subscribers: YCharts Fundamental Data for Securities and Economic Data, Available economic items.

By previous experience, I'd estimate the workload as (at least) 1.5-2 work weeks. Thank you for the really good find. Unfortunately, one voice is not enough for such a considerable effort when economic data series are not really popular/mainstream.
profile picture

Eugene

#3
The Fed has even 'Central government debt for Papua New Guinea' among the 40K+ data series, for example. Undoubtedly that's a very important market indicator for some but... how about something down to earth and that makes sense, like bankruptcy filings (Chapter 7 statistics)? Searched twice, first on the Fed site and later using Google with "site:stlouisfed.org" prefix and found nothing relevant. Go figure.
profile picture

Eugene

#4
Man, there's 41043 data series in multiple subdirectories (up to 6 levels) of the monstrous 52 Mb All Data zip file. I would be concerned about the stability of the Fundamentals list after adding that much items. Just another reason to decline this project forever is that the current design of non-symbol economic items in WL6 won't make it easy to work with it. And requesting selected items only is not an option - as I said, for that we already have the YCharts provider.
profile picture

gbullr

#5
I am obviously in the minority but I do use FRED but that is niether here nor there.

My cry for help relates to the following and is related to FRED.

Some Data Series come monthly, weekly but not daily. Is there a simple way to convert it to daily. It is sort of like a fundamental item which remains the same for a quarter or whatever period even though it gets released on a specific day.

So for example when a dividend gets released the fundamental item remains that same number on a daily basis until the next release.

Consumer debt from FRED comes out monthly and when I create the ASCII file unless I adjust the data in the csv file the data is imported as monthly. Do you understand what I mean?

I want the monthly data release to be the same number for the whole month so that I can then run a daily backtest.

Thank you.

profile picture

abegy

#6
I am interesting also to have it.
profile picture

Eugene

#7
gbullr, if my understanding is correct, you have a comma-separated text files coming from FRED (or any other source) with values changing once every month:

QUOTE:
20130311,10
20130408,20


In this case, simply choose Monthly BarScale (not Daily as you have it by default) when creating your ASCII DataSet. When executed on a symbol with Daily bar scale, the following code will create a DataSeries where the same number remains on a daily basis until the next release:

CODE:
Please log in to see this code.




As FRED data can be presented in other bar scales too (e.g. Quarterly, Annual), make sure you picked the right one from Wealth-Lab's "New DataSet" dialog (ASCII). For Semi-Annual scale in the data, select Quarterly in the ASCII DataSet Wizard.
profile picture

Eugene

#8
abegy, a fundamental data provider for FRED is simply impossible due to architectural limitations (see my post #4 above). I considered a workaround, like a single fundamental item "FRED()" that accepts parameters but that rules out the ability to chart, among the rest. That's not acceptable. No point to be square, and it occurred to me that we could build it as a static provider.

One important point here to keep in mind. At FRED, symbol varies on a by scale basis. A symbol's bar scale has to be specified at DataSet creation time but with FRED, it remains unknown until the data is downloaded and parsed. Take "DIVIDEND" for example: the item's underlying frequency is Quarterly, and if you specify BarScale.Daily when creating a FRED DataSet, the data will be downloaded, BUT will not be shown until you create a DataSet in the proper bar scale. To sum up, before creating a FRED DataSet (when available) one should visit the FRED website to find out the item name and its frequency.

The FRED static provider will appear in next release of MS123 Extra Fundamental/News Providers.
profile picture

gbullr

#9
Thanks Eugene.

I have had a problem w/ the monthly data scale thing before so I will try it again and get back to you(I have tried what you suggest above). I am sure that you are right but on my best day I have 1 pct of your abilities on this thing.

Can you send out a blast when MS123 Extension updated and if there is a Wiki page to show how FRED extension thing works it would be nice.

Thanks a lot.
profile picture

Eugene

#10
Of course, a short online guide will be made available but I can tell that it's going to be a typical static data provider where you type in a symbol and choose the proper bar scale in the "New DataSet Wizard". Any data item at FRED have a unique code, "symbol" or "ticker" if you like; for example:

"Consumer Price Index for All Urban Consumers: All Items (CPIAUCSL)"

It's what you see in the brackets when you browse FRED's website pages. Find it out (FRED), type it in (WLP), update the DataSet, you're ready.

When our webmaster brings back the ability to upload extensions/strategies on the new website, we'll push out the update. Please stay tuned.
profile picture

gbullr

#11
Thank you.
profile picture

Eugene

#12
profile picture

gbullr

#13
Hint:

Symbols need to be in quotes so

DJIA
is "DJIA"

Eugene... thank you very much for this thing.

profile picture

Eugene

#14
You're welcome. Symbols don't have to be in quotes though, DJIA has been working for me:

profile picture

gbullr

#15
Question.

Have downloaded two FRED monthly sources w/ tickers:

M1NS
MSIM1P

I wrote the following code.

CODE:
Please log in to see this code.


When the extrenal symbol is MSIM1P then code can be used w/ daily data for some ticker. When I change code so that external symbol is M1NS code has error. Can you tell me what I am doing wrong?

Thanks a lot.
profile picture

Eugene

#16
Change the code to specify your actual FRED DataSet so that it will be searched by the GetExternalSymbol call:

CODE:
Please log in to see this code.
profile picture

Areality

#17
Hi,

I use Wealth-Lab 64 bit version and having troubles with downloading FRED data.

Please tell me what am I doing wrong.

1. Created New Data Set using Fred (DataManager.png)
2. Provided ticker and chose correct frequency (DataManager1.png)
3. Checked "Fred" in historical data providers and updated the data (DataManager2.png)

As you can see from the log below the data is not updated

Updating DataSet FRED(Daily) ...
Up-to-date symbols: 0, Update required for: 0, New symbols: 1
Updating new symbols...
Symbol: VIXCLS, Bars: 0
Update completed (1.106 sec)
----------------
profile picture

Eugene

#18
Hi,

You're not doing anything wrong: VIXCLS is a valid symbol with FRED in Daily scale which updates for me:

QUOTE:
Updating DataSet FRED(Daily) ...
Up-to-date symbols: 0, Update required for: 0, New symbols: 1
Updating new symbols...
Symbol: VIXCLS, Bars: 2426, Last date: 21.08.2013
Update completed (1.64 sec)
----------------


Instead of "Update All Data", try "Update DataSet" or "Update DataSet (Pricing)" which should do equally well. Hope this helps.

P.S. You can get VIX data from different sources such as CBOE Static Provider.
profile picture

Areality

#19
No help still. I use Windows 7 and 64-bit version. May be this configuration is an issue?
profile picture

Eugene

#20
No it's not. I myself use Windows 7 and 64-bit WLD. It's probably something very specific to your system but I don't know what.

Now two providers failing for you at the same time probably leaves out the chance of FRED hypothetically returning the data in an unexpected (localized) format. Must be something else but at the moment I have no idea. Please create a support ticket for reference.
profile picture

Areality

#21
Yes, you are right. When I set locale to US standard (russian originally). Both providers started to work.
profile picture

Eugene

#22
Indeed, the provider has a problem with non-U.S. delimiters. The bug will be fixed in an upcoming release. Thank you for spotting it.
profile picture

gbullr

#23
Help on FRED Based Strategy.

What am I doing wrong?

Error reads: Object reference not set to an instance of an object.

CODE:
Please log in to see this code.


Thank you in advance for your help.

profile picture

Eugene

#24
The DataSet is called "FRED(Daily)" by default, not "Fred(Daily)". That's the reason.
profile picture

gbullr

#25
Thank you..

profile picture

Eugene

#26
gbullr wrote:

Eugene or Cone help w/ following please.

Background:
I have monthly data (ascii dataset) starting in 1988 for a FRED Daily DataSet (BAMLH0A0HYM2)
From 1996 this dataset is available from FRED.
I have successfully created a continuous DataSeries in codebelow

The problem that I have is that when I try to run a backtest my code executes trades on daily, rather than monthly signals which is what I want.

I have obvioulsy set the scale to monthly.
I have tried to download FredDaily as a monthly
I have tried what is the code below.
I have not tried what it says above about converting because I don't know how to. Thanks again for your help.

CODE:
Please log in to see this code.
profile picture

Eugene

#27
I moved your reply from a thread where it did not belong (Code to do SetScaleQuarterly() or SetScaleYearly()) because your strategy does not intend to do that.

QUOTE:
The problem that I have is that when I try to run a backtest my code executes trades on daily, rather than monthly signals which is what I want.

You probably would not want this if you read this remark in the QuickRef attached to all SetScale* functions:

QUOTE:
You must call RestoreScale() to return to the original time scale particularly for plotting and executing trading signals. In general, only remain in a compressed scale to create indicators and immediately revert to the base scale by calling RestoreScale().


This means that in Wealth-Lab, your code will execute on the bar scale of the original data which is Daily -- not on the external symbol's and/or compressed bar scale.
profile picture

gbullr

#28
the PRIME data source on FRED gives the date and interest rate of prime rate changes but it does not have any values in the intervenening period because it is the same value as the prior date.


Is there any way to have wealth lab automatically standardize the data so that it can be used on a daily chart?

Thank you very much.

https://fred.stlouisfed.org/series/PRIME
profile picture

Eugene

#29
The provider's job is to return what there is. And there are no bars since 2008 to 2016 for PRIME as can be seen. Sorry, there is no way that the provider would "invent" and insert the bogus bars at unknown dates for the arbitrary symbol like PRIME. Synchronization of secondary series should take care of this.
profile picture

Eugene

#30
What's new in FRED provider as of MS123 Fundamental/News v2019.02?

* Fix: FRED provider: (breaking change) Shift timestamp for all series Monthly and up to end-of-period to avoid peeking into the future (Semiannual may be timestamped incorrectly). For example, in Quarterly scale 1 Jan in the original data becomes 31 Mar on a Wealth-Lab chart. This will most likely change your backtest results for systems using FRED series.

* Fix: FRED provider: Improved detection of scale in original data (was incorrect sometimes and could lead to a "No Data Available" when updating data on demand)
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).