code: def negative_volume_index(close, volume, fillna=False):
      """Negative Volume Index (NVI)
  
      http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:negative_volume_inde
  
      The Negative Volume Index (NVI) is a cumulative indicator that uses the
      change in volume to decide when the smart money is active. Paul Dysart
      first developed this indicator in the 1930s. [...] Dysart's Negative Volume
      Index works under the assumption that the smart money is active on days
      when volume decreases and the not-so-smart money is active on days when
      volume increases.
  
      The cumulative NVI line was unchanged when volume increased from one
      period to the other. In other words, nothing was done. Norman Fosback, of
      Stock Market Logic, adjusted the indicator by substituting the percentage
      price change for Net Advances.
  
      This implementation is the Fosback version.
  
      If today's volume is less than yesterday's volume then:
          nvi(t) = nvi(t-1) * ( 1 + (close(t) - close(t-1)) / close(t-1) )
      Else
          nvi(t) = nvi(t-1)
  
      Please note: the "stockcharts.com" example calculation just adds the
      percentange change of price to previous NVI when volumes decline; other
      sources indicate that the same percentage of the previous NVI value should
      be added, which is what is implemented here.
  
      Args:
          close(pandas.Series): dataset 'Close' column.
          volume(pandas.Series): dataset 'Volume' column.
          fillna(bool): if True, fill nan values with 1000.
  
      Returns:
          pandas.Series: New feature generated.
  
      See also:
          https://en.wikipedia.org/wiki/Negative_volume_index
      """
      return NegativeVolumeIndexIndicator(
          close=close, volume=volume, fillna=fillna
      ).negative_volume_index()
  
imports: import typing
  import numpy
  import pandas
  from ta.utils import IndicatorMixin, _ema
label_desc: Use image node_id 8 for calling a global function with example usage: negative_volume_index(close, volume, fillna) and returns: NegativeVolumeIndexIndicator