Adjusted vs Unadjusted Prices in Indian Historical Data

Price Truth, Economic Continuity, and the Foundations of Indian Market Data In Indian equity markets, price data is not merely a time series of numbers—it is a historical record shaped by regulation, corporate decisions, and exchange mechanics. For Python developers building analytics platforms, data pipelines, or financial products, the distinction between adjusted and unadjusted prices […]

Table Of Contents
  1. Price Truth, Economic Continuity, and the Foundations of Indian Market Data
  2. The Dual Nature of Price Data in Indian Equities
  3. Why Indian Markets Demand Special Attention
  4. Understanding Corporate Actions as Price-Warping Events
  5. Fetch–Store–Measure: The Core Workflow
  6. Early Impact Across Market Time Horizons
  7. Setting the Stage for Robust Systems
  8. Building a Python-Based Adjustment Engine for Indian Equity Data
  9. Cumulative Adjustment Factors as the Core Abstraction
  10. Handling Multiple and Overlapping Corporate Actions
  11. Adjusting OHLC Prices Without Breaking Candlestick Integrity
  12. Dividends: Partial Adjustment and Indian Market Nuance
  13. Rights Issues: The Most Error-Prone Adjustment
  14. Batch vs On-the-Fly Adjustment Strategies
  15. Detecting Data Integrity Issues Using Adjustment-Aware Checks
  16. Fetch–Store–Measure at Scale
  17. Medium- and Long-Horizon Impact of Proper Adjustment Engineering
  18. Preparing for System-Level Design Decisions
  19. System-Level Architecture for Indian Market Price Data
  20. Designing a Database Schema for Price Integrity
  21. Python Libraries for Indian Market Data Engineering
  22. Methodologies for Sourcing and Validating Data
  23. Fetch–Store–Measure as an Operating Principle
  24. Impact Across Trading and Investment Horizons
  25. Common Failure Modes and How to Avoid Them
  26. Making the System Beginner-Friendly Without Losing Rigor
  27. The Strategic Advantage of Getting This Right
  28. Libraries, Functions, and Techniques Used or Applicable
  29. Closing Perspective

Price Truth, Economic Continuity, and the Foundations of Indian Market Data

In Indian equity markets, price data is not merely a time series of numbers—it is a historical record shaped by regulation, corporate decisions, and exchange mechanics. For Python developers building analytics platforms, data pipelines, or financial products, the distinction between adjusted and unadjusted prices is foundational to data integrity. This distinction determines whether a system reflects raw transactional reality or a normalized economic narrative designed for continuity and comparison.

Unlike superficial charting differences, this choice affects return calculations, signal stability, long-horizon comparisons, and even database schema design. Indian markets amplify this importance due to the frequency of bonus issues, face value changes, dividends, and corporate restructurings. Treating adjusted prices as interchangeable with raw prices is one of the most common—and costly—data mistakes in quantitative systems.

The Dual Nature of Price Data in Indian Equities

Unadjusted Prices: The Historical Record

Unadjusted prices represent the exact prices at which securities traded on a given trading day on the NSE or BSE. These prices are immutable historical facts. If a stock closed at ₹2,500 on a specific date, that value is final regardless of future corporate actions. From a systems perspective, unadjusted prices are authoritative records used for taxation, legal audits, settlement reconciliation, and validating exchange-level data feeds.

These prices preserve visible discontinuities. A bonus issue, split, or dividend produces sharp gaps in the price series—not because of market behavior, but because the unit of ownership itself changed. Such gaps are not data defects; they are economically correct reflections of structural events.

Raw Price Capture Logic
RawPrice[t] = ExchangeReportedPrice[t]

Adjusted Prices: The Economic Continuity Layer

Adjusted prices are reconstructed values designed to maintain continuity across time by neutralizing the mechanical effects of corporate actions. They answer a different question: “What would the historical price look like if today’s share structure had always existed?” This makes them essential for return analysis, indicator computation, and long-term comparative analytics.

Adjusted prices are not traded prices. They are derived artifacts, created by applying adjustment factors backward through time. Their purpose is analytical consistency, not historical accuracy.

Adjusted Price Logic
AdjustedPrice[t] = RawPrice[t] / CumulativeAdjustmentFactor[t]

Why Indian Markets Demand Special Attention

Indian equities exhibit structural characteristics that make price adjustments unavoidable for serious analysis. Bonus issues are common, dividends are frequent, and face value changes are more prevalent than in many developed markets. Additionally, exchanges publish raw prices, while many vendors distribute partially or fully adjusted datasets without always disclosing methodology.

This creates a unique engineering challenge: Python systems must explicitly model corporate actions as first-class data entities rather than implicit assumptions. Failing to do so results in silent data corruption—smooth charts that are mathematically incorrect or jagged series that break indicators.

