Skip to content

Instantly share code, notes, and snippets.

View Blackcol's full-sized avatar

Andrés Alfonso Aguirre Girón Blackcol

View GitHub Profile
# 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)