The concept of natural pseudo-distance has proven to be a powerful tool for measuring the dissimilarity between shape properties of topological spaces, modeled as continuous real-valued functions defined on the spaces themselves. Roughly speaking, the natural pseudo-distance is defined as the infimum of the change of the functions' values, when moving from one space to the other through homeomorphisms, if possible. In this paper, we prove the first available result about the existence of optimal homeomorphisms between closed curves, i.e. inducing a change of the function that equals the natural pseudo-distance. Moreover, we show that, under our assumptions, this optimal homeomorphism is actually a diffeomorphism.