PSLmodels / Business-Taxation

USA Corporate and Pass-Through Business Tax Model
11 stars 10 forks source link

Have example.py write more results files #70

Closed martinholmer closed 5 years ago

martinholmer commented 5 years ago

This pull request simply adds example.py code to write more results files, especially files containing model results generated from assuming investment and debt responses. This is worth doing for at least two reasons:

  1. The example.py script did the with-response calculations but never wrote them to files so now the example is more complete, and
  2. There is no with-response tests in the pytest suite so its is important to have these benchmark results as the response logic is further refined.

@codykallen, this pull request is ready for your review.

codykallen commented 5 years ago

@martinholmer, these changes generally look fine to me. Out of curiosity, is there some reason that some of the output is rounded to 3 digits and other files are rounded to 4?

martinholmer commented 5 years ago

@codykallen asked:

Out of curiosity, is there some reason that some of the output is rounded to 3 digits and other files are rounded to 4?

No. 3 decimal digits rounds to nearest million dollars, while 4 rounds to nearest one-tenth of a million dollars. I'm happy to standardize things in the example.py file. Which would you prefer?

codykallen commented 5 years ago

@martinholmer aksed:

I'm happy to standardize things in the example.py file. Which would you prefer?

With most of the relevant numbers in the billions or tens of billions, I'm partial to rounding error of millions (3 decimal places).

martinholmer commented 5 years ago

@codykallen said:

With most of the relevant numbers in the billions or tens of billions, I'm partial to rounding error of millions (3 decimal places).

OK. That makes sense. I'll make those changes later this morning.

martinholmer commented 5 years ago

@codykallen, with commit aa24830, all the results in the example_results directory are rounded to the nearest million dollars (that is, have format %.3f).

codykallen commented 5 years ago

This looks good to me.