This paper proposes a simulation-based maximum likelihood or Bayesian algorithm for the estimation of macroeconomic models. This approach is able to derive posteriors or the maximum likelihood estimate even when the likelihood function is not tractable. Because the likelihood is not needed for Bayesian estimation, filtering is also not needed. The approach shares similarity to Kristensen and Shin (2012), but it replaces the kernel density estimator with the option of a few different machine learning density estimators that can deal with high dimensions while being numerically stable. I demonstrate the validity of the approach by estimating a 10 parameter HANK model solved via Reiter’s method that generates 812 covariates per time step, where 810 are latent variables, showing this can handle a large latent space without state space reduction. I also estimate the algorithm with an 11-parameter model solved via value function iteration, which cannot be estimated with Metropolis-Hastings or even conventional maximum likelihood estimators without measurement errors. In addition, I show the posteriors estimated on Smets-Wouters 2007 are higher quality and faster using simulation-based inference compared to Metropolis-Hastings. This approach helps address the computational expense of Metropolis-Hastings and allows solution methods which don’t yield a tractable likelihood to be better estimated.