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
from flask import Flask, render_template | |
app = Flask(__name__) | |
@app.route('/') | |
@app.route('/index') | |
def index(chartID = 'chart_ID', chart_type = 'bar', chart_height = 350): | |
chart = {"renderTo": chartID, "type": chart_type, "height": chart_height,} | |
series = [{"name": 'Label1', "data": [1,2,3]}, {"name": 'Label2', "data": [4, 5, 6]}] | |
title = {"text": 'My Title'} |
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 sys | |
!conda install --yes --prefix {sys.prefix} -c anaconda beautifulsoup4 |
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
# standard library | |
import os | |
# dash libs | |
import dash | |
from dash.dependencies import Input, Output | |
import dash_core_components as dcc | |
import dash_html_components as html | |
import plotly.figure_factory as ff | |
import plotly.graph_objs as go |
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
from __future__ import print_function | |
!pip install git+https://github.com/scubamut/fintools.git | |
!pip install cvxopt | |
!pip install pyfolio | |
!pip install ffn | |
!pip install itable | |
!pip install git+https://github.com/pydata/pandas-datareader.git |
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
# HOW TO PRINT BUNDLE SYMBOLS | |
import os | |
from pandas import Timestamp | |
from zipline.data.bundles import load | |
now = Timestamp.utcnow() | |
bundle = load('US_stock_bundle', os.environ, now) | |
symbols = set(str(asset.symbol) | |
for asset in bundle.asset_finder.retrieve_all( |
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
""" | |
This is a template algorithm on Quantopian for you to adapt and fill in. | |
""" | |
import pandas as pd | |
import numpy as np | |
def initialize(context): | |
""" | |
Called once at the start of the algorithm. | |
""" |
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
# https://www.quantopian.com/posts/introducing-the-pipeline-api | |
""" | |
This example comes from a request in the forums. | |
The post can be found here: https://www.quantopian.com/posts/ranking-system-based-on-trading-volume-slash-shares-outstanding | |
The request was: | |
I am stuck trying to build a stock ranking system with two signals: | |
1. Trading Volume/Shares Outstanding. |
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 research | |
from quantopian.research import run_pipeline | |
# import pipeline methods | |
# from quantopian.algorithm import attach_pipeline, pipeline_output | |
from quantopian.pipeline import Pipeline, CustomFilter | |
# Fundamantals | |
from quantopian.pipeline.data import Fundamentals | |
from quantopian.pipeline.data import morningstar |
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 research | |
from quantopian.research import run_pipeline | |
# import pipeline methods | |
# from quantopian.algorithm import attach_pipeline, pipeline_output | |
from quantopian.pipeline import Pipeline, CustomFilter | |
# Fundamantals | |
from quantopian.pipeline.data import Fundamentals | |
from quantopian.pipeline.data import morningstar |
OlderNewer