Understanding Corporate Actions as Price-Warping Events

Bonus Issues and Stock Splits

A bonus issue or split changes the number of outstanding shares without altering the company’s total market value. However, it mechanically reduces the per-share price. Without adjustment, historical charts show abrupt price collapses that never represented economic loss.

Bonus and Split Adjustment Formula
AdjustmentFactor = (A + B) / B   # Bonus Issue (A:B)
AdjustmentFactor = A / B         # Stock Split (A:B)

AdjustedPrice = RawPrice / AdjustmentFactor

Dividends and Cash Distributions

Dividends represent a transfer of value from the company to shareholders. On the ex-date, prices drop by approximately the dividend amount. In raw data, this appears as a gap. For long-term return measurement, dividend-adjusted prices are essential; otherwise, total returns are systematically understated.

Dividend Adjustment Logic
AdjustedPrice = RawPrice - DividendAmount

Rights Issues and Structural Complexity

Rights issues introduce additional complexity because they involve both price and quantity changes at preferential rates. Adjustment requires computing a theoretical ex-rights price, ensuring continuity without misrepresenting dilution effects.

Rights Issue Adjustment Concept
ExRightsPrice = (P*B + S*A) / (A + B)
AdjustmentFactor = ExRightsPrice / P

Fetch–Store–Measure: The Core Workflow

Fetch: Separating Prices from Events

A robust system fetches raw OHLC price data and corporate action data independently. Prices come from daily exchange publications, while corporate actions originate from structured announcements. Conflating these sources introduces ambiguity and prevents reproducibility.

Store: Preserving Immutable Truth

Raw prices should be stored exactly as received, never overwritten. Corporate actions should be stored as dated events with explicit parameters. Adjusted prices should always be derivable, never authoritative.

Measure: Applying Adjustments Intelligently

Adjustments are applied during analytics or batch processing stages. This ensures flexibility, auditability, and the ability to recompute history if corporate action details change.

Pipeline Pseudocode
raw_prices = fetch_raw_prices()
corp_actions = fetch_corporate_actions()

store(raw_prices)
store(corp_actions)

adjusted_prices = apply_adjustments(raw_prices, corp_actions)

Early Impact Across Market Time Horizons

Short-Term Perspective

For intraday and very short-term analysis, unadjusted prices dominate. Corporate actions rarely affect intraday continuity, and raw prices preserve actual traded levels relevant to execution.

Medium-Term Perspective

Over weeks or months, unadjusted gaps distort indicators and comparisons. Adjusted prices stabilize momentum and oscillators by removing artificial shocks.

Long-Term Perspective

Over years, unadjusted prices become analytically unusable for growth measurement. Adjusted prices are mandatory for understanding compounding, wealth creation, and structural trends.

Setting the Stage for Robust Systems

Understanding adjusted versus unadjusted prices is not optional for Indian market analytics—it is the starting point. In the next part, we move deeper into Python-based adjustment engines, cumulative factor construction, and large-scale data integrity mechanisms that transform raw exchange feeds into reliable analytical foundations.

Building a Python-Based Adjustment Engine for Indian Equity Data

Once the conceptual distinction between adjusted and unadjusted prices is clear, the next challenge is implementation. In Indian market systems, adjustment logic cannot be an afterthought or a vendor-dependent shortcut. It must be a deterministic, auditable, and reproducible computation layer built directly into the data pipeline. This section focuses on how Python developers should architect a corporate-action-aware adjustment engine that scales across years of historical data and thousands of securities.

Cumulative Adjustment Factors as the Core Abstraction

At the heart of every adjusted price series lies the concept of a cumulative adjustment factor. Rather than adjusting prices action by action in isolation, robust systems compute a rolling factor that captures the compounded effect of all historical corporate actions up to a given date.

This abstraction allows price adjustment to become a simple division operation, regardless of how many actions occurred in the past. It also ensures that adjustments remain consistent across OHLC fields, indicators, and derived metrics.

Cumulative Factor Construction
CumulativeFactor[t] = Π AdjustmentFactor[i] for all actions i after date t
AdjustedPrice[t] = RawPrice[t] / CumulativeFactor[t]

Handling Multiple and Overlapping Corporate Actions

Indian equities frequently experience multiple corporate actions over their lifetime. A single stock may undergo bonuses, splits, dividends, and rights issues within a few years. Adjustment logic must therefore be composable and order-aware.

The correct approach is to sort corporate actions by effective date (ex-date) and apply them backward in time. Forward application corrupts historical continuity and breaks long-term analytics.

Action Sequencing Logic
for action in sorted(actions, key=ex_date, reverse=True):
    cumulative_factor *= action.factor

