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
[[source]] | |
url = "https://pypi.org/simple" | |
verify_ssl = true | |
name = "pypi" | |
[packages] | |
pipeline-live = "" | |
ipython = "*" | |
ta-lib = "*" |
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
var PositionRowStart = 17; | |
function _request(path, params) { | |
var headers = { | |
"APCA-API-KEY-ID": "*** API key ID ***", | |
"APCA-API-SECRET-KEY": "*** API secret key", | |
}; | |
var endpoint = "https://api.alpaca.markets"; |
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 backtrader as bt | |
import alpaca_backtrader_api | |
import pandas as pd | |
class SmaCross(bt.SignalStrategy): | |
def __init__(self): | |
sma1, sma2 = bt.ind.SMA(period=10), bt.ind.SMA(period=30) | |
crossover = bt.ind.CrossOver(sma1, sma2) | |
self.signal_add(bt.SIGNAL_LONG, crossover) |
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 pylivetrader.api import ( | |
attach_pipeline, | |
date_rules, | |
time_rules, | |
order, | |
get_open_orders, | |
cancel_order, | |
pipeline_output, | |
schedule_function, | |
) |
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
[[source]] | |
url = "https://pypi.org/simple" | |
verify_ssl = true | |
name = "pypi" | |
[packages] | |
requests = "*" | |
BeautifulSoup4 = "*" | |
IPython = "*" | |
pandas = "*" |
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
using System; | |
using System.Configuration; | |
using Alpaca.Markets; | |
namespace example | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
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
shares | price | dollar | ||
---|---|---|---|---|
AAPL | 2.0 | 190.9403 | 381.8806 | |
MSFT | 3.0 | 107.556 | 322.668 | |
FB | 1.0 | 210.91 | 210.91 | |
JPM | 1.0 | 113.35 | 113.35 | |
JNJ | 1.0 | 126.63 | 126.63 | |
XOM | 1.0 | 80.569 | 80.569 | |
BAC | 3.0 | 30.75 | 92.25 | |
WFC | 1.0 | 57.5786 | 57.5786 |
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
epoch | replicated | original | |
---|---|---|---|
2018-07-23 00:00:00-04:00 | 0.0 | 0.0 | |
2018-07-24 00:00:00-04:00 | 0.004842152599199184 | 0.005032119914346984 | |
2018-07-25 00:00:00-04:00 | 0.014004961318249324 | 0.013597430406852257 | |
2018-07-26 00:00:00-04:00 | 0.010925193556577603 | 0.011206281227694456 | |
2018-07-27 00:00:00-04:00 | 0.004277340381589269 | 0.004354032833690319 | |
2018-07-30 00:00:00-04:00 | -0.0014288588707714984 | -0.0008922198429693077 | |
2018-07-31 00:00:00-04:00 | 0.0034754019979314626 | 0.004032833690221255 | |
2018-08-01 00:00:00-04:00 | 0.0024404618505173285 | 0.0023554603854390615 | |
2018-08-02 00:00:00-04:00 | 0.007497095460409252 | 0.007815845824411126 |
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 iexfinance | |
import pandas as pd | |
def iex_charts(symbols): | |
partlen = 99 | |
result = {} | |
for i in range(0, len(symbols), partlen): | |
charts = iexfinance.Stock(symbols[i:i+partlen]).get_chart(range='1m') | |
if type(charts) == list: | |
charts = {symbols[i]: charts} |
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 | |
''' | |
brew install phantomjs | |
or | |
brew tap homebrew/cask | |
brew cask install chromedriver | |
''' | |
# from selenium import webdriver | |
from selenium.webdriver.chrome.webdriver import WebDriver |
NewerOlder