NY Fed

FRBNY Uses Julia for Faster Macroeconomic Models

NY Fed

FRBNY Uses Julia for Faster Macroeconomic Models

Date Published

Jan 2, 2023

Jan 2, 2023

Industry

Finance

Share

Share

Date Published

Jan 2, 2023

Industry

Finance

Share

Use Case

In 2015, economists at the Federal Reserve Bank of New York (FRBNY) published FRBNY’s most comprehensive and complex macroeconomic models, known as Dynamic Stochastic General Equilibrium, or DSGE models, in Julia.

Why Julia?

In their words:

Julia has two main advantages from our perspective. First, as free software, Julia is more accessible to users from academic institutions or organizations without the resources for purchasing a license. Now anyone, from Kathmandu to Timbuktu, can run our code at no cost.

Second, as the models that we use for forecasting and policy analysis grow more complicated, we need a language that can perform computations at a high speed. Julia boasts performance as fast as that of languages like C or Fortran, and is still simple to learn. We want to address hard questions with our models—from understanding financial markets developments to modeling households’ heterogeneity—and we can do so only if we are close to the frontier of programming.

We tested our code and found that the model estimation is about ten times faster with Julia than before, a very large improvement. Our ports (computer lingo for “translations”) of certain algorithms, such as Chris Sims’s gensys (which computes the model solution), also ran about six times faster in Julia than the ... versions we had previously used.

Furthermore, FRBNY’s ‘solve’ test ran 11 times faster in Julia than with their legacy system. This performance improvement is crucial because this particular test is run hundreds of thousands of times.

What makes Dynamic Stochastic General Equilibrium (DSGE) models so important and complex?

DSGE models are used to provide a structural view of the macroeconomy and forecast everything from economic growth to consumer spending and investment. The growing complexity of the US and global economy combined with dramatic increases in the size and complexity of data have made it necessary to develop ever more powerful tools to analyze and understand the relationship among economic variables.

FRBNY economists found that Julia allowed them to write more generic and concise code, resulting in better code maintenance. They reported that their code base had reduced to approximately half in size. While designing the package, the analysts found a number of Julia features favorable towards writing economic models:

  • Flexible and powerful type system that provides a natural way to structure and simplify codebase

  • Multiple dispatch, which allowed them to write more generic code

  • A powerful compiler that boosts performance

One result of this research is DSGE.jl, a Julia language package that facilitates the solution and Bayesian estimation of DSGE models.

Julia is helping the Federal Reserve Bank of New York estimate economic activity and provide policy recommendations that are more efficient, accurate and effective.

Tags

Tags

Tags

Authors

JuliaHub, formerly Julia Computing, was founded in 2015 by the four co-creators of Julia (Dr. Viral Shah, Prof. Alan Edelman, Dr. Jeff Bezanson and Stefan Karpinski) together with Deepak Vinchhi and Keno Fischer. Julia is the fastest and easiest high productivity language for scientific computing. Julia is used by over 10,000 companies and over 1,500 universities. Julia’s creators won the prestigious James H. Wilkinson Prize for Numerical Software and the Sidney Fernbach Award.

Authors

JuliaHub, formerly Julia Computing, was founded in 2015 by the four co-creators of Julia (Dr. Viral Shah, Prof. Alan Edelman, Dr. Jeff Bezanson and Stefan Karpinski) together with Deepak Vinchhi and Keno Fischer. Julia is the fastest and easiest high productivity language for scientific computing. Julia is used by over 10,000 companies and over 1,500 universities. Julia’s creators won the prestigious James H. Wilkinson Prize for Numerical Software and the Sidney Fernbach Award.

Authors

JuliaHub, formerly Julia Computing, was founded in 2015 by the four co-creators of Julia (Dr. Viral Shah, Prof. Alan Edelman, Dr. Jeff Bezanson and Stefan Karpinski) together with Deepak Vinchhi and Keno Fischer. Julia is the fastest and easiest high productivity language for scientific computing. Julia is used by over 10,000 companies and over 1,500 universities. Julia’s creators won the prestigious James H. Wilkinson Prize for Numerical Software and the Sidney Fernbach Award.

Contact Us

Want to get enterprise support, schedule a demo, or learn about how we can help build a custom solution? We are here to help.

Contact Us

Want to get enterprise support, schedule a demo, or learn about how we can help build a custom solution? We are here to help.

Contact Sales

Learn about our products, pricing, implementation, and how JuliaHub can help your business

We’ll use your information to respond to your inquiry and, if applicable, classify your interest for relevant follow-up regarding our products. If you'd like to receive our newsletter and product updates, please check the box above. You can unsubscribe at any time. Learn more in our Privacy Policy.

Get a Demo

Discover how Dyad, JuliaHub, and Pumas can improve your modeling and simulation workflows.

Enterprise Support

Leverage our developers, engineers and data scientists to help you build new solutions.

Custom Solutions

Have a complex setup that needs a custom solution? We are here to help.

Contact Sales

Learn about our products, pricing, implementation, and how JuliaHub can help your business

We’ll use your information to respond to your inquiry and, if applicable, classify your interest for relevant follow-up regarding our products. If you'd like to receive our newsletter and product updates, please check the box above. You can unsubscribe at any time. Learn more in our Privacy Policy.

Contact Sales

Learn about our products, pricing, implementation, and how JuliaHub can help your business

We’ll use your information to respond to your inquiry and, if applicable, classify your interest for relevant follow-up regarding our products. If you'd like to receive our newsletter and product updates, please check the box above. You can unsubscribe at any time. Learn more in our Privacy Policy.

Get a Demo

Discover how Dyad, JuliaHub, and Pumas can improve your modeling and simulation workflows.

Enterprise Support

Leverage our developers, engineers and data scientists to help you build new solutions.

Custom Solutions

Have a complex setup that needs a custom solution? We are here to help.

/

/

FRBNY Uses Julia for Faster Macroeconomic Models

/

/

FRBNY Uses Julia for Faster Macroeconomic Models