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

Update get_predictions_from_sims.jl #15

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions src/utils/get_predictions_from_sims.jl
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,9 @@ function get_predictions_from_sims(data, quarter_num, horizon, number_seeds)

real_government_consumption = sims.real_government_consumption
real_government_consumption_growth_quarterly = diff(log.(real_government_consumption), dims = 1)
model_dict["real_government_consumption_growth_quarterly"] = exp.(real_government_consumption_growth_quarterly) .- 1
real_government_consumption_growth_quarterly = exp.(real_government_consumption_growth_quarterly) .- 1

model_dict["real_government_consumption_growth_quarterly"] = real_government_consumption_growth_quarterly
real_government_consumption_quarterly =
data["real_government_consumption_quarterly"][data["quarters_num"] .== quarter_num] .*
cumprod(1 .+ real_government_consumption_growth_quarterly, dims = 1)
Expand Down Expand Up @@ -519,8 +521,8 @@ function get_predictions_from_sims(data, quarter_num, horizon, number_seeds)

nominal_government_consumption = sims.nominal_government_consumption
nominal_government_consumption_growth_quarterly = diff(log.(nominal_government_consumption), dims = 1)
model_dict["nominal_government_consumption_growth_quarterly"] =
exp.(nominal_government_consumption_growth_quarterly) .- 1
nominal_government_consumption_growth_quarterly = exp.(nominal_government_consumption_growth_quarterly) .- 1
model_dict["nominal_government_consumption_growth_quarterly"] = nominal_government_consumption_growth_quarterly
nominal_government_consumption_quarterly =
data["nominal_government_consumption_quarterly"][data["quarters_num"] .== quarter_num] .*
cumprod(1 .+ nominal_government_consumption_growth_quarterly, dims = 1)
Expand Down Expand Up @@ -633,7 +635,8 @@ function get_predictions_from_sims(data, quarter_num, horizon, number_seeds)

real_capitalformation = sims.real_capitalformation
real_capitalformation_growth_quarterly = diff(log.(real_capitalformation), dims = 1)
model_dict["real_capitalformation_growth_quarterly"] = exp.(real_capitalformation_growth_quarterly) .- 1
real_capitalformation_growth_quarterly = exp.(real_capitalformation_growth_quarterly) .- 1
model_dict["real_capitalformation_growth_quarterly"] = real_capitalformation_growth_quarterly
real_capitalformation_quarterly =
data["real_capitalformation_quarterly"][data["quarters_num"] .== quarter_num] .*
cumprod(1 .+ real_capitalformation_growth_quarterly, dims = 1)
Expand Down Expand Up @@ -681,7 +684,8 @@ function get_predictions_from_sims(data, quarter_num, horizon, number_seeds)

nominal_capitalformation = sims.nominal_capitalformation
nominal_capitalformation_growth_quarterly = diff(log.(nominal_capitalformation), dims = 1)
model_dict["nominal_capitalformation_growth_quarterly"] = exp.(nominal_capitalformation_growth_quarterly) .- 1
nominal_capitalformation_growth_quarterly = exp.(nominal_capitalformation_growth_quarterly) .- 1
model_dict["nominal_capitalformation_growth_quarterly"] = nominal_capitalformation_growth_quarterly
nominal_capitalformation_quarterly =
data["nominal_capitalformation_quarterly"][data["quarters_num"] .== quarter_num] .*
cumprod(1 .+ nominal_capitalformation_growth_quarterly, dims = 1)
Expand Down Expand Up @@ -788,7 +792,8 @@ function get_predictions_from_sims(data, quarter_num, horizon, number_seeds)

real_fixed_capitalformation = sims.real_fixed_capitalformation
real_fixed_capitalformation_growth_quarterly = diff(log.(real_fixed_capitalformation), dims = 1)
model_dict["real_fixed_capitalformation_growth_quarterly"] = exp.(real_fixed_capitalformation_growth_quarterly) .- 1
real_fixed_capitalformation_growth_quarterly = exp.(real_fixed_capitalformation_growth_quarterly) .- 1
model_dict["real_fixed_capitalformation_growth_quarterly"] = real_fixed_capitalformation_growth_quarterly
real_fixed_capitalformation_quarterly =
data["real_fixed_capitalformation_quarterly"][data["quarters_num"] .== quarter_num] .*
cumprod(1 .+ real_fixed_capitalformation_growth_quarterly, dims = 1)
Expand Down
Loading