This file contains hidden or 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 numpy as np | |
import scipy.stats as ss | |
import time,calendar | |
import math | |
from sklearn.decomposition import PCA | |
import statsmodels.api as sm | |
This file contains hidden or 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
package prc.ib; | |
import com.ib.client.ComboLeg; | |
import com.ib.client.Order; | |
import com.ib.client.Execution; | |
public class OrderBuilder { |
This file contains hidden or 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
class Utils(object): | |
months=['','F','G','H','J','K','M','N','Q','U','V','X','Z'] | |
@staticmethod | |
def localsymbol (expiry,right,strike): | |
exp = Utils.months[1+ int(expiry)/100%100 ] | |
s= strike*1000 | |
sym="ON%s2 %s%s" %(exp,right,str(s)[:-2]) | |
return sym |
This file contains hidden or 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 pykka | |
import pykka.gevent | |
import gevent | |
import numpy as np | |
import copy,sys, pprint , blist | |
from collections import defaultdict | |
import logging | |
import signal |
This file contains hidden or 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 pykka | |
import pykka.gevent | |
class Worker(pykka.gevent.GeventActor): | |
def __init__(self, **kwargs): | |
super(Worker, self).__init__() | |
self.inputs = kwargs.get('inputs') | |
def on_receive(self, message): |
This file contains hidden or 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 sys import argv | |
from time import sleep, strftime | |
from ib.ext.Contract import Contract | |
from ib.ext.Order import Order | |
from ib.ext.EWrapper import EWrapper | |
from ib.ext.EClientSocket import EClientSocket |
This file contains hidden or 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 | |
from pandas.io.data import DataReader | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from QuantLib import * | |
import urllib, urllib2,json, re, pylab,dateutil,datetime | |
class OptionCalculator(object): | |
def __init__ (self,**kwargs): |
This file contains hidden or 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 pprint,sys | |
import blaze | |
from odo import odo | |
import pandas as pd | |
import numpy as np | |
from BTrees.OOBTree import OOBTree | |
from tables import * |