Determining the current state of the economy is a crucial task for policy institutions and market participants. Before introducing policy measures or putting investment strategies into action, agents in the market need to consider current economic conditions. However, these conditions are often difficult to assess since macroeconomic data are published at different frequencies with a significant delay and are subject to revisions.
Now-Casting Economics tackles this problem by producing high-frequency present-term predictions of GDP and other macroeconomic variables for the world’s largest economies. Nowcasting models, originally developed by a group of academic economists who later went on to found Now-Casting Economics, are widely used to monitor the state of the economy by estimating predictions of macroeconomic variables for the present, the recent past and the near future. These predictions are produced using a complex dynamic factor model which exploits the fact that there is a significant degree of co-movement among macroeconomic time series which can be summarized with a small number of common factors. Within this framework, Now-Casting exploits the timeliness of the data releases by using variables at different frequencies and with differing publication lags. For example, survey variables can be useful to get an early estimate since they are usually released earlier than hard variables (e.g. industrial production), which are released with a longer publication delay. Once published, the hard variables can then improve upon the early estimates.
The computational requirements led the Now-Casting team to Julia. Their servers run the nowcasting model continuously and provide real-time estimates of current economic conditions. The servers are active at all times and update the estimates as soon as any new economic data is published.
Now-Casting is continuously changing and improving the code for their nowcasting model. Researching, developing and delivering cutting edge improvements requires a substantial improvement in software speed online and offline. The most recent iterations of these type of models use Bayesian estimation methods that are very complex and computationally demanding.
Senior Economists Thomas Hasenzagl and Filippo Pellegrino explain:
Given the computational intensity, Julia seemed the natural programming language to use. Julia significantly improved the computational efficiency and speed of the nowcasting model. This framework employs a number of different algorithms including an Expectation-Maximization (EM) algorithm for Dynamic Factor Models (DFM), a Kalman filter and smoother, and several routines used to measure the impact of each individual economic release. Julia is even more crucial when a large number of simulations is required, such as in Bayesian estimation methods. In “A Model of the Fed’s View on Inflation” and “Low Inflation for Longer” we proposed a structural time series model of inflation representing the Fed’s view, according to which trend inflation is captured by expectations while higher frequency components are explained by oil prices and the Phillips curve. Even though we use a linear model, the state-space is complex and handled by the use of a Metropolis-Within-Gibbs algorithm. Switching from Matlab to Julia reduced the run time from weeks to days.