ab-logo

Code. Models. Analysis. Decisions.


Introduction to EOD Historical Data API for Python

There are many APIs out there for realtime and historical stock data as well as technical indicators, cryptocurrency and sector analysis. https://eodhistoricaldata.com gives free access to a wide range of data, and even more access at a reasonable price. Data is available from over 70 exchanges worldwide. The API is compatible with any programming language, however they also provide a helper library for Python. Installing the helper library in Python enables a streamlined method for reaching an end point. to download the most commonly used data. However, you can also make general API requests.

EOD Historical Data let's you get up and running quick for free. Just visit their site to register and get your API key. The video below will show you how to use one of their API endpoints to download and transform data.

The free account allows 20 calls per day. If you need more access than that, I have arranged for discounted pricing.

Diversification Using Multiple Securities

People have long known that diversification mitigates risk, not in just finacial markets, but in nearly every aspect of life. But, have you ever wondered how diverisfication works on investments? Do you have a vague idea of how to measure it but find the implementation daunting? This tutorial covers how to quickly and accurately calculate portfolio volitility for any number of securities.The tutorial is useful for anyone trying to understand diversification of risk, and is a must know for any aspiring Professional Risk Manager(PRM).

Easily Calculate Portfolio Volatility (Standard Deviation) Using Python

Finance textbooks demonstrate how to calculate variance of a portfolio with two securities, a fairly complex algorithm meant to demonstrate the idea of diversification, however not very realistic. To maximize the benefit of diversification more securities are needed, making the textbook method of calculation tedious and prone to error. In this tutorial I walk through the calculation of variance and standard deviation, using Python,for a portfolio of as many securities as we want.

EOD Historical Data tutorial notebooks:

Get the notebooks here.

Calculating Portfolio Variance