Skip to content

Instantly share code, notes, and snippets.

@shotahorii
shotahorii / DeepLearningFromScratch_1.ipynb
Last active November 18, 2017 13:31
Codes based on "Deep learning from scratch" by Koki saitoh
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shotahorii
shotahorii / Quandl.ipynb
Last active May 21, 2017 23:04
Getting started with Quandl
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shotahorii
shotahorii / TA-Lib.ipynb
Created May 22, 2017 21:16
Getting started with TA-Lib
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shotahorii
shotahorii / SECdata.ipynb
Last active May 29, 2017 22:43
Fundamental data from SEC
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shotahorii
shotahorii / SECdata_TagSearcher.ipynb
Last active May 29, 2017 23:13
Find tags from keyword and get its documentation in SEC data
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shotahorii
shotahorii / sqlitehandler.py
Last active May 29, 2017 23:58
A python module storing some common functions about sqlite
import sqlite3
import pandas as pd
import functools as ft
class SqliteHandler:
def __init__(self, dbname):
self.dbname = dbname
def df2table(self, tablename, df):
# connect to db
@shotahorii
shotahorii / SECdataLoader.ipynb
Last active May 30, 2017 00:11
Loading SEC data from 30+ tsv files into 3 sqlite tables.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shotahorii
shotahorii / cikTickerConverter.py
Created May 29, 2017 23:40
A python module containing functions that convert cik to ticker & ticker to cik
import re
from requests import get
from bs4 import BeautifulSoup
# this is based on https://gist.github.com/dougvk/8499335
def ticker2cik(ticker):
URL = 'http://www.sec.gov/cgi-bin/browse-edgar?CIK={}&Find=Search&owner=exclude&action=getcompany'
CIK_RE = re.compile(r'\d{10}')
soup = BeautifulSoup(get(URL.format(ticker)).content, "lxml")
@shotahorii
shotahorii / NasdaqCompaniesLoader.ipynb
Created May 30, 2017 00:13
Loading comprehensive company list of Nasdaq, Nyse and Amex to Sqlite
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shotahorii
shotahorii / Ticker_Cik_Lookup.ipynb
Created June 1, 2017 19:54
Create ticker - cik lookup table
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.