Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
48
plt.show()
49
50
def
sma(data, window):
51
sma = data.rolling(window = window).mean()
52
return
sma
53
54
tsla[
'sma_20'
] = sma(tsla[
'close'
], 20)
55
print(tsla.tail())
Callers
1
bollinger_bands.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected