Skip to content

Instantly share code, notes, and snippets.

View yhilpisch's full-sized avatar

Yves Hilpisch yhilpisch

View GitHub Profile
@yhilpisch
yhilpisch / big_tstables.py
Last active February 2, 2023 15:33
Python file to test TsTables Performance
#
# TsTables -- High Frequency Times Series Data with PyTables
#
# to install -- pip install tstables
# Github repo -- https://github.com/afiedler/tstables
#
# Dr. Yves J. Hilpisch
#
# The Python Quants GmbH
# http://quant-platform.com
@yhilpisch
yhilpisch / client.py
Created September 19, 2016 16:30
ZeroMQ Server and Client
import zmq
context = zmq.Context()
socket = context.socket(zmq.SUB)
socket.connect('tcp://0.0.0.0:8888')
socket.setsockopt_string(zmq.SUBSCRIBE, u'value')
while True:
data = socket.recv_string()
print(data)
@yhilpisch
yhilpisch / jupyter_notebook_config.py
Created September 19, 2016 20:06
Jupyter Server Meetup
c.NotebookApp.certfile='/cert.pem'
c.NotebookApp.keyfile='/cert.key'
c.NotebookApp.password='sha1:768ce7b87bf6:fa6013a02f7053bc014ef7c65be0ef34f77f21fd'
c.NotebookApp.ip='*'
c.NotebookApp.port=8888
c.NotebookApp.open_browser=False
#
# Backtesting Algo Strategies based on
# Logistic Regression with scikit-learn
#
# Yves Hilpisch
# ODSC London 2016
# The Python Quants GmbH
#
import numpy as np
@yhilpisch
yhilpisch / StrategyOptimizer.py
Last active November 3, 2016 01:27
Files and Resources for Quant Insights Bootcamp (DAY 1)
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns; sns.set()
from pandas_datareader import data as web
class StrategyOptimizer(object):
def __init__(self, symbol, start, end, t1, t2):
self.symbol = symbol
self.start = start
@yhilpisch
yhilpisch / ScikitBacktester01.py
Last active July 22, 2019 04:10
Files and Resources for Quant Insights Bootcamp (DAY 2)
#
# Python for Algorithmic Trading
# Quant Insights Bootcamp
#
# The Python Quants
#
import numpy as np
import pandas as pd
import seaborn as sns; sns.set()
from pandas_datareader import data as web
@yhilpisch
yhilpisch / Titanic.csv
Last active January 20, 2017 21:07
Introductory & Technical Bootcamp @ For Python Quants London 2016
Class Sex Age Survived Freq
1 1st Male Child No 0
2 2nd Male Child No 0
3 3rd Male Child No 35
4 Crew Male Child No 0
5 1st Female Child No 0
6 2nd Female Child No 0
7 3rd Female Child No 17
8 Crew Female Child No 0
9 1st Male Adult No 118
@yhilpisch
yhilpisch / admin.txt
Last active August 7, 2022 09:46
Algo Trading Bootcamp @ For Python Quants
Welcome to the Algo Trading Bootcamp
====================================
WIFI
====
Ft1ch#2016#!
Quant Platform
==============
@yhilpisch
yhilpisch / RegPred.py
Created January 23, 2017 21:10
14th Python for Quant Finance Meetup
#
# Stock Market Prediction
# with Linear Regression
#
# The Python Quants GmbH
#
import numpy as np
import pandas as pd
from pandas_datareader import data as web
import seaborn as sns
@yhilpisch
yhilpisch / 00_overview.md
Last active September 19, 2018 18:51
Code from Plotcon, 04. May 2017, Oakland

Streaming Financial Data & Plots with Ploty

This Gist hosts the code from my talk and brief coding session at Plotcon.

  • tick data server with ZeroMQ
  • tick data client with ZeroMQ
  • tick data plotting with plotly
  • Flask app embedding the streaming plot