Quandl: Overnight LIBOR

In this notebook, we'll take a look at data set available on Quantopian. This dataset spans from 2001 through the current day. It contains the value for the London Interbank Borrowing Rate (LIBOR). We access this data via the API provided by Quandl. More details on this dataset can be found on Quandl's website.

Blaze

Before we dig into the data, we want to tell you about how you generally access Quantopian partner data sets. These datasets are available using the Blaze library. Blaze provides the Quantopian user with a convenient interface to access very large datasets.

Some of these sets (though not this one) are many millions of records. Bringing that data directly into Quantopian Research directly just is not viable. So Blaze allows us to provide a simple querying interface and shift the burden over to the server side.

To learn more about using Blaze and generally accessing Quantopian partner data, clone this tutorial notebook.

With preamble in place, let's get started:


In [1]:
# import the dataset
from quantopian.interactive.data.quandl import fred_usdontd156n as libor
# Since this data is public domain and provided by Quandl for free, there is no _free version of this
# data set, as found in the premium sets. This import gets you the entirety of this data set.

# import data operations
from odo import odo
# import other libraries we will use
import pandas as pd
import matplotlib.pyplot as plt

In [2]:
libor.sort('asof_date')


Out[2]:
asof_date value timestamp
0 2001-01-02 6.65125 2001-01-02
1 2001-01-03 6.65375 2001-01-03
2 2001-01-04 6.09625 2001-01-04
3 2001-01-05 6.01625 2001-01-05
4 2001-01-08 6.01500 2001-01-08
5 2001-01-09 6.01125 2001-01-09
6 2001-01-10 6.01500 2001-01-10
7 2001-01-11 6.03750 2001-01-11
8 2001-01-12 6.02500 2001-01-12
9 2001-01-16 6.17625 2001-01-16
10 2001-01-17 6.05125 2001-01-17

The data goes all the way back to 2001 and is updated daily.

Blaze provides us with the first 10 rows of the data for display. Just to confirm, let's just count the number of rows in the Blaze expression:


In [3]:
libor.count()


Out[3]:
3668

Let's go plot it for fun. This data set is definitely small enough to just put right into a Pandas DataFrame


In [4]:
libor_df = odo(libor, pd.DataFrame)

libor_df.plot(x='asof_date', y='value')
plt.xlabel("As Of Date (asof_date)")
plt.ylabel("LIBOR")
plt.title("London Interbank Offered Rate")
plt.legend().set_visible(False)