@pond-ts/financial API Reference
    Preparing search index...

    Function positiveVolumeIndex

    • Positive Volume Index (Fosback) — negativeVolumeIndex's twin, compounding a bar's return only when that bar's volume was higher than the previous bar's:

      PVI[0] = start                                   (1000 by convention)
      PVI[i] = volume[i] > volume[i−1]
      ? PVI[i−1] × (1 + (close[i] − close[i−1]) / close[i−1])
      : PVI[i−1]

      Every convention, edge and gap rule on negativeVolumeIndex applies unchanged — including that an unchanged volume holds, so NVI and PVI do not partition the bars between them: a flat-volume bar is compounded into neither.

      Appends one column (pvi by default).

      Type Parameters

      • S extends SeriesSchema
      • const Output extends string = "pvi"

      Parameters

      Returns TimeSeries<
          readonly [S[0], ValueColumnsForSchema<S>, OptionalNumberColumn<Output>],
      >