Python Sessions by Dr. Yves J. Hilpisch | The Python Quants GmbH
Online, 03. & 04. June 2017
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) |
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 |
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 |
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 |
# | |
# 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 |
3 + 4 | |
3 * 4 | |
3 / 4 | |
type(3) | |
type(4) | |
3 ** 4 | |
sqrt(3) | |
3 ** 0.5 | |
import math | |
math.sqrt(3) |
This is the Gist the For Python Quants Bootcamp in London 21. November 2017 (http://fpq.io)
This introductory boocamp day is about Finance with Python.
Topics
# | |
# Backtesting Algo Strategies based on | |
# Logistic Regression with scikit-learn | |
# | |
# Yves Hilpisch | |
# ODSC London 2016 | |
# The Python Quants GmbH | |
# | |
import numpy as np |