MCPcopy Create free account
hub / github.com/alpha2phi/python-apps / sma

Function sma

copilot-labs/bollinger_bands.py:50–52  ·  view source on GitHub ↗
(data, window)

Source from the content-addressed store, hash-verified

48plt.show()
49
50def sma(data, window):
51 sma = data.rolling(window = window).mean()
52 return sma
53
54tsla['sma_20'] = sma(tsla['close'], 20)
55print(tsla.tail())

Callers 1

bollinger_bands.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected