code: def to_ulcer_index(prices):
      
      dd = prices.to_drawdown_series()
      return np.divide(np.sqrt(np.sum(np.power(dd, 2))), dd.count())
docs: Converts from prices -> `Ulcer index <https://www.investopedia.com/terms/u/ulcerindex.asp>`_
  
      See https://en.wikipedia.org/wiki/Ulcer_index
  
      Args:
          * prices (Series, DataFrame): Prices