class_docstr: Ulcer Index
  
  https://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:ulcer_index
  
  Args:
      close(pandas.Series): dataset 'Close' column.
      window(int): n period.
      fillna(bool): if True, fill nan values.
class_docstr_tok: ["Ulcer","Index","https",":","\/\/stockcharts.com\/school\/doku.php","?","id=chart_school",":","technical_indicators",":","ulcer_index","Args",":","close","(","pandas.Series",")",":","dataset","'Close","'","column",".","window","(","int",")",":","n","period",".","fillna","(","bool",")",":","if","True",",","fill","nan","values","."]
code: def _run(self):
      _ui_max = self._close.rolling(self._window, min_periods=1).max()
      _r_i = 100 * (self._close - _ui_max) / _ui_max
  
      def ui_function():
          def _ui_function(x):
              return np.sqrt((x**2 / self._window).sum())
  
          return _ui_function
  
      self._ulcer_idx = _r_i.rolling(self._window).apply(
          ui_function(), raw=True
      )
  
imports: import numpy
  import pandas
  from ta.utils import IndicatorMixin
label_desc: Use image node_id 2 for calling the UlcerIndex obj's underlying member method code with example usage: obj._run() and returns: _ui_function, np