Skip to content
All library documents

Estimating Stock Position Costs from Volume and Price Ranges

Article TradingView scripts

Summary

This indicator estimates how outstanding stock positions are distributed across price levels. It processes recent daily candles for stocks on chart timeframes up to daily, using volume and total shares outstanding. Each candle’s volume is spread uniformly across the price buckets between its low and high. Existing bucketed holdings are reduced by the candle’s turnover rate before new volume is added, creating an approximate evolving cost distribution.

The display plots bucket sizes beside the chart, colors prices below the current close as profitable and prices above it as unprofitable, and marks the current and estimated average cost. It also reports a profit ratio and central price ranges covering selected portions of the estimated distribution. These are model-based estimates, not observed investor-level cost bases: uniform allocation across each candle’s range is a simplifying assumption, and the indicator’s own notes suggest alternative distributions could be considered. The document offers implementation details but no evidence that the estimates predict future returns.

Key ideas

  • The indicator estimates a stock cost distribution by dividing each candle’s volume among price buckets spanning its high and low.
  • It uses volume relative to shares outstanding as a turnover rate to reduce previously accumulated bucket balances.
  • The chart summarizes estimated profitable positions, average cost, and central cost ranges against the current price.
  • The estimate assumes volume is uniformly distributed across each candle’s range and is not a record of individual transactions.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.