Positive Volume Index Technical Indicator for Stock Trading

Article

Learn how to integrate the Positive Volume Index Indicator into your fintech software using LightningChart JS Trader.
Soroush Sohrabian

Ahmad Omid

Data Science Developer

LinkedIn icon
Positive-Volume-Index-Cover

What is the Positive Volume Index Indicator?

The Positive Volume Index (PVI) is a technical indicator that tracks the trading volume of a stock, focusing specifically on days when the volume increases compared to the previous trading day. It assumes that trading volume reflects the activity of less-informed or retail traders (commonly referred to as the “not-so-smart money”). Conversely, on low-volume days, the assumption is that institutional investors or “smart money” drive the market.

The Positive Volume Index indicator is primarily used as a contrarian tool. By identifying periods of heightened activity from retail investors, traders can anticipate potential market inefficiencies and prepare strategies to capitalize on opportunities during quieter trading periods.

How is the Positive Volume Index Indicator Used in Trading?

The Positive Volume Index strategy provides traders with insights into market trends by highlighting days of high-volume trading activity. It is most often used alongside complementary indicators, such as the Negative Volume Index (NVI) and moving averages, to provide a holistic view of market conditions. This dual approach enables traders to differentiate between market movements driven by institutional versus retail participation.

By analyzing the Positive Volume Index formula and its resulting values, traders can:

  • Spot the influence of retail traders on stock prices.
  • Gauge potential overbought or oversold conditions caused by high-volume trading.

Develop contrarian strategies, capitalizing on deviations between the market sentiment of “smart” and “not-so-smart” money.

Positive Volume Index Indicator in Trading – How Does the Positive Volume Index Affect Stock Prices?

The Positive Volume Index indicator assumes that when trading volume rises, retail investors dominate market activity. Their decisions often stem from emotion, herd behavior, or reaction to news events. This increased activity can lead to short-term price volatility.

However, retail-driven price movements are frequently unsustainable in the long term. For this reason, professional traders and investors use the PVI as a signal to either avoid overbought conditions or exploit underpriced opportunities after the initial frenzy subsides.

Key patterns observed with the Positive Volume Index strategy include:

  • Bullish signals: When the PVI rises above a moving average, it may signal that momentum is building in a sustainable direction.
  • Bearish signals: A declining PVI coupled with decreasing volume often indicates weakening retail interest, prompting caution or a contrarian stance.

Formula

The Positive Volume Index formula is calculated as follows:

Positive-Volume-Index-Indicator-Formula

The formula is applied only if the trading volume for the current day exceeds the volume from the previous day. Otherwise, the PVI remains unchanged.

Interpretation

  1. Rising PVI: Indicates increased retail investor participation. If aligned with positive price movement, it may validate an ongoing trend.
  2. Falling PVI: Suggests diminishing retail activity, potentially signaling a slowdown or reversal in the trend.
  3. Crossing with moving averages: A PVI crossing above or below a moving average (e.g., 200-day MA) can serve as a bullish or bearish signal, depending on the market context.

Key Components

  • Volume Increases: The PVI only updates when daily volume is higher than the previous day.
  • Price Movement: Reflects how volume impacts the price, offering insights into the behavior of retail investors.
  • Complementary Indicators: Often used alongside the Negative Volume Index and long-term moving averages to improve accuracy.

Calculations Example

The formula applies only if today’s volume is greater than yesterday’s volume. Otherwise, the PVI remains unchanged. Here’s a step-by-step example to calculate the Positive Volume Index (PVI):

Assumptions:

Positive-Volume-Index-Table

Day-by-Day Calculations

Day 1: The starting PVI value is set arbitrarily at 1000 (or any chosen baseline).

Day 2: Today’s volume (1,200,000) is greater than yesterday’s volume (1,000,000), so we update the PVI.

Using the formula:

Positive-Volume-Index-Indicator-Formula-Day-2

Day 3: Today’s volume (950,000) is less than yesterday’s volume (1,200,000). PVI remains unchanged: 1020.

Day 4: Today’s volume (1,500,000) is greater than yesterday’s volume (950,000), so we update the PVI again. Using the formula:

Positive-Volume-Index-Indicator-Formula-Day-4

Summary Table

Positive-Volume-Index-Table-Summary

This step-by-step example illustrates how the Positive Volume Index formula tracks changes in stock prices on high-volume trading days while leaving the value unchanged on low-volume days. This approach highlights the behavior of retail traders and the stock’s responsiveness to their activity.

How to Create the Technical Indicator Using LC JS Trader

Step 1: Get LightningChart JS Trader

To begin, you’ll need access to LightningChart JS Trader. This library provides the tools necessary to create advanced technical indicators, including the Positive Volume Index Indicator. Visit the LightningChart JS Trader page to download the required components and review the documentation.

Step 2: Review the Interactive Example

LightningChart JS Trader includes interactive examples that demonstrate how to create custom technical indicators. Start by reviewing the documentation, focusing on how to integrate the Positive Volume Index Indicator into your chart setup. The interactive examples will guide you through the process of setting up the PVI Indicator, from importing the necessary modules to modify the chart settings.

Step 3: Code Explanation

In this step, we will break down the code that creates the chart with the Positive Volume Index Indicator, as shown in the image, using LightningChart JS Trader. The code demonstrates how to initialize a trading chart, apply the PVI Indicator, and customize its appearance.

Positive-Volume-Index-Chart-Example

Here’s a detailed breakdown of each section:

A. Importing the Required Libraries:

   const lcjsTrader = require('@arction/lcjs-trader')
   const lcjs = require('@arction/lcjs')
   const { Themes } = lcjs
  • lcjsTrader: This library provides access to the LightningChart JS Trader functionalities, allowing you to create advanced financial charts.
  • lcjs: The main LightningChart JS library, used for general charting functionality.
  • Themes: A property within lcjs that provides access to pre-built themes. In this case, we are using the darkGold theme to style the chart.

