Behind the scenes: how we developed the inflation tool

By CORE Econ | 19 June 2024

You can find CORE Econ’s inflation tool on our website. With this tool, you can study the effects of a supply-side shock on the economy and the central bank’s response. The tool allows you to see how the response to a shock changes as you change the variables the central bank can control:

  • what happens when the central bank raises the interest rate?
  • how would a hawkish or a dovish central bank respond?
  • what if inflation expectations are not tightly anchored to the target?

You can check your understanding by setting a value for specific parameters and seeing how the impulse response functions of key variables such as output, inflation, and real interest rate change.

The tool comes with closed-ended questions with immediate feedback and exercises you can use to self-assess your learning.

This tool is a complement to Unit 4 of The Economy 2.0: Macroeconomics, where you study the Phillips curve, inflation, and the role of the central bank in keeping inflation under control.

How did we get here?

At University College London (UCL), students on the first-year CORE Econ course first encounter a model of inflation when they study Unit 4 of The Economy 2.0: Macroeconomics (formerly, Unit 15 of The Economy 1.0). This model serves as the building foundation of the 3-equation model which they develop in their second year as part of their intermediate macroeconomics course (using Carlin and Soskice, Macroeconomics) as the textbook.

Students on this course can rely on an Excel simulator to help them handle the 3-equation model with more confidence. The simulator lets them work with a closed or an open economy, and for each, they can set several parameters like the type and size of shock, the inflation target, the sensitivity of inflation to interest rate, or central bank’s inertia.

The simulator produces numerical results and impulse response functions, shown below. The students can use these to compare their diagrammatic analysis of a shock.

Neil Majithia, an economics graduate from UCL, studied intermediate macroeconomics during the academic year 2021/2022. He, alongside many of his colleagues, extensively used the Excel simulator to consolidate his understanding of the 3-equations model. However, when talking with his classmates, he realised that this tool could be improved, and made more student-friendly.

Between January and April 2022, Neil worked on his version of a 3-equations model simulator. What he produced was an extension of the Excel simulator, where numerical results and impulse response functions are accompanied by the IS and Phillips curve/MR diagrams. This proved tremendously helpful for his colleagues, who could compare their diagrams with those produced by this simulator.

For his work, Neil won the Best Research Poster category at Explore Econ 2022, the UCL Department of Economics’ student research competition. You can also watch Neil presenting his work.

It was after a meeting with Wendy Carlin, Director of CORE Econ, Javier Lozano (who built the original Excel simulator for the Carlin and Soskice textbook), Ramin Nassehi, Lecturer in Economics at UCL, Dunli Li, Lecturer in Economics at UCL, and Javier Boncompte, UCL Economics PhD student, that CORE Econ offered Neil the opportunity to develop the current inflation tool.

The result of this group effort was an inflation tool that embeds the analysis of inflation into a narrative around a series of shocks that led to the reemergence of inflation as a problem. Students experienced the increases in inflation in recent years arising in the aftermath of the COVID-19 pandemic, the subsequent global production supply chain issues, and the war in Ukraine. This device is key in CORE Econ’s pedagogy: ask students an important, real-world question; build an economic model that can explain it with the aid of data; assess how well the model helps you answer the initial question.

Why is this tool helpful?

  • The tool follows CORE Econ’s pedagogical approach whereby students are tested at various steps with closed-ended questions with immediate feedback.
  • From a user perspective, students can change key parameters in the model and immediately see the impulse response functions, unlike in the Excel simulator where they need to switch between tabs. It becomes clearer how a change in a parameter is reflected in the diagrams.
  • The analysis of inflation revolves around real-world examples which students find relevant. In turn, they realise their learning has practical purposes and relevance in real life.

The last point was particularly pressing to Neil. “Students are always asking whether what they’re learning is relevant and meaningful in real life. They will engage much better with a course if they can relate it to their own lives. This tool facilitates independent studying, by asking questions and helping students to answer them”.

That is, CORE Econ’s mission in a nutshell.

For the curious and the keen who want to know about the code behind the inflation tool, keep reading!

The inflation tool is based on a Jupyter Notebook, i.e. a Python file with text and images embedded in between blocks of code. With a typical Jupyter Notebook, however, all the code is presented to the reader alongside the text, which is not the case in the inflation tool. This is thanks to an early point raised by the professors in the team, concerning inaccessibility of code for students with limited technical background. Displaying code to those types of students would do nothing more than intimidate them from reading the page and accessing all the important educational information, for which the code is just a vehicle for presentation. To address this concern, the team worked with “Voici” – a Python library that hides the code from a Jupyter notebook and presents it in web form.

Using Voila, the inflation tool therefore facilitates the use of Python code without burdening students with the task of understanding it. The code works to provide the interactive widgets and multiple-choice questions that make the tool more than just a textbook page.

The styling of the notebook was manipulated into following the CORE style, from colour scheme to margin sizes, using CSS and HTML 5. The resulting web application is hosted on GitHub pages.

It’s worth mentioning that the “Voici” build used is experimental and the development details are extremely simplified above. However, this project has reached developers around the world who have communicated to the team their interest in helping CORE by streamlining the development process. This inflation tool has contributed to the use of code-less notebooks for teaching humanities subjects in the digital era of education.