Skip to content

Commit

Permalink
add fs2000 precompile to basic tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thorek1 committed Jan 31, 2025
1 parent 5314c5e commit cfba6ed
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,49 @@ if test_set == "basic"
end
GC.gc()

@testset verbose = true "FS2000 precompile = true" begin
@model FS2000 precompile = true begin
dA[0] = exp(gam + z_e_a * e_a[x])
log(m[0]) = (1 - rho) * log(mst) + rho * log(m[-1]) + z_e_m * e_m[x]
- P[0] / (c[1] * P[1] * m[0]) + bet * P[1] * (alp * exp( - alp * (gam + log(e[1]))) * k[0] ^ (alp - 1) * n[1] ^ (1 - alp) + (1 - del) * exp( - (gam + log(e[1])))) / (c[2] * P[2] * m[1])=0
W[0] = l[0] / n[0]
- (psi / (1 - psi)) * (c[0] * P[0] / (1 - n[0])) + l[0] / n[0] = 0
R[0] = P[0] * (1 - alp) * exp( - alp * (gam + z_e_a * e_a[x])) * k[-1] ^ alp * n[0] ^ ( - alp) / W[0]
1 / (c[0] * P[0]) - bet * P[0] * (1 - alp) * exp( - alp * (gam + z_e_a * e_a[x])) * k[-1] ^ alp * n[0] ^ (1 - alp) / (m[0] * l[0] * c[1] * P[1]) = 0
c[0] + k[0] = exp( - alp * (gam + z_e_a * e_a[x])) * k[-1] ^ alp * n[0] ^ (1 - alp) + (1 - del) * exp( - (gam + z_e_a * e_a[x])) * k[-1]
P[0] * c[0] = m[0]
m[0] - 1 + d[0] = l[0]
e[0] = exp(z_e_a * e_a[x])
y[0] = k[-1] ^ alp * n[0] ^ (1 - alp) * exp( - alp * (gam + z_e_a * e_a[x]))
gy_obs[0] = dA[0] * y[0] / y[-1]
gp_obs[0] = (P[0] / P[-1]) * m[-1] / dA[0]
log_gy_obs[0] = log(gy_obs[0])
log_gp_obs[0] = log(gp_obs[0])
end

@parameters FS2000 silent = true precompile = true begin
alp = 0.356
bet = 0.993
gam = 0.0085
mst = 1.0002
rho = 0.129
psi = 0.65
del = 0.01
z_e_a = 0.035449
z_e_m = 0.008862
end

get_SS(FS2000, silent = true)
get_SS(FS2000, parameters = :alp => 0.36, silent = true)
get_solution(FS2000, silent = true)
get_solution(FS2000, parameters = :alp => 0.35)
get_standard_deviation(FS2000)
get_correlation(FS2000)
get_autocorrelation(FS2000)
get_variance_decomposition(FS2000)
get_conditional_variance_decomposition(FS2000)
get_irf(FS2000)
end

@testset verbose = true "Model without shocks" begin
@model m begin
Expand Down

0 comments on commit cfba6ed

Please sign in to comment.