Skip to content

Commit ade1794

Browse files
committed
format
1 parent 05c11a7 commit ade1794

2 files changed

Lines changed: 14 additions & 9 deletions

File tree

ogcore/output_plots.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,8 @@ def ss_profiles(
836836
plt.plot(age_vec, reform_var, label="Reform", linestyle="--")
837837
if plot_data is not None:
838838
if var != "n":
839-
# If not labor, normalize so data and model match in first period
839+
# If not labor, normalize so data and model match in
840+
# first period
840841
plot_data = plot_data / plot_data.values[0] * base_var[0]
841842
plt.plot(
842843
age_vec, plot_data, linewidth=2.0, label="Data", linestyle=":"

ogcore/output_tables.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import json
21
import numpy as np
32
import pandas as pd
43
import os
@@ -1093,19 +1092,22 @@ def model_fit_table(
10931092
model_val = tpi_output["r"][t]
10941093
elif target_desc == r"Capital share of output":
10951094
model_val = (
1096-
1 - tpi_output["r"][t] * tpi_output["K"][t] / tpi_output["Y"][t]
1095+
1
1096+
- tpi_output["r"][t] * tpi_output["K"][t] / tpi_output["Y"][t]
10971097
)
10981098
elif target_desc == r"Labor share of output":
1099-
model_val = tpi_output["w"][t] * tpi_output["L"][t] / tpi_output["Y"][t]
1100-
# Fiscal moments
1101-
elif target_desc == r"Revenue to GDP ratio $(T/Y)$":
11021099
model_val = (
1103-
tpi_output["total_tax_revenue"][t] / tpi_output["Y"][t]
1100+
tpi_output["w"][t] * tpi_output["L"][t] / tpi_output["Y"][t]
11041101
)
1102+
# Fiscal moments
1103+
elif target_desc == r"Revenue to GDP ratio $(T/Y)$":
1104+
model_val = tpi_output["total_tax_revenue"][t] / tpi_output["Y"][t]
11051105
elif target_desc == r"Gov't consumption to GDP ratio $(G/Y)$":
11061106
model_val = tpi_output["G"][t] / tpi_output["Y"][t]
11071107
elif target_desc == r"Pension outlays to GDP ratio $(Pension/Y)$":
1108-
model_val = tpi_output["agg_pension_outlays"][t] / tpi_output["Y"][t]
1108+
model_val = (
1109+
tpi_output["agg_pension_outlays"][t] / tpi_output["Y"][t]
1110+
)
11091111
elif target_desc == r"Infrastructure spending to GDP ratio $(I_g/Y)$":
11101112
model_val = tpi_output["I_g"][t] / tpi_output["Y"][t]
11111113
elif target_desc == r"Debt to GDP ratio $(D/Y)$":
@@ -1141,7 +1143,9 @@ def model_fit_table(
11411143
# Demographic moments
11421144
elif target_desc == r"Fraction 65+":
11431145
model_val = (
1144-
params.omega[t, -35:].sum() # NOTE: not flexible with S, E changes
1146+
params.omega[
1147+
t, -35:
1148+
].sum() # NOTE: not flexible with S, E changes
11451149
/ params.omega[t].sum()
11461150
)
11471151
elif target_desc == r"Pop growth rate":

0 commit comments

Comments
 (0)