This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import pandas as pd | |
import pandas_datareader.data as web | |
import numpy as np | |
import time | |
import asyncio | |
from fake_useragent import UserAgent | |
'''set path variables''' | |
project_dir = "YOUR/PROJECT/DIR" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import numpy as np | |
import re | |
# ================================================ | |
class option_parser: | |
def __init__(self, symbol, response): | |
self.symbol = symbol | |
self.response = response | |
# ------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import aiohttp | |
# ================================================ | |
# for first run only | |
class first_async_scraper: | |
def __init__(self): | |
pass | |
async def _fetch(self, symbol, url, session, headers): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Created on Fri Sep 2 13:26:48 2016 | |
@author: Brian Christopher, CFA [Blackarbs LLC] | |
""" | |
import time | |
import pandas as pd | |
import numpy as np |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Created on Fri Sep 2 13:23:34 2016 | |
@author: Brian Christopher, CFA [Blackarbs LLC] | |
""" | |
import pandas as pd | |
from more_itertools import unique_everseen | |
import requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import time | |
t0 = time.clock() | |
import pandas as pd | |
from pandas.tseries.offsets import BDay | |
import numpy as np | |
import datetime as dt | |
from copy import copy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"metadata": {"language_info": {"mimetype": "text/x-python", "codemirror_mode": {"name": "ipython", "version": 3}, "file_extension": ".py", "name": "python", "pygments_lexer": "ipython3", "version": "3.4.3", "nbconvert_exporter": "python"}, "kernelspec": {"name": "python3", "language": "python", "display_name": "Python 3"}}, "cells": [{"source": "###**BlackArbs LLC Independent Research**", "cell_type": "markdown", "metadata": {}}, {"source": "\n####SPDR ETF Composite Sector Valuation [Saturday 4.11.2015]\n------------\n\nThe following Ipython Notebook examines the **Implied Cost of Capital (ICC)** method of valuation for purposes of trade/portfolio positioning. The goal is to identify asymmetric investing opportunities due to incongruence between *'recent'* historical valuations and forward looking expectations of earnings growth. \n\nI will attempt to accomplish the goal by first examining composite returns based on ETF category groupings. Then I will compare the historical data vs the forward looking **ICC* |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Netfonds import 5 days of intraday data | |
''' | |
import numpy as np | |
import pandas as p | |
from pandas.tseries.offsets import * | |
import datetime as dt | |
import matplotlib.pyplot as plt | |
size = (14,10) |