• 13th January 2026 - By adventuresofgreg

    When backtesting a trading strategy, the type of historical data you use – raw data or adjusted data – can significantly affect your results. Here’s the difference:

    • Raw Data: Shows actual traded prices, including all price gaps and events like stock splits and dividends. It’s ideal for calculating commissions, cross-sectional analysis, and strategies relying on exact historical prices.
    • Adjusted Data: Modifies historical prices to account for events like splits and dividends, creating a seamless price series. It works well for calculating total returns and ensuring technical indicators are reliable.

    Key Takeaways:

    • Raw Data reflects real market conditions but can mislead long-term analyses due to price discontinuities.
    • Adjusted Data smooths prices for consistency but risks introducing look-ahead bias by retroactively factoring in future events.

    For accurate backtesting, consider combining both data types: use adjusted data for signal generation and trend analysis, and raw data for execution, position sizing, and cost calculations. This dual approach minimizes distortions and ensures reliable strategy evaluation.

    CME Futures Charts – Back-Adjusted vs Non-Adjusted

    CME

    What is Raw Data in Backtesting?

    Raw data, often called unadjusted data, represents the actual market prices at which securities traded at specific points in history. It captures real market conditions, including all price gaps, stock splits, and dividend events, without any modifications or adjustments.

    When you look at raw data, you’re seeing prices exactly as they appeared on the exchange. For instance, if a stock closed at $150.00 on Tuesday and opened at $75.00 on Wednesday due to a 2-for-1 split, the raw data would reflect this sharp drop. It provides an unaltered view of market behavior.

    Characteristics of Raw Data

    Raw data is marked by noticeable price discontinuities – sudden jumps or gaps caused by corporate actions like stock splits, dividend payouts, or reverse splits. These events can result in significant price changes, even though the company’s overall market value remains the same.

    The defining trait of raw data is its accuracy in reflecting historical prices. As Palmarium AI explains:

    Unadjusted data reflects the raw price that it was seen at a given moment

    This means raw data aligns with the actual entry and exit prices recorded in a broker’s ledger at the time of the transaction.

    Benefits of Using Raw Data

    Raw data is crucial for calculating commissions accurately. Since brokers typically charge fees per share (ranging from $0.0005 to $0.0035), having precise raw data ensures accurate cost assessments. It’s also valuable for cross-sectional analysis, such as ranking stocks by price on a specific day, because it reflects the prices traders observed in real time.

    Problems with Using Raw Data

    One of the main challenges of raw data is handling artificial price gaps caused by corporate actions. Without adjustments for events like splits or dividends, backtests might produce misleading results, such as triggering stop-loss orders on gaps that don’t reflect actual market movements.

    Raw data also complicates the calculation of long-term returns and technical indicators like moving averages. Many indicators rely on a continuous price sequence, and disruptions like stock splits can distort metrics such as a 200-day moving average.

    These challenges highlight the need for adjusted data, which smooths historical prices to create a more consistent price series.

    What is Adjusted Data in Backtesting?

    Adjusted data modifies historical prices to account for corporate actions like stock splits, reverse splits, and dividends. This creates a seamless, continuous price series that reflects total returns by removing artificial gaps in the data.

    This adjustment is crucial for calculating long-term performance and ensuring technical indicators are reliable. As Riaz Arbi explains:

    "The adjusted price time series represents the total return of a stock up until the most recent observation. The raw price time series represents the price for which a stock was traded on a particular day."

    How Adjusted Data is Created

    The creation of adjusted data typically involves a method called backward ratio adjustment, which is used by organizations like the Center for Research in Security Prices (CRSP). This method starts with the most recent trading day as an anchor (with an adjustment factor of 1) and works backward through the historical data.

    When a corporate action occurs, an adjustment factor is calculated. For example, in a 4:1 stock split, the adjustment factor is 0.25. Historical prices are multiplied by this factor, and volumes are adjusted accordingly. Another method, forward ratio adjustment, anchors the series to the earliest available date and adjusts prices upward after corporate actions take place.

    Benefits of Using Adjusted Data

    Using adjusted data is critical for calculating accurate total returns over extended periods. For instance, from January 1980 to December 2012, the S&P 500’s raw price changes reflected a 1,221% increase. However, when dividends were included, the total return soared to 3,264%.

    Technical indicators, such as moving averages, RSI, and momentum oscillators, also perform more reliably with adjusted data. These indicators depend on a continuous price sequence, and without adjustments, events like a 2:1 stock split could falsely appear as a 50% overnight price drop, potentially triggering incorrect sell signals during backtesting. Adjusted data also simplifies trend analysis by smoothing out sharp price changes caused by splits, making it easier to identify genuine market movements.

    Problems with Adjusted Data

    Despite its advantages, adjusted data has some notable downsides, including look-ahead bias, especially with backward adjustments. This happens because future dividend payments retroactively alter past adjusted prices, introducing information that wasn’t available at the time of trading. For example, the backward-adjusted closing price of SPY on January 4, 2021, was recorded as $362.78 in May 2022. After a dividend payment in June 2022, that historical price was revised to $361.22. As Portfolio Optimizer explains:

    "Backward prices adjustment introduces a look-ahead bias because the backward-adjusted price on any given past date depends on all future events with price impact."

    Adjusted data can also distort price levels, which can undermine strategies relying on specific price points. For instance, on an unadjusted monthly chart, SPY formed a clear double top with peaks near $155 in both 2000 and 2007. On a dividend-adjusted chart, those peaks were compressed to around $114 and $142, respectively, erasing the double top pattern.

    Another issue is that adjusted data can lead to inaccurate trading commission calculations. Brokers like Interactive Brokers charge fees based on the number of shares traded, typically between $0.0005 and $0.0035 per share. Adjusted data distorts share quantities, leading to imprecise cost estimations.

    Key Differences Between Raw and Adjusted Data

    Raw vs Adjusted Data in Backtesting: Key Differences Comparison

    Raw vs Adjusted Data in Backtesting: Key Differences Comparison

    Raw and adjusted data play distinct roles in backtesting financial strategies. Raw data represents the actual historical prices at which an asset traded, including all price gaps and discontinuities caused by events like stock splits and dividend payments. On the other hand, adjusted data retroactively modifies historical prices to account for these corporate actions, ensuring the market value of a position remains consistent as if it were held continuously. Most data vendors use backward adjustments, but this approach can introduce look-ahead bias.

    This bias occurs because historical prices are altered whenever future events take place, effectively incorporating information that traders at the time could not have known. As Portfolio Optimizer notes:

    "Backward prices adjustment introduces a look-ahead bias because the backward-adjusted price on any given past date depends on all future events with price impact."

    Adjusted data can also distort technical analysis. For instance, historical price patterns may be compressed, making critical formations like a "double top" disappear in adjusted datasets as older peaks are shifted downward relative to newer ones. Additionally, share quantity calculations can become inaccurate. For stocks with multiple reverse splits, the adjusted share quantities often differ significantly from the actual shares traded.

    The table below provides a side-by-side comparison of raw and adjusted data for easy reference.

    Comparison Table: Raw vs. Adjusted Data

    Metric Raw (Unadjusted) Data Adjusted Data
    Price Continuity Discontinuous (gaps at splits/dividends) Smooth (retroactively modified)
    Indicator Accuracy Better for price-level patterns (e.g., double tops) Better for returns and momentum factors
    Slippage/Costs Accurate for share-based commissions Can distort share counts and costs
    Dividend Handling Ignored in price (appears as a drop) Reinvested/added back into price
    Backtesting Suitability Execution, slippage, and cross-sectional filters Total return and trend-following strategies
    Look-ahead Bias None Present in backward-adjusted series
    Volume Actual shares traded Adjusted by split/dividend factor

    How Data Type Affects Backtesting Accuracy

    The type of data you use – raw or adjusted – can significantly influence how accurately backtesting reflects real-world trading scenarios. Adjusted data often distorts strategy profitability because it alters historical price levels, which can change when trades would have been triggered. A clear example of this occurred in June 2015 during a backtest of a 5-30 day moving average crossover strategy on the SPY ETF. Using adjusted data, a trade entered on June 23 and exited on June 30 resulted in a 2.30% loss. However, with unadjusted data, the system signaled an earlier exit on June 26, reducing the loss to 0.87%. This discrepancy, driven by dividend adjustments, highlights how adjusted data can retroactively shift trade signals and impact backtesting results.

    Position sizing and commission calculations are also affected by adjusted data. Take Apple Inc. (AAPL) in early 2008 as an example. For a $10,000 position, adjusted data would suggest buying over 1,000 shares (price <$10), while unadjusted data would reflect less than 100 shares (price >$100). Since commission fees at Interactive Brokers Pro range from $0.0005 to $0.0035 per share, using adjusted data could lead to inaccurate transaction cost estimates. Palmarium AI advises:

    "When trading commission costs depend on share quantity, this amount should be computed using unadjusted time series since this reflects the real quantity bought or sold at any given time."

    These distortions create biases that compromise the reliability of strategy evaluations.

    Bias and Limitations in Backtesting

    Corporate actions like dividends and stock splits introduce further complications. Every time a company pays a dividend or executes a split, historical prices are retroactively modified. This means that the same backtest run today could yield different results compared to one run six months ago for the same period. Parikshit Bhinde captures the issue well:

    "To backtest on adjusted close prices implies measuring profitability of trades in the past that would have actually not been triggered… by the strategy."

    Raw data, however, is not without its challenges. For instance, in August 2020, Apple executed a 4-for-1 stock split. A backtest using unadjusted prices would show a misleading 75% overnight drop in value, potentially triggering false sell signals. Similarly, when using split-adjusted data, a trading system that relied on a 2-point profit target and stop-loss transformed from a short-term strategy into a trend-following one, cutting trades from 43 to just 3. Fixed-dollar stops lose relevance when price levels are altered by adjustments.

    Combining Raw and Adjusted Data

    To address these issues, a dual-data approach offers the best balance. Using both raw and adjusted data for different purposes minimizes biases and inaccuracies. Adjusted data is ideal for generating signals and calculating momentum, as it helps maintain continuity in time-series analysis by avoiding artificial price jumps. On the other hand, raw data is better suited for trade execution, position sizing, and commission calculations, ensuring the backtest reflects actual share quantities and fills.

    For strategies that compare multiple stocks at a specific point in time, raw data is essential. Adjusted data can distort the relative price rankings of assets. For example, Stock A might appear more expensive than Stock B in 2010 due to future adjustments, even though the opposite was true in real-time. This look-ahead bias can invalidate strategies that depend on relative value or price-based filters. By combining raw and adjusted data thoughtfully, traders can achieve a more accurate and reliable backtesting process.

    Best Practices for Data Selection in MillionMachine

    MillionMachine

    Using MillionMachine’s Data Features

    Choosing the right data is key to maintaining accuracy in backtesting. MillionMachine equips users with tools to work with both raw and adjusted data, allowing you to align your backtests with your strategy’s exit logic. The type of data you use should depend on your exit strategy. For example:

    • If you’re using percent-based exits – like a 10% stop-loss – either raw or adjusted data will yield consistent results. This is because percentage changes remain the same regardless of adjustments.
    • For point-based exits, such as a 2-point target, raw data is better. Adjusted data can distort historical price levels, potentially triggering stops at prices that didn’t actually occur.

    When verifying commission costs, stick to raw data and use rule-based charts to ensure that signals are based on actual market movements. For multi-stock comparisons, raw data is essential to avoid look-ahead bias caused by future dividend adjustments. On the other hand, adjusted data works well for momentum calculations and return analysis since it maintains continuity through corporate actions.

    To strengthen your strategy, take advantage of MillionMachine’s overfitting and Monte Carlo testing features to assess performance across different datasets.

    Running Overfitting Tests with MillionMachine

    MillionMachine’s Monte Carlo simulations and overfitting tests are powerful tools to determine if your strategy is truly effective across different data types. Run your backtests on both raw and adjusted data and compare the outcomes. If the results vary significantly, it’s a sign your strategy might be picking up noise rather than a real market edge.

    The platform also provides optimization tools to help avoid data-mining bias by testing thousands of parameter combinations. As Michael Harris explains:

    Traders should use backtesting only when there is a good idea to test… the objective should be to try to debunk it, not prove that it is good by adding more filters and conditions

    Use overfitting tests to evaluate your strategy’s resilience against dividend drift and split adjustments. Consistent performance across both raw and adjusted data indicates a robust strategy that reflects actual market conditions.


    MillionMachine.com is designed as a research, education, and strategy development tool. It does not provide personalized investment advice, trading recommendations, or financial guidance. The platform is not a solicitation to buy or sell any financial instrument.

    Users are fully responsible for their trading decisions and the risks they take. All simulations, backtests, and performance metrics generated by MillionMachine are hypothetical and not guarantees of future results. Hypothetical performance comes with inherent limitations and does not reflect actual trading outcomes. Real trading results may differ significantly.

    MillionMachine is not registered as a Commodity Trading Advisor (CTA), Investment Advisor, or Broker-Dealer with any regulatory authority, including the NFA, CFTC, or SEC. While the founder was previously registered as a CTA with the National Futures Association (NFA), that registration is no longer active, and MillionMachine does not engage in regulated advisory activities.

    The platform does not execute trades, manage customer funds, or provide access to live trading accounts. Any integration with broker APIs is purely for user-initiated automation, and users are solely responsible for ensuring compliance with applicable laws, regulations, and broker requirements.

    All market data, charts, signals, and analytics provided by MillionMachine are for informational and educational purposes only. The platform does not guarantee the accuracy or completeness of the data and assumes no liability for errors, delays, or omissions.

    Trading financial instruments – including stocks, futures, cryptocurrencies, and derivatives – carries significant risk and may not be suitable for everyone. You could lose more than your initial investment. Past performance, whether actual or simulated, is not indicative of future results.

    Conclusion: Choosing the Right Data for Backtesting

    As we’ve seen, selecting the right type of data is crucial for accurate backtesting. Your choice should align with the specific needs of your trading strategy. For strategies like calculating total returns or momentum-based approaches that rely on percentage changes, adjusted data is your best bet. It accounts for dividends and stock splits, ensuring consistent price continuity. On the other hand, if your strategy involves point-based stops, per-share commission calculations, or fixed-time price comparisons, raw data is indispensable. Raw data preserves original price levels, avoiding distortions that could throw off cost simulations and trade accuracy. MillionMachine’s flexible data options can help you tailor these choices to your trading objectives.

    This decision isn’t just theoretical – it directly impacts trade execution and cost calculations. Using the wrong data type can lead to misleading results. That’s why validating your strategy across both data types is essential for building a reliable and effective approach.

    MillionMachine supports both raw and adjusted data, offering tools like overfitting analysis and Monte Carlo simulations to test strategies under various scenarios. By understanding the strengths and limitations of each data type and thoroughly testing your strategies, you can ensure they reflect real-world market conditions rather than artificial adjustments.


    MillionMachine.com is designed as a research and strategy development tool for educational purposes only. Nothing on the platform or website should be taken as personalized investment, trading, or financial advice. MillionMachine does not make recommendations or offer guidance on the suitability of any strategy, trade, or investment.

    Users are fully responsible for evaluating their own trading decisions and risks. Simulations, backtests, and performance metrics generated by MillionMachine are hypothetical and do not guarantee future results. Hypothetical performance has inherent limitations and may differ significantly from actual trading outcomes.

    MillionMachine is not registered as a Commodity Trading Advisor (CTA), Investment Advisor, or Broker-Dealer with the NFA, CFTC, SEC, or any other regulatory body. While the founder was previously registered as a CTA with the National Futures Association (NFA), that registration is no longer active. MillionMachine does not conduct any regulated advisory activities.

    The platform does not execute trades, manage customer funds, or provide access to live trading accounts. Any integration with broker APIs is solely for user-initiated automation, with users retaining full responsibility for ensuring their trading complies with applicable laws, regulations, and broker requirements.

    All market data, charts, signals, and analytics provided by MillionMachine are for informational and educational purposes only. The platform does not verify the accuracy or completeness of market data and is not liable for errors, delays, or omissions.

    Trading financial instruments – including stocks, futures, cryptocurrencies, and derivatives – carries significant risk and may not be suitable for everyone. It’s possible to lose more than your initial investment. Past performance, whether actual or simulated, is not a reliable indicator of future results.

    FAQs

    What impact does using raw data have on backtesting results?

    When backtesting trading strategies, relying on raw (unadjusted) price data can lead to distorted or misleading outcomes. Why? Raw data doesn’t account for corporate actions such as stock splits, dividends, or mergers. These events can cause abrupt price changes that don’t reflect actual market movements, skewing performance metrics and creating unrealistic expectations.

    To get a more accurate view, many traders turn to adjusted data. This type of data incorporates the impact of corporate actions, ensuring price movements align more closely with reality. By using adjusted data, traders can better evaluate how their strategies might fare under real-world conditions.

    What are the potential risks of using adjusted data in backtesting?

    Using adjusted data in backtesting can introduce challenges that may compromise the reliability of your results. Adjustments for events like dividends, stock splits, or other corporate actions modify historical price data, which can lead to look-ahead bias. This occurs when a backtest incorporates information that wouldn’t have been available at the time, resulting in overly optimistic performance metrics and unrealistic assessments of risk.

    Another issue with adjusted data is that it can mask gaps, errors, or inconsistencies in the original price feed. If the adjustment process is flawed, it may distort the historical data, giving an inaccurate picture of how a strategy would perform. Moreover, relying too heavily on adjusted data can encourage overfitting, where the smoothed price series highlights patterns that don’t exist in real-world markets. This can result in strategies that perform poorly when applied in live trading.

    To address these concerns, many experts recommend using a combination of adjusted and raw data. Adjusted data can be useful for calculating returns and accounting for corporate actions, while raw data is better suited for generating signals and simulating trade execution. This approach helps preserve the integrity of historical data while ensuring a more realistic performance analysis.


    MillionMachine.com is a platform designed for research, education, and strategy development. Nothing on this website or within the MillionMachine platform should be interpreted as personalized investment advice, trading advice, financial advice, or a solicitation to buy or sell any financial instrument. MillionMachine does not provide recommendations or guidance on the suitability of any trading strategy, investment, or trade.

    Users are fully responsible for evaluating their own trading decisions and associated risks. All simulations, backtests, performance metrics, and analytics generated by MillionMachine are hypothetical and are not guarantees of future performance. Hypothetical results have inherent limitations and do not reflect actual trading. Real-world results may vary significantly from simulated outcomes.

    MillionMachine is not registered as a Commodity Trading Advisor (CTA), Investment Advisor, or Broker-Dealer with the NFA, CFTC, SEC, or any other regulatory body. While the founder was previously registered as a CTA with the National Futures Association (NFA), that registration is no longer active, and MillionMachine does not engage in any regulated advisory activities.

    The platform does not execute trades, handle customer funds, or provide access to real-time trading accounts. Any integrations with broker APIs are for user-initiated and user-controlled automation only. Users are solely responsible for ensuring their trading activities comply with all applicable laws, regulations, and broker requirements.

    All market data, charts, signals, and analytics displayed by MillionMachine are provided strictly for informational and educational purposes. MillionMachine does not verify the accuracy or completeness of market data and assumes no responsibility for errors, delays, or omissions.

    Trading financial instruments – including futures, stocks, cryptocurrencies, and derivatives – carries significant risks and may not be suitable for all investors. Losses can exceed the initial investment. Past performance, whether actual or simulated, is not indicative of future outcomes.

    By using MillionMachine.com, you acknowledge and agree that you are solely responsible for your investment decisions. MillionMachine, its creators, and affiliates are not liable for any losses, damages, or trading outcomes resulting from your use of the platform.

    What are the benefits of using both raw and adjusted data in backtesting?

    Raw data represents the actual prices quoted in the market, reflecting the exact values at which trades could have been executed on specific days. Adjusted data, however, incorporates factors like dividends and stock splits, offering a refined view that accounts for the total return of holding an asset over time.

    Using both types of data together can lead to more accurate backtests. Raw data provides a realistic foundation for trade execution by relying on actual market prices. Adjusted data, meanwhile, helps evaluate performance on a total-return basis. This combination minimizes errors from ignoring splits or dividends, avoids look-ahead bias, and delivers a clearer understanding of a strategy’s profitability. Together, they create a balanced framework for assessing and validating trading strategies.


    MillionMachine.com is a platform designed for research, education, and strategy development. It is not intended to provide personalized investment, trading, or financial advice, nor does it serve as a solicitation to buy or sell financial instruments. MillionMachine does not offer recommendations or guidance on the suitability of any specific strategy, trade, or investment.

    Users of MillionMachine are entirely responsible for evaluating their own trading decisions and the risks involved. All simulations, backtests, performance metrics, and analytics generated by the platform are hypothetical in nature and should not be considered guarantees of future performance. Hypothetical results come with inherent limitations and do not reflect actual trading outcomes, which may differ significantly.

    MillionMachine is not registered as a Commodity Trading Advisor (CTA), Investment Advisor, or Broker-Dealer with any regulatory body, including the NFA, CFTC, or SEC. Although the founder was previously registered as a CTA with the National Futures Association (NFA), that registration is no longer active, and MillionMachine does not engage in any regulated advisory activities.

    The platform does not execute trades, manage customer funds, or provide access to real-time trading accounts. Any integration with broker APIs is strictly for user-initiated and user-controlled automation. Users are fully responsible for ensuring their trading activities comply with relevant laws, regulations, and broker requirements.

    All market data, charts, derived signals, and analytics displayed by MillionMachine are provided strictly for informational and educational purposes. MillionMachine does not verify the accuracy or completeness of market data and assumes no responsibility for any errors, delays, or omissions.

    Trading financial instruments – including futures, stocks, cryptocurrencies, and derivatives – carries substantial risk and may not be suitable for all investors. It is possible to lose more than your initial investment. Past performance, whether actual or simulated, is not indicative of future results.

    By using MillionMachine.com, you acknowledge and accept full responsibility for your investment decisions. MillionMachine, its creators, and affiliates are not liable for any losses, damages, or trading outcomes resulting from the use of the platform.

    Related Blog Posts

  • Leave a Reply


css.php