May 2016:
March 2014:

Sunday, October 21, 2018

Regarding that recent update of the FREDGraph system

I was trying to duplicate the Real Interest Rate graph from page 12 of James Bullard's Modernizing Monetary Policy Rules.

Bullard describes the data:
One way to get a handle on this variable is to consider the nominal return on a one-year Treasury bill and subtract the trailing 12-month inflation rate.
And again on his graph:
1-Year Treasury Rate Minus Dallas Fed Trimmed Mean PCE Inflation Rate
He made it easy to find and format the data I needed.

I got FRED's graph of the Trimmed Mean PCE Inflation Rate, brought in the 1-Year Treasury Constant Maturity Rate, and subtracted the one from the other. I grabbed the Page short URL for the graph.

Then I looked at it:

https://fred.stlouisfed.org/graph/?g=lGmc
Above the graph, on the line with the "Download" button, the calculation is correctly described. But the title of the graph reads ; Not Seasonally Adjusted. I thought they fixed that! Guess not.

But I thought the plotted line looked right, the same as what I had before I grabbed the Page short URL. So I took the next step and downloaded the data as an Excel file. Here are the first few lines of that file:


Okay, there is the Trimmed Mean PCE Inflation Rate on Row 8. But where is the 1-Year Treasury Rate?

There is no hint in the file that subtraction was done. Now I have to wonder if the numbers I got are before or after subtraction. A quick look: After, I think. But I didn't doublecheck that yet, because I'm not done finding errors.

I clicked the "Edit Graph" button and discovered that "b-a" formula I entered had changed to just "a":


No subtraction. So there you have it.

//

I started over. I put three lines on a new graph:
  1. Trimmed Mean PCE Inflation Rate,
  2. 1-Year Treasury Constant Maturity Rate, and
  3. 1-Year Treasury Constant Maturity Rate - Trimmed Mean PCE Inflation Rate
Here's the graph:



Here is a peek at the data:


A subtraction was done and downloaded.

And the formula:


So far, so good.

Next, I take the Page short URL. That's the only thing I did.

The link shows a graph that looks like this:


Wait! Where is my red line?

That graph again, showing that it does include three datasets:

(You can click the graph to see it bigger)

The red line is hidden beneath the green, because the green no longer shows the result of subtraction.

In addition, the description of the red line includes the words "Not Seasonally Adjusted". But the description of the green line includes the words "Seasonally Adjusted". Looks to me like adding the seasonal adjustment note was one of the changes made during the update. Looks to me like this is where the coding error lies. And it looks to me like they increment the index variable that returns the seasonal adjustment information, when they should be incrementing something else -- maybe the index into the list of lines on the graph. Just a guess, looking from the outside.

The downloaded data:


Lines 9 and 10 are identical. (And both say NOT seasonally adjusted. (Perhaps this is a second error in the code.))

Finally, the formula:


The formula line no longer shows subtraction. But it did before I clicked to get the Page short URL.

This is seriously weird, and weirdly serious.

Tuesday, October 2, 2018

You guys need to sit down and organize your code.

Or maybe you just need a boss who understands the importance of properly organized code. Look at this shit:


What's with that right-hand border?

And ... what does the graph show? The title says "; Seasonally Adjusted Annual Rate".

Errors like this arise because your code is not well organized. You lose things that used to work.

//

Here's the page I was looking at:


Here's the link: https://fred.stlouisfed.org/graph/?g=lqOm#0

Tuesday, February 6, 2018

This is new

I think this started happening after the recent weekend interruption of FRED service, three or four weeks ago.

I put a few different measures of debt on one graph, and everything was fine. Then I decided to show them all as annual data and index them all to 1951.

The problems that resulted may be because of a mismatch: The Federal debt is aggregated for "End of Fiscal Year" and the others are "End of Period".

Here's what I got:


1. The "Edit Line 2" window says the data is indexed to 1951. But the title line of the graph says it is indexed to 1950.

2. The sequence of the title lines (with Line 1 down at the bottom) is not my doing.

3. I was working on Line 1 when I set the units to Indexing, set the Date, and clicked the "Copy to All" button. Pretty sure, Line 1. When the screen regenerated, three of the lines were momentarily very low and one of them (Finance, probably) went high. That's more or less what I expected. But before I had a chance to look at the resulting graph, it regenerated again and came out as shown here.

4. Note that even though the "Edit Line" windows show that all four of the series are indexed to 1951, the Vertical Axis Label says that at least one of the series is given in "Billions of Dollars"