Adjusting OHLC Prices Without Breaking Candlestick Integrity

Price adjustment must be applied uniformly across Open, High, Low, and Close fields. Adjusting only the close price creates distorted candles that never existed in reality and can silently corrupt downstream analytics.

For multiplicative actions such as splits and bonuses, all OHLC values are divided by the same factor. For subtractive actions such as dividends, consistency must be maintained to avoid inverted or negative ranges.

OHLC Adjustment Pattern
AdjustedOpen  = RawOpen  / Factor
AdjustedHigh  = RawHigh  / Factor
AdjustedLow   = RawLow   / Factor
AdjustedClose = RawClose / Factor

Dividends: Partial Adjustment and Indian Market Nuance

Unlike splits and bonuses, dividends introduce a nuanced decision. Not all dividends are adjusted in standard Indian price series. Typically, only significant or extraordinary dividends are used to adjust historical prices for continuity.

A well-designed system therefore separates dividend events from structural actions and applies configurable thresholds. This flexibility allows the same raw data to support both price-only and total-return analytics.

Dividend Filtering Logic
if dividend_amount / raw_price > threshold:
    apply_dividend_adjustment()

Rights Issues: The Most Error-Prone Adjustment

Rights issues combine dilution, preferential pricing, and optional participation, making them the most complex adjustment to model correctly. The goal is not to simulate investor behavior but to preserve economic equivalence in the historical price series.

This requires computing a theoretical ex-rights price and deriving an adjustment factor that aligns the pre-event series with the post-event reality.

Rights Issue Adjustment Algorithm
ExRightsPrice = (P*B + S*A) / (A + B)
AdjustmentFactor = ExRightsPrice / P

Batch vs On-the-Fly Adjustment Strategies

Adjustment logic can be applied in two primary ways: batch processing or on-the-fly computation. Batch processing precomputes adjusted series nightly or periodically, improving query performance. On-the-fly adjustment computes prices dynamically, ensuring maximum flexibility and correctness.

In Indian markets, where corporate action details can change post-announcement, hybrid systems are often ideal: raw data is immutable, factors are versioned, and adjusted prices are regenerated as needed.

Detecting Data Integrity Issues Using Adjustment-Aware Checks

One of the most powerful benefits of explicit adjustment modeling is the ability to detect data integrity issues. Large overnight gaps that do not correspond to corporate actions often indicate missing data, symbol changes, or exchange anomalies.

By comparing raw and adjusted gap distributions, systems can automatically flag suspicious discontinuities for review.

Gap Validation Logic
gap = (Open[t] - Close[t-1]) / Close[t-1]
if gap > threshold and no_corporate_action:
    flag_anomaly()

Fetch–Store–Measure at Scale

As datasets grow, the Fetch–Store–Measure workflow must scale horizontally. Fetch operations should be idempotent and incremental. Store layers should be normalized and append-only. Measure layers should be reproducible and stateless.

This architecture ensures that even if corporate action metadata is revised months later, the entire adjusted history can be rebuilt without data loss or ambiguity.

Scalable Pipeline Skeleton
fetch_raw_prices_incrementally()
fetch_corporate_actions_incrementally()

store_raw_layer()
store_action_layer()

recompute_adjustment_factors()
generate_adjusted_views()

Medium- and Long-Horizon Impact of Proper Adjustment Engineering

At medium horizons, proper adjustment prevents false momentum breaks and indicator distortions. At long horizons, it becomes the difference between meaningful growth analysis and numerically elegant but economically meaningless charts.

More importantly, explicit adjustment engineering creates trust. Analysts, developers, and stakeholders can trace every number back to raw exchange data and a transparent transformation pipeline.

Preparing for System-Level Design Decisions

With a reliable adjustment engine in place, the system is ready for higher-level architectural decisions: database schema design, data versioning, library selection, and analytical abstractions. These topics form the focus of the final section, where all components are unified into a production-grade Indian market data platform.

System-Level Architecture for Indian Market Price Data

Once adjustment logic is mathematically correct and computationally robust, the final challenge is system design. Indian market data systems must scale across decades, thousands of symbols, and frequent corporate actions while remaining auditable and reproducible. This requires clear separation between raw data, event data, computation layers, and analytical views.

A well-architected system treats adjusted prices not as stored truth but as a deterministic projection derived from immutable inputs. This philosophy ensures that historical data remains trustworthy even when corporate action metadata is revised retroactively.

Designing a Database Schema for Price Integrity

Raw Price Layer

The raw price layer stores exchange-published OHLC data exactly as received. This layer is append-only and time-indexed. No transformations, adjustments, or corrections are applied here. Its purpose is to preserve historical truth and provide a legal and analytical audit trail.

