Skip to content

Instantly share code, notes, and snippets.

View philsong's full-sized avatar

S. philsong

View GitHub Profile
@philsong
philsong / 0x5DE45A7985ae5828f153b635B872655222FdB9eC
Created October 20, 2017 10:08
0x5DE45A7985ae5828f153b635B872655222FdB9eC
0x5DE45A7985ae5828f153b635B872655222FdB9eC
@philsong
philsong / bellman.py
Created February 6, 2021 07:33 — forked from joninvski/bellman.py
Bellman ford python implementation
import pdb
"""
The Bellman-Ford algorithm
Graph API:
iter(graph) gives all nodes
iter(graph[u]) gives neighbours of u
graph[u][v] gives weight of edge (u, v)
"""
@philsong
philsong / Bot.py
Created July 11, 2021 01:38 — forked from guiziyu/Bot.py
Elon Musk Twitter Trading Bot
import time
import os, io
import urllib.request
import tweepy
from google.cloud import vision
from google.cloud import vision_v1
import urllib.parse, urllib.request
import hashlib, hmac, time
import requests
@philsong
philsong / Liquidation_Permanent_Price_Impact.ipynb
Created September 7, 2021 10:55 — forked from sebjai/Liquidation_Permanent_Price_Impact.ipynb
Optimal Execution with linear and non-linear impact. Chapter 6 of Algorithmic and High-Frequency Trading (c) Cartea, Jaimungal, & Penalva, 2015 Cambridge University Press
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@philsong
philsong / TargetPercent_MarketSpeed.ipynb
Created September 7, 2021 10:57 — forked from sebjai/TargetPercent_MarketSpeed.ipynb
Optimal execution with a percentage of volume target (Chap 9.2 of Algorithmic and High-Frequency Trading (c) Cartea, Jaimungal, & Penalva 2015 Cambridge University Press)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@philsong
philsong / Execution_Limit_MarketOrder.ipynb
Created September 7, 2021 10:57 — forked from sebjai/Execution_Limit_MarketOrder.ipynb
Implementation of optimal execution using limit and market orders from Chap 8.5 of Algorithmic and High-Frequency Trading by Cartea, Jaimungal, & Penalva (2015) Cambridge University Press
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@philsong
philsong / OrderFlow.ipynb
Created September 7, 2021 10:57 — forked from sebjai/OrderFlow.ipynb
Optimal trading with order-flow and short-term alpha
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@philsong
philsong / STA2536-exponential-MixtureModel.ipynb
Created September 7, 2021 10:57 — forked from sebjai/STA2536-exponential-MixtureModel.ipynb
Estimation exponential mixture models
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@philsong
philsong / short_term_alpha.ipynb
Created September 7, 2021 10:58 — forked from sebjai/short_term_alpha.ipynb
Market Making in Short-Term Alpha (Chapter 10.4.2 of Algorithmic and High-Frequency Trading by Cartea, Jaimungal, Penalva, published by Cambridge University Press)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@philsong
philsong / PriceLimitSim.ipynb
Created September 7, 2021 10:58 — forked from sebjai/PriceLimitSim.ipynb
Algo Trading Book Price Limiter (Chapter 7.2 of of Algorithmic and High-Frequency Trading by Cartea, Jaimungal, Penalva, published by Cambridge University Press)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.