The Split Adjusted function of the Technical Indicator API is not a technical indicator itself, but rather a utility function. By default, the Open, High, Low and Close values (OHLC) of EOD data are provided in raw values and adjust neither for splits nor for dividends, while “adjusted_close” values are adjusted both to splits and dividends. However, if you need only split-adjusted OHLC, you can use this function to get the desired time series.
Split Adjusted refers to how historical stock prices are portrayed in the event that a company has issued a stock split for its shares in the past. When reviewing price data, whether in tables or on charts, split adjusted data will reflect the increase in price as if there had been no split in the shares. It does this by anchoring the current price and working backwards. This gives the false impression that historical prices may appear lower (or higher) than they actually were at the time. However, it gives a more correct representation of the amount of growth (or decline) those shares have experienced from past until the present day.
Quick jump:
Please note: before continuing to work with our APIs, make sure that you import and install all required libraries. A more detailed information about the Split Adjusted function of the Technical Indicators API you can find on our documentation web-page.
Accessing the EODHD API
To access the EODHD API, we need to create an instance of the “APIClient” class and pass to it our API key. In this example, we will use the demo API key provided by EODHD, but in your real application, you should use your registered API key.
api = APIClient("demo")
Please note that you can also specify the API key in a configuration file or as an environment variable, as described in the library documentation here.
1. Use “demo” API key to test our data from a limited set of the tickers without registering:
AAPL.US | TSLA.US | VTI.US | AMZN.US | BTC-USD | EUR-USD.
Real-Time Data and All of the APIs (except Bulk) are included without limitations on API calls.
2. Register to get your free API key (limitated by 20 API calls per day) with access to:
End-Of-Day Historical Data with only past year for any ticker and List of tickers per Exchange.
3. To unlock your API key we recommend to choose the subscription which covers your needs
Exploring Split Adjusted Data as part of Technical Indicators API
After we are done with the API client, we can start requesting Split Adjusted data from the Technical Indicators API. It is important to remember that a ticker is required.
resp = api.get_technical_indicator_data(ticker = "AAPL.US", function = "splitadjusted")
The API response will be a single JSON structure.
Converting JSON Response to DataFrame
All data in the DataFrame will contain information such as: “high”, “low”, “open”, “close”, and “date” for stock symbol, which was used when we called the API in particular (“AAPL.US”).
split_adjusted = pd.DataFrame(resp)
print(split_adjusted)
Extended parameters of the splitadjusted function from Technical Indicator Data API
For more accurate research, it is possible to use parameters that lays in the Split Adjusted function.
agg_period – it shows aggregation period. Default value – ‘d’. Possible values: d – daily, w – weekly, m – monthly.
split_adjusted_extended = api.get_technical_indicator_data(ticker = "AAPL.US", function = "splitadjusted", agg_period = "d")
The API response is a JSON array containing data for all the requested tickers. You can convert the resulting JSON array to a DataFrame for further analysis:
sa_e = pd.DataFrame(split_adjusted_extended)
print(sa_e)
Conclusion
Split Adjusted data is a valuable tool for anyone analyzing historical stock prices. It ensures your analyses are based on the most accurate data, making it an indispensable part of your stock market toolkit.