I am working on a discrete time HANK model in Julia.
The model has a very large number of parameters. Most of these are related to the theoretical structure of the model (e.g., production function parameters, utility function parameters, policy parameters, stochastic process parameters, etc.). Some are related to numerical methods (e.g., numbers of grid points, state space bounds, convergence tolerances, dampening parameters for fixed point iterations, etc.).
The code will make use of many functions, some will only require a small subset of the parameters (e.g., a function for the marginal utility of consumption), others will require all of them as they will call many of the other functions (e.g., a function for computing the steady-state of the model).
I will also write some calibration routines that will alter the parameters to achieve certain calibration targets for the model (e.g., matching some features of the empirical income or wealth distribution for example). These are likely to be iterative (e.g., solving the model, updating parameters, solve again, etc.)
What is the best practice for storing and passing these parameters to functions and why? I have often seen examples where modelers set up a structure to hold all the model parameters and then simply pass the structure to functions. But it seems like named tuples could also work.
The model is large and thus performance will be a top consideration.
Thank you in advance for any insights.