Flukey, flukey thing.

//

Yup. Okay, I got the "page short URL" link and displayed that. The one line is high on the graph and the others all low, as expected. The Vertical Axis Label says only "Index" as it should. The four lines of the title are back in the correct sequence. All as should be.

But the Federal Debt title line still says it is indexed on 1950, and the Edit Line 2 page still says 1951. Come to think of it, that's probably right.

Thursday, January 25, 2018

Liquid Liabilities


Liquid Liabilities (Broad Money) for United States (DDOI07USA648NWDB)

https://fred.stlouisfed.org/series/DDOI07USA648NWDB

The units for this series are "Millions of 2000 Dollars".
This series is inflation-adjusted.
I didn't know.
Maybe the title should say?
Or maybe if I knew what "Liquid Liabilities" is, I would know?

Anyway, here's a comparison to the CPI and the GDP Deflator:

Graph #1

Monday, November 20, 2017

It doesn't know it's limited to four user-defined lines

This is a funny one.

Not ha-ha funny. I'm looking at financial deregulation and what happened to debt in the 1980s and 1990s. I put Federal debt and non-Federal debt on a graph. Then I figured I'd put a vertical line at each date a regulation changed. (I only had four dates; no big deal.) I used FRED's "user-defined line" option to add these verticals.

Then I wanted to add two more verticals, to identify the start and end of the Savings & Loan crisis. So I told FRED to add a fifth user-defined line (my 7th line overall) but it came up as LINE 6 again, with the location-values I had just entered for LINE 6. I said that's not right, and tried again. Same thing. LINE 6 came up again.

Okay, I said, I guess we're limited to four user-defined lines. (Why that should be, I don't know.) But then I looked at the FORMAT area, where I can change line colors and thicknesses and stuff. LINE 6 is listed THREE TIMES!

See for yourself:


(Click the image to see it bigger.)

If you change the color for ANY of the LINE 6 entries, the first LINE 6 entry always indicates the new color, and the line on the graph changes to match the setting.

If you change the line width for any of the LINE 6 entries, your new width-value stays where you put it. But the first LINE 6 entry is the only one that actually changes the line width.

I didn't try changing the line style.

This was a pretty entertaining error. I was trying to figure out why the line changes when you change any of the LINE 6 color controls, but the line width only changes when you change the first LINE 6 width control. They don't use the same code, I'm thinking.

Anyhow, a good solution to this problem would include increasing the maximum number of user-defined lines that can be added to a graph. And I still don't know why, in order to create a user-defined line, I have to click Create user-defined line? and then after the screen changes, click Create user-defined line? again, and then after the screen changes again, click Create line.

But I'm sure there is a good reason for it.

Sunday, October 1, 2017

A user-defined nightmare

I made a FRED graph showing one blue line. I drew a red box around the 1948-1978 period using four user-defined lines. Got the "page short URL" link. Clicked the link.

The red box was messed up. The horizontals start okay (at 1948) but continue out to end-of-data (2016?). The verticals also start okay (one at 1948 and one at 1978) but both end at end-of-data. (For each of my verticals, the end-year should be the same as the start-year.)

I made one change: I selected 1980 as the end date to display on the graph. Basically, I made the graph system conscious of an end-date. Then I corrected the user-defined data for the red box.

I got a new page short URL for the revised graph. This time when I clicked the link, the red box was okay.

It looks to me that there is some date-initialization that is not being done by the graph system code, or that is done at the wrong time.

messed up graph: https://fred.stlouisfed.org/graph/?g=fggi#0

corrected graph: https://fred.stlouisfed.org/graph/?g=fggA#0

Thursday, September 14, 2017

Gone are the days

From my econ blog:

Graph #1: Net Change in the Medium of Exchange due to Household Debt

The description of the calculation (in the upper blue border of the graph) has been cut short by a devious and disappointing FRED. The full description is "(Households and Nonprofit Organizations; Credit Market Instruments; Liability, Level-Monetary interest paid: Households and nonprofit institutions)*(100/Consumer Price Index for All Urban Consumers: All Items)"

Back when I started making FRED graphs, the graph told you specifically which of the hundreds of thousands available datasets were shown on the graph. And by reading both the graph title area and the vertical axis label you could determine the exact calculations used to generate the plotted numbers. You could duplicate somebody else's FRED graph. Somebody else could duplicate yours. There was no question about what the graph showed.

This is no longer the case today.