B. Initializing the Trading Chart:

   lcjsTrader.trader(TRADER_LICENSE).then(async (trader) => {
    // Create a trading chart.
    const tradingChart = trader.tradingChart({ loadFromStorage: false, colorTheme: Themes.darkGold })
  • trader(TRADER_LICENSE): Initializes the LightningChart JS Trader with the provided license key (TRADER_LICENSE). This is required to access the charting functionalities for financial data.

Note you can request a LightningChart JS Trader trial license, which is free.

  • tradingChart(): This function creates a trading chart with certain options.
  • loadFromStorage: false: This disables the loading of previously stored chart data from local storage, ensuring a fresh chart setup.
  • colorTheme: Themes.darkGold: This applies the darkGold theme to the chart, which influences the background color, gridlines, and other visual elements.

C. Adding and Customizing the Indicator

    // Add a Positive Volume Index indicator
    const pvi = tradingChart.indicators().addPositiveVolumeIndex()
    pvi.setSource(3)
    pvi.setLineColor('#FA29E8')
    pvi.setLineWidth(3)
  • addPositiveVolumeIndex(): PVI tracks volume as it increases from the previous day. Since PVI shows the actions of the majority of the traders, it is usually used as a contrarian indicator; smart money is active on quiet days and not-so-smart money on busy days.
  • **pvi.setSource(3): Values to base the calculations on. In this case, 3 represents the close price.
  • pvi.setLineColor('# FA29E8'): Changes the color of the PVI line to pink. This enhances the visual distinction of the indicator on the chart.
  • pvi.setLineWidth(3): Sets the line thickness of the PVI to 3 pixels. This makes the line more prominent and easier to observe during analysis.

D. Loading Data from a CSV File

    // Reading data from a file.
    await fetch(`${document.head.baseURI}examples/assets/0000/Alphabet Inc (GOOGL).csv`).then((res) => res.text()).then((text) => {
        tradingChart.readCsvString(text, 'Alphabet Inc (GOOGL)')
    })
  • fetch(): This function retrieves a CSV file containing historical data for Alphabet Inc. (GOOGL). The CSV file includes pricing information for the company’s stock, which is plotted on the chart.
  • readCsvString(): This function reads the CSV data and interprets it as pricing data for Alphabet Inc. The second argument (‘Alphabet Inc (GOOGL)’) sets the label for the chart, as seen at the top of the chart image.

E. Setting the Currency for the Chart

    tradingChart.setCurrency('USD')
   })
  • setCurrency('USD'): This sets the currency of the chart to USD, ensuring that the pricing data is interpreted and displayed in US dollars.

** Enumeration Source in LC JS Trader: To select which values the indicator calculations are based on.

Positive-Volume-Index-Table-Enumeration

Advantages and Limitations of the Indicator

Advantages

The Positive Volume Index (PVI) is a simple yet effective tool for understanding how volume influences price movements in the stock market. One of its primary advantages is its straightforward calculation. The formula is easy to understand and implement, even for beginner traders, making it a user-friendly indicator.

Since it only updates when trading volume increases compared to the previous day, it filters out days of low activity, allowing traders to focus on periods of heightened market participation.

Another notable advantage is the PVI’s ability to offer contrarian insights. By identifying high-volume days typically associated with retail investor activity, traders can gauge moments when the market may be moving inefficiently or emotionally. This provides opportunities to align strategies with more informed or “smart money” participants who dominate on quieter trading days.

Furthermore, when combined with other tools, such as moving averages or the Negative Volume Index, the PVI can enhance trend analysis by helping traders confirm or refute the strength of market movements.

Limitations

Despite its usefulness, the Positive Volume Index indicator is not without its limitations. One significant drawback is its focus on retail activity, which may not always reflect modern market dynamics.

With the rise of algorithmic trading and high-frequency trading systems, increased volume doesn’t necessarily indicate retail investor dominance. As such, the assumption underlying the PVI may occasionally lead to inaccurate interpretations of market behavior.

Additionally, the PVI is a lagging indicator, as it relies on past data to generate signals. This lag can make it less effective in fast-moving markets or during sudden trend reversals. Traders seeking to capture short-term opportunities may find the PVI too slow to adapt to rapid changes.

Finally, the PVI is rarely used as a standalone tool. For accurate market analysis, it must be paired with other indicators like moving averages, the Negative Volume Index, or oscillators, which adds complexity and necessitates a deeper understanding of technical analysis.

Conclusion

The Positive Volume Index indicator offers a unique perspective on trading activity by focusing on high-volume days typically driven by retail investors. It provides valuable contrarian insights, helping traders identify potential inefficiencies in the market and anticipate turning points in trends.

When combined with other tools like moving averages or the Negative Volume Index, the PVI becomes a powerful addition to any trader’s analytical toolkit, enhancing trend-following and reversal strategies.

The importance of using LightningChart JS Trader lies in its ability to simplify the implementation of indicators like the PVI while offering real-time interactivity and visualization.

By leveraging the LightningChart JS Trader, traders can seamlessly incorporate the Positive Volume Index strategy into their workflows, improving their decision-making process with precise, visually rich data. Its flexibility and efficiency make it an invaluable resource for creating advanced technical analysis tools.

Continue learning with LightningChart

LightningChart Python Trader v1.2

LightningChart Python Trader v1.2

Announcing LightningChart Python Trader v1.2 New Product Features LightningChart Python Trader V1.2 introduces a couple of new technical indicators and drawing tools. Furthermore, several user-requested features and improvements have been added to the library.  New...