Corporate Action Layer

This layer stores all corporate actions as dated, parameterized events. Each action includes type, ratios, cash components, effective dates, and version metadata. Treating corporate actions as structured data rather than annotations is essential for reproducibility.

Derived Factor Layer

Adjustment factors are computed from corporate action data and stored separately. These factors represent pure mathematics, not market data. Versioning this layer allows full historical recomputation without altering raw inputs.

Analytical View Layer

Adjusted prices, returns, indicators, and charts live in the view layer. These are regenerated on demand or via batch processes. They are never treated as authoritative sources.

Layered Data Flow
Raw Prices  →  Corporate Actions  →  Adjustment Factors  →  Analytical Views

Python Libraries for Indian Market Data Engineering

Core Data Handling Libraries

Python’s data ecosystem enables deterministic adjustment pipelines. Vectorized operations ensure performance, while strong typing and indexing prevent silent errors.

Core Stack
pandas   → Time-series alignment and joins
numpy    → Vectorized factor application
pyarrow  → Columnar storage for large histories
sqlalchemy → Database abstraction

Market-Specific Data Access Libraries

Specialized libraries provide programmatic access to Indian exchange data. These tools are most effective when used only for fetching raw data, not as adjustment authorities.

Market Access Roles
nsepython     → Raw NSE data and corporate actions
jugaad_data   → Reliable EOD price retrieval
yfinance      → Reference adjusted series for validation

Methodologies for Sourcing and Validating Data

Price Data Methodology

Daily prices should be sourced directly from exchange publications. Incremental fetching ensures continuity and reduces the risk of missing sessions due to holidays or trading halts.

Corporate Action Methodology

Corporate actions must be sourced from official announcements and stored with effective dates rather than announcement dates. This distinction is critical for correct adjustment timing.

Validation and Reconciliation

Validation occurs by reconciling raw price gaps against known corporate actions. Any unexplained discontinuity signals missing data, symbol changes, or exchange anomalies.

Validation Pattern
if large_gap and no_matching_action:
    mark_for_review()

Fetch–Store–Measure as an Operating Principle

Fetch

Fetching must be deterministic, incremental, and idempotent. Re-fetching the same date should never create duplicate records or overwrite history.

Store

Storage prioritizes immutability. Corrections are handled through new records and versioning, never destructive updates.

Measure

Measurement layers compute adjusted prices, returns, and analytics using only stored raw data and factors. This guarantees repeatability and transparency.

Operational Loop
fetch → validate → store → compute → analyze

Impact Across Trading and Investment Horizons

Short-Term Trading Systems

Intraday systems rely almost entirely on raw prices. Adjustment logic plays a minimal role but remains essential for overnight continuity checks and symbol lifecycle management.

Medium-Term Analysis

Swing and positional analysis requires adjusted prices to prevent false signals around corporate actions. Without adjustment, indicators misinterpret structural price changes as momentum or reversals.

Long-Term Investing and Research

For long-term analysis, adjusted prices are non-negotiable. Compounding, growth rates, and historical comparisons are meaningless without proper normalization.

Common Failure Modes and How to Avoid Them

Storing Only Adjusted Prices

This destroys auditability and prevents recalculation when corporate action details change.

Mixing Adjusted Prices with Raw Volume

This creates internally inconsistent datasets that invalidate liquidity and price-impact analysis.

Vendor-Dependent Adjustments

Blind reliance on third-party adjusted data obscures methodology and introduces silent bias.

Making the System Beginner-Friendly Without Losing Rigor

A well-designed system exposes clean abstractions to beginners while preserving full mathematical rigor internally. New users work with intuitive adjusted series, while advanced users retain access to raw prices and factors.

This layered exposure model accelerates learning without sacrificing correctness.

The Strategic Advantage of Getting This Right

Correct handling of adjusted and unadjusted prices transforms market data from a fragile dependency into a strategic asset. It enables consistent analytics, trustworthy insights, and scalable systems across products and teams.

For organizations building serious financial infrastructure, this distinction is not optional—it is foundational.

Libraries, Functions, and Techniques Used or Applicable

Libraries

pandas, numpy, pyarrow, sqlalchemy, nsepython, jugaad_data, yfinance

Core Techniques

Backward adjustment, cumulative factor modeling, event-driven recomputation, immutable data storage, layered data views

Database Structure

Raw price tables, corporate action event tables, adjustment factor tables, derived analytical views

Closing Perspective

Adjusted versus unadjusted prices are not competing truths—they are complementary layers of understanding. Systems that respect this duality produce analytics that are both accurate and meaningful.

At TheUniBit, this philosophy underpins how we design Python-based financial systems: transparent, reproducible, and engineered for long-term trust.

Scroll to Top