You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@AiAzez Hey if thats a problem, for learning purposes i would try to just omit the stocks that joined the S&P500
symbols_list = sp500['Symbol'].unique().tolist()
# ['GEV', 'SOLV', 'VLTO']: YFChartError(....)
stocks_to_remove = ['GEV', 'SOLV', 'VLTO']
symbols_list = [stock for stock in symbols_list if stock not in stocks_to_remove]
I keep getting error from macd:
def compute_macd(close):
macd = pandas_ta.macd(close=close, length=20).iloc[:,0]
return macd.sub(macd.mean()).div(macd.std())
df['macd'] = df.groupby(level=1, group_keys=False)['adj close'].apply(compute_macd)
TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'
result = self._python_apply_general(f, self._selected_obj)
values, mutated = self._grouper.apply_groupwise(f, data, self.axis)
res = f(group)
return op(a, b)
what is the solution
The text was updated successfully, but these errors were encountered: