Yield curve is a graphical representation of a relationship between interest rates and maturity. Shape of yield curve often attracts attention of analysts, because it represents market implied expectation of future interest rate path. However, the analysis of the yield curve shape often lacks theoretical foundation. It is based either on review of term spreads or on a simple visual investigation. In this article we formally define the shape of the yield curve in terms of function invariants. We use Nelson–Siegel model as a backbone for our classification and show that there exists only six possible shapes of yield curve. They are: a normal upward slopping yield curve, inverted yield curve, humped upward slopping, dipped upward slopping, humped inverted and dipped inverted. We analyze dynamics of zero coupon yield curve in Russian market based on real historical data. We show that transition from an upward slopping curve to an inverted one was always preceded by a hump at mid-tem maturities, while the transition back was always done through the dip. This highlights the importance of mid-term rates in reshapening the curve. We explain this behavior by short end of the curve being linked to the key rate and thus being more sticky. The contribution of the paper is twofold. First, it provides a formal framework to analyze the shape of the yield curve. Second, it describes the patterns in dynamic of the ruble yield curve that can be useful for bond investors in the Russian market.