Skip to content

Instantly share code, notes, and snippets.

View projenix's full-sized avatar

Sam Abouelata projenix

  • Casablanca, Morocco
View GitHub Profile
# This is my implmentation of calculating Global Average Symmetric Price (GASP) as it's mentioned in this video: https://www.youtube.com/watch?v=wpmTuNvGQjQ
# Presenter in the video doesn't explain briefly how to calculate the GASP, but, I kinda figured it out myself
order_book = {
'bids': [
[97, 0.1],
[96, 0.2],
[95, 6]
],
@imtaehyun
imtaehyun / technical-analysis-indicators-without-talib-code.py
Last active September 14, 2023 07:57
Technical analysis Indicators without Talib (code)
# https://www.quantopian.com/posts/technical-analysis-indicators-without-talib-code
import numpy
import pandas as pd
import math as m
#Moving Average
def MA(df, n):
MA = pd.Series(pd.rolling_mean(df['Close'], n), name = 'MA_' + str(n))
df = df.join(MA)