Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2015 Market Data Incorrect #68

Open
gasserma opened this issue Mar 7, 2017 · 6 comments
Open

2015 Market Data Incorrect #68

gasserma opened this issue Mar 7, 2017 · 6 comments

Comments

@gasserma
Copy link

gasserma commented Mar 7, 2017

In https://github.com/boknows/cFIREsim-open/blob/master/js/marketData.js

2015 Market Data is a copy of 2014. At least CPI is wrong, probably all of it. You can check at this website with a stupid url: http://www.usinflationcalculator.com/inflation/consumer-price-index-and-annual-percent-changes-from-1913-to-2008/

@jchristian
Copy link
Contributor

I'm pretty sure the data is pulled from http://www.econ.yale.edu/~shiller/data.htm if you want to take a stab at updating the market data.

@gasserma
Copy link
Author

Will do. I'll get the pull request to you by tomorrow.

@rwv37
Copy link

rwv37 commented Mar 12, 2017

I think it's more than just 2015 that's wrong.

I've downloaded the "U.S. Stock Markets 1871-Present and CAPE Ratio" spreadsheet from that link. Where exactly are the numbers in the code coming from?

Some are obvious. For example, the code's "fixed_income" for 2012, 2013, and 2014 are 0.0197, 0.0191, and 0.0286, respectively, whereas the spreadsheet's "Long Interest Rate GS10" for January 2012, January 2013, and January 2014 are 1.97, 1.91, and 2.86, respectively.

But others are not at all obvious to me. For example I don't see anything about gold at all, but more importantly (to me) I haven't yet been able to figure out where the code's "growth" came from. I've been playing around doing things like dividing the January Year N+1 "S&P Comp. P" from the spreadsheet by the January Year N "S&P Comp. P", or other months, or using the spreadsheet's "Real Price" rather than its "S&P Comp. P". But nothing that I've tried seems to completely match up with the spreadsheet's "growth" for year N (or year N+1).

Let's take a few specific examples. According to the code, the "growth" for several recent years:

2011: 0.01400259
2012: 0.13826139
2013: 0.22114293
2014: 0.1369433

Meanwhile the spreadsheet's "S&P Comp. P" ratio for January of the next year to January of the specified year:

2011: 1300.58 / 1282.62 = 1.01400259
2012: 1480.4 / 1300.58 = 1.13826139
2013: 1822.36 / 1480.4 = 1.23099162
2014: 2028.18 / 1822.36 = 1.11294164

So 2011 and 2012 match up perfectly. But 2013 is off by almost a percent, and 2014 is off (in the other direction) by nearly two and a half percent.

I am guessing that perhaps either the methodology used to create the numbers in the code has become inconsistent with what it had been, or else perhaps they were based on some sort of "preliminary" numbers from Shiller that he has since modified in his spreadsheet. In any case: Where exactly are the numbers coming from?

@gasserma
Copy link
Author

Good looking out. I'll refrain from fixing the last year for now so this doesn't get closed. I don't think the last year is going to affect anyone's simulations anyway, but the other issue is more interesting.

@rwv37
Copy link

rwv37 commented Mar 12, 2017

I think I've figured out the inconsistencies with the 2013 and 2014 growth numbers (it's a different inconsistency in each case).

2011 growth = Jan. 2012 divided by Jan. 2011
2012 growth = Jan. 2013 divided by Jan. 2012
2013 growth = Dec. 2013 divided by Jan. 2013
2014 growth = Dec. 2014 divided by Dec. 2013

Just for kicks, I then went back to the first entry in the code:

1871 growth = Jan. 1872 divided by Jan. 1871

Which would be consistent with 2011 and 2012. To be clear, I have not checked any other years, but I guess it's probably something like that the file was created based on data available through January of 2013, then later updated in various inconsistent ways for 2013, 2014, and 2015.

@rwv37
Copy link

rwv37 commented Mar 12, 2017

Whoops, no, still not sure about 2014; too many digits too similar, along with flipping back and forth between windows and tabs and such, made me think I was looking at the same number. But it's very close:

2014 growth = 1369433
Dec. 2014 / Dec. 2013 = 1363495

I haven't yet been able to find a pair of numbers that matches 2014 growth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants