Skip to content

Commit

Permalink
monte carlo simulator now constructs shocks in calibration scope at i…
Browse files Browse the repository at this point in the history
…nitialization
  • Loading branch information
sbenthall committed Jul 2, 2024
1 parent 214edad commit e92e249
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions HARK/simulation/monte_carlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
)
from HARK.model import Aggregate
from HARK.model import DBlock
from HARK.model import simulate_dynamics
from HARK.model import construct_shocks, simulate_dynamics


def draw_shocks(shocks: Mapping[str, Distribution], conditions: Sequence[int]):
Expand Down Expand Up @@ -139,7 +139,11 @@ def __init__(

self.calibration = calibration
self.block = block
self.shocks = block.get_shocks()

# shocks are exogenous (but for age) but can depend on calibration
raw_shocks = block.get_shocks()
self.shocks = construct_shocks(raw_shocks, calibration)

self.dynamics = block.get_dynamics()
self.dr = dr
self.initial = initial
Expand Down

0 comments on commit e92e249

Please sign in to comment.