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

dynamic inputs for small_open boolean and world interest rate #703

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions templates/dynamic/includes/params/inputs/dynamic.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ <h1>Macroeconomic Parameters</h1>
{% endblock %}
</div>

<h2>Open Economy Assumptions</h2>
{% include 'taxbrain/includes/params/inputs/param.html' with param=params.small_open %}
{% include 'taxbrain/includes/params/inputs/param.html' with param=params.world_int_rate %}
<h2>Macroeconomic Parameters</h2>
{% include 'taxbrain/includes/params/inputs/param.html' with param=params.g_y_annual %}
{% include 'taxbrain/includes/params/inputs/param.html' with param=params.frisch %}
Expand Down
5 changes: 5 additions & 0 deletions templates/dynamic/includes/params/inputs/elastic.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ <h1>Macroeconomic Parameters</h1>
{% endblock %}
</div>

<h2>Open Economy Assumptions</h2>
{% include 'taxbrain/includes/params/inputs/param.html' with param=params.small_open %}
{% include 'taxbrain/includes/params/inputs/param.html' with param=params.world_int_rate %}


<h2>Elasticity of GDP wrt 1 - AMTR</h2>
{% include 'taxbrain/includes/params/inputs/param.html' with param=params.elastic_gdp %}

Expand Down
25 changes: 25 additions & 0 deletions webapp/apps/dynamic/migrations/0016_auto_20171012_1733.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations
import webapp.apps.taxbrain.models


class Migration(migrations.Migration):

dependencies = [
('dynamic', '0015_auto_20170918_1255'),
]

operations = [
migrations.AddField(
model_name='dynamicsaveinputs',
name='small_open',
field=models.NullBooleanField(default=None),
),
migrations.AddField(
model_name='dynamicsaveinputs',
name='world_int_rate',
field=webapp.apps.taxbrain.models.CommaSeparatedField(default=None, max_length=200, null=True, blank=True),
),
]
25 changes: 25 additions & 0 deletions webapp/apps/dynamic/migrations/0017_auto_20171012_1826.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations
import webapp.apps.taxbrain.models


class Migration(migrations.Migration):

dependencies = [
('dynamic', '0016_auto_20171012_1733'),
]

operations = [
migrations.AddField(
model_name='dynamicelasticitysaveinputs',
name='small_open',
field=models.NullBooleanField(default=None),
),
migrations.AddField(
model_name='dynamicelasticitysaveinputs',
name='world_int_rate',
field=webapp.apps.taxbrain.models.CommaSeparatedField(default=None, max_length=200, null=True, blank=True),
),
]
25 changes: 25 additions & 0 deletions webapp/apps/dynamic/migrations/0018_auto_20171013_0131.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations
import webapp.apps.taxbrain.models


class Migration(migrations.Migration):

dependencies = [
('dynamic', '0017_auto_20171012_1826'),
]

operations = [
migrations.AddField(
model_name='dynamicbehaviorsaveinputs',
name='small_open',
field=models.NullBooleanField(default=None),
),
migrations.AddField(
model_name='dynamicbehaviorsaveinputs',
name='world_int_rate',
field=webapp.apps.taxbrain.models.CommaSeparatedField(default=None, max_length=200, null=True, blank=True),
),
]
7 changes: 7 additions & 0 deletions webapp/apps/dynamic/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class DynamicSaveInputs(models.Model):
"""

# Parameters used for the dynamic model
small_open = models.NullBooleanField(default=None, blank=True, null=True)
world_int_rate = CommaSeparatedField(default=None, null=True, blank=True)
g_y_annual = CommaSeparatedField(default=None, null=True, blank=True)
g_y_annual_cpi = models.NullBooleanField(default=None, blank=True, null=True)
upsilon = CommaSeparatedField(default=None, null=True, blank=True)
Expand Down Expand Up @@ -62,6 +64,8 @@ class DynamicBehaviorSaveInputs(models.Model):
"""

