Skip to content
All library documents

Mapping Interactive Brokers Historical Close Data to Yahoo Finance

Article Quant Q&A · Author: Nyxynyx

Summary

The note explains which Interactive Brokers TWS historical data types to request when matching Yahoo Finance close fields. For a close adjusted for both stock splits and dividends, it recommends requesting ADJUSTED_LAST and using the returned Close field. For a close adjusted for splits but not dividends, it recommends TRADES and the Close field.

The distinction matters when comparing historical price series or calculating returns: the two data types apply different corporate-action adjustments. The answer cites a TWS manual description and notes that ADJUSTED_LAST requires TWS version 967 or later. It does not discuss other historical bar settings, time zones, or differences in adjustment policies between data providers, so exact series alignment may require additional checks.

Key ideas

  • Use ADJUSTED_LAST and its Close field for data adjusted for splits and dividends.
  • Use TRADES and its Close field for data adjusted for splits but not dividends.
  • The data type determines which corporate actions are reflected in the historical close series.
  • The cited guidance states that ADJUSTED_LAST requires TWS 967 or later.

Tags

Full text
# Close and Adjusted Close in Interactive Brokers API and Yahoo Finance


# Close and Adjusted Close in Interactive Brokers API and Yahoo Finance












On Interactive Broker's TWS API manual, there are several historical data types to choose from.

Which IB TWS data type's `Close` value corresponds to

- Close

- Adjusted Close

in Yahoo Finance?

## Answer by Brian from QuantRocket (score 2)

https://quant.stackexchange.com/a/36757

On the page you link:

> TRADES data is adjusted for splits, but not dividends ADJUSTED_LAST data is adjusted for splits and dividends. Requires TWS 967+.

So to get adjusted close, request `ADJUSTED_LAST` and use the Close field. To get the unadjusted close, request `TRADES` and use the Close field.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

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