Yesterday, Stata published a spotlight blog on instrumental-variable local projection impulse-response functions built around the ivlpirf command. The point is important. Local projections are already widely used in empirical macroeconomics, but the addition of an IV framework makes them even more useful when the impulse of interest is endogenous and the researcher wants a structural interpretation of the response. Stata’s presentation is therefore more than a software update: it reflects the growing centrality of IV local projections in applied macroeconomics.
This is directly related to 2 themes I have been working on recently. The first is graphical: how to improve the visualization of local projection impulse-response functions in Stata. The second is conceptual: how geopolitical turning points can be used as instruments when political relations are endogenous to macroeconomic and financial conditions. In other words, the software discussion and the identification discussion now meet in a very natural way.
The underlying problem is familiar. When one studies the macroeconomic effects of geopolitical relations, the geopolitical variable is partially endogenous. Some of the bilateral political relations may evolve together with trade flows, commodity prices, financial conditions, and growth expectations. A simple regression of an economic variable on a political relations indicator is therefore difficult to interpret causally. Reverse causality, omitted variables, and anticipation immediately arise. This is exactly where instrumental-variable local projections become useful: they allow us to keep the flexibility of local projections while identifying a structural impulse through an external source of variation.
In my ongoing work on geopolitical turning points, the idea is to use sharp changes in bilateral political relations as an instrument for the underlying geopolitical shock. The intuition is straightforward. Major diplomatic turning points are discrete events that shift the political relationship in a way that is highly relevant for the geopolitical indicator, while being less contaminated by the slow-moving macroeconomic feedback that usually plagues identification. Of course, relevance is not enough. One must also think carefully about anticipation and exclusion. But once that discussion is made explicit, the IV local projection framework becomes a natural empirical tool. The blog post I recently wrote on relevance, anticipation, and exclusion develops precisely that logic.
A nice aspect of the new Stata implementation is that it makes this strategy easy to present and reproduce. The command below illustrates the logic in a compact way:
ivlpirf lwti lpri lwip d.lgop, endogenous(lpri = d2pri) ///
step(36) vce(hac nwest 12) lags(1/2)
irf set myirf, replace
irf create ivlp, replace
irf graph sirf, irf(ivlp) impulse(lpri) response(lwti) ///
xlabel(0(6)36) level(90) ///
ciopts(fcolor(blue%20) lcolor(blue)) ///
plot1opts(lcolor(red) lwidth(medthick)) ///
byopts(note("") ti(, size(small))) xti("") ///
subtitle("") ysize(4) xsize(6) legend(cols(2)) yline(0) ///
ti("Oil price reaction to an improvement of PRI between the US and China")
The empirical setup is simple. Oil prices are the response variable. Bilateral political relations between the United States and China, captured here by lpri, are treated as endogenous. The instrument is d2pri, which captures the turning-point component used to isolate exogenous geopolitical variation. The horizon extends to 36 periods, and inference is conducted with HAC-Newey-West standard errors. This is precisely the kind of environment in which IV local projections are most helpful: persistence matters, endogeneity matters, and dynamic effects are the object of interest. The ivlpirf command is designed precisely for that purpose.
The figure below provides the corresponding structural impulse response.

Figure 1. Oil price reaction to an improvement of PRI between the US and China
This figure reports the structural impulse response of oil prices to an improvement in the bilateral political relations indicator between the US and China, estimated with an instrumental-variable local projection. The red line is the structural IRF, and the shaded area is the 90% confidence interval. The response is initially modest, then becomes positive at medium horizons, suggesting that an improvement in bilateral political relations is associated with a gradual increase in oil prices over time. The illustration is aligned with the type of evidence presented, estimated with the locproj package, in my SSRN paper, Geopolitical Turning Points and Macroeconomic Volatility: A Bilateral Identification Strategy.

There is also a practical graphical lesson here. In irf graph, the confidence band and the IRF line are controlled separately. The confidence interval is styled through ciopts(), while the estimated structural response itself is styled through plot1opts(). This distinction is useful for publication-quality figures because it lets the researcher produce graphs that are both clearer and more visually disciplined. In the example above, the structural IRF is shown in red and the confidence band in translucent blue, which makes the dynamic pattern much easier to read. Stata’s documentation for irf graph explicitly supports this separation between the styling of the plotted statistic and the styling of the confidence interval.
More broadly, this is why I find the current moment interesting. On the one hand, software now makes IV local projections much more accessible. On the other hand, many macroeconomic questions increasingly require precisely this kind of identification strategy. Geopolitical shocks are a good example. They are economically important, but difficult to identify cleanly because they are entangled with expectations, financial variables, trade integration, and commodity markets. A turning-point instrument combined with local projections offers a transparent way to move from reduced-form correlation toward a structural dynamic interpretation.
So the message of this post is simple. The recent Stata spotlight on ivlpirf is timely. It provides an excellent entry point for researchers who want to estimate structural impulse responses in the presence of endogenous shocks. For those working on geopolitics, the framework is particularly attractive because it can be combined with event-based or turning-point instruments. And for those who care about communication as much as estimation, good visualization remains essential: a structural IRF should not only be identified carefully, it should also be drawn clearly.
References
Saadaoui, J. (2025). Geopolitical Turning Points and Macroeconomic Volatility: A Bilateral Identification Strategy. Available at SSRN: 5366829.
Saadaoui, J., Strauss‐Kahn, V., & Creel, J. (2026). How geopolitics influences the exports of Chinese firms (January 25, 2026). Available at SSRN: 6130286.
Saadaoui, J., Russell, S., Vespignani, J. & Yitian, W. (2026). Use-specific Storage Premia and Market Stabilization for Critical Minerals in the Presence of Geopolitical Risk. Available at SSRN: 6217320.
Ugarte-Ruiz, A. (2025). Locproj & Lpgraph: Stata commands to estimate Local Projections. BBVA Research WP, 25-09.