Kevin Crotty
7 tables (preview of each)
Insider holdings and transactions (preview)
3 tables of quarterly data from Form 13F (preview of each)
5 tables (preview of each)
5 tables (preview of each)
quandl.get_table()
We can pull data from Quandl using quandl.get_table()
.
By default, pulls are limited to 10,000 records.
# Pull indicators file
df = quandl.get_table('SHARADAR/INDICATORS')
# Pull insider trades for single ticker
df = quandl.get_table('SHARADAR/SF2', ticker='AAPL')
# Pull prices for single ticker
df = quandl.get_table('SHARADAR/SEP', ticker='AAPL')
df.sort_values('date')
# Multiple tickers
df=quandl.get_table('SHARADAR/SF2',ticker=['IBM','AAPL'])
# As of a date
df = quandl.get_table('SHARADAR/SF1', ticker='AAPL',
calendardate='2015-12-31')
# After a date
df = quandl.get_table('SHARADAR/SF1', ticker='AAPL',
calendardate={'gte':'2015-12-31'})
# Between dates
df = quandl.get_table('SHARADAR/SF1', ticker='AAPL',
calendardate={'gte':'2015-12-31', 'lte':'2017-12-31'})
col_list = ['ticker', 'filingdate', 'transactiondate', 'formtype', 'issuername', 'ownername','officertitle', 'securityadcode', 'transactionshares', 'transactionpricepershare']
df = quandl.get_table('SHARADAR/SF2',
qopts={'columns':col_list},
filingdate={'gte': '2015-12-31', 'lte': '2017-12-31'},
ticker='AAPL')
# events by ticker
df = quandl.get_table('SHARADAR/EVENTS', ticker=['IBM','AAPL','TSLA'])
# events by date
df = quandl.get_table('SHARADAR/EVENTS',
date={'gte':'2022-01-01'},
ticker=['IBM','AAPL','TSLA'])
# List of events
df=quandl.get_table('SHARADAR/INDICATORS', table='EVENTCODES')
# 13D events
df = quandl.get_table('SHARADAR/EVENTS', ticker=['IBM','GME','TSLA','BBBY'])
df['activist']=(df.eventcodes.str.find('35')>=0)
df[df.activist==True]
quandl.get_table()
By default, get_table
is limited to 10,000 rows
from zipfile import ZipFile
table = "SF2"
with ZipFile('./SHARADAR_'+table+'.zip', 'r') as zipObj:
name = zipObj.namelist()[0]
zipObj.extractall()
df = pd.read_csv(name, low_memory=False)
df = df.rename(columns={"table": "table_"})