# Behavioral Effects
small_open = models.NullBooleanField(default=None, blank=True, null=True)
world_int_rate = CommaSeparatedField(default=None, null=True, blank=True)
BE_inc = CommaSeparatedField(default=None, blank=True, null=True)
BE_sub = CommaSeparatedField(default=None, blank=True, null=True)
BE_cg = CommaSeparatedField(default=None, blank=True, null=True)
Expand Down Expand Up @@ -99,6 +103,9 @@ class DynamicElasticitySaveInputs(models.Model):
"""

# Elasticity of GDP w.r.t. average marginal tax rates
small_open = models.NullBooleanField(default=None, blank=True, null=True)
world_int_rate = CommaSeparatedField(default=None, null=True, blank=True)

elastic_gdp = CommaSeparatedField(default=None, blank=True, null=True)

# Job IDs when running a job
Expand Down
52 changes: 51 additions & 1 deletion webapp/apps/dynamic/ogusa_parameters.json
Original file line number Diff line number Diff line change
@@ -1 +1,51 @@
{"g_y_annual": {"col_label": ["Growth rate of technology"], "description": "This parameter gives the underlying growth rate for labor augmenting technological change. The growth rate determines long-run economic growth in OG-USA.", "irs_ref": "", "notes": "", "value": 0.03, "long_name": "Growth rate of technology"}, "frisch": {"col_label": ["Frisch elasticity"], "description": "The Frisch elasticity gives the elasticity of labor supply to changes in the net of tax wage rate, holding wealth constant. This means that the Frisch elasticity captures the substitution effects, but not the income effects, of a change in the net of tax wage rate. A Frisch elasticity of 0.4 would indicate that if the net of tax wage rate increases by 10% then hours worked would increase by 4%, if wealth were held constant. Note that OG-USA uses an elliptical utility function for labor supply. We parameterize this function to fit a constant Frisch elasticity function with a Frisch elasticity as input here.", "irs_ref": "", "notes": "", "validations": {"max": 0.8, "min": 0.1}, "value": 0.4, "long_name": "Frisch elastictiy of labor supply used to fit elliptical utility"}}
{
"g_y_annual": {
"col_label": [
"Growth rate of technology"
],
"description": "This parameter gives the underlying growth rate for labor augmenting technological change. The growth rate determines long-run economic growth in OG-USA.",
"long_name": "Growth rate of technology",
"notes": "",
"value": 0.03,
"irs_ref": ""
},
"frisch": {
"col_label": [
"Frisch elasticity"
],
"description": "The Frisch elasticity gives the elasticity of labor supply to changes in the net of tax wage rate, holding wealth constant. This means that the Frisch elasticity captures the substitution effects, but not the income effects, of a change in the net of tax wage rate. A Frisch elasticity of 0.4 would indicate that if the net of tax wage rate increases by 10% then hours worked would increase by 4%, if wealth were held constant. Note that OG-USA uses an elliptical utility function for labor supply. We parameterize this function to fit a constant Frisch elasticity function with a Frisch elasticity as input here.",
"long_name": "Frisch elastictiy of labor supply used to fit elliptical utility",
"notes": "",
"validations": {
"max": 0.8,
"min": 0.1
},
"value": 0.4,
"irs_ref": ""
},
"world_int_rate": {
"col_label": [
"World interest rate"
],
"description": "World interest rate",
"long_name": "World interest rate if using 'small open' economy",
"notes": "World interest rate if using 'small open' economy",
"validations": {
"max": 0.8,
"min": -0.8
},
"value": 0.04,
"irs_ref": ""
},
"small_open": {
"col_label": [
"Use 'small open' economy"
],
"description": "Small open economy assumptionx",
"long_name": "TODO long_name",
"notes": "TODO notes",
"value": true,
"irs_ref": ""
}
}

2 changes: 1 addition & 1 deletion webapp/apps/dynamic/ogusa_user_modifiable.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"USER_MODIFIABLE_PARAMS": ["g_y_annual", "frisch"]}
{"USER_MODIFIABLE_PARAMS": ["g_y_annual", "frisch", "word_int_rate"]}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHould be "world_int_rate"

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

dependencies = [
('taxbrain', '0054_outputurl_webapp_vers'),
]

operations = [
migrations.RemoveField(
model_name='taxsaveinputs',
name='reform_style',
),
]