I compute distances used in the gravity model of international trade that improve the existing measures along multiple lines and help remedy the border puzzle. I derive a trade cost aggregation that is agnostic to the underlying gravity framework while taking into account the economic geography of countries. The key parameter of the aggregation turns out to be the elasticity of trade to the respective trade cost, which, conveniently, can be estimated in the gravity model. Based on this method I then compute aggregate bilateral and internal country distances, making use of nightlight satellite imagery for information on the economic geography of countries. With around 60 million illuminated locations on earth, the data exhibits very ﬁne detail on the location of economic activity and is available annually since 1992, allowing me to take into account changes over time. Employing these computed distances in a standard gravity equation yields a number of noteworthy results. Exploiting the timevariation of the distances, I can estimate the distance coefﬁcient while controlling for unobserved country-pair characteristics. Trade elasticity estimates are in the vicinity of −1. Further, their use yields important consequences for other gravity variables: the border coefﬁcient, i.e. the often puzzlingly large relative difference between internal and external trade, is reduced by between 30 % and 50 %. Regressions using simulated data conﬁrm the theoretical and empirical ﬁndings and support the magnitude of the estimated effects.

Julian Hinz. "The View from Space: Theory-based Time-varying Distances in the Gravity Model".
*Beiträge zur Jahrestagung des Vereins für Socialpolitik 2017*, ZBW - Deutsche Zentralbibliothek für Wirtschaftswissenschaften, Kiel, September 2017. *Work in progress*.