Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -55,15 +55,6 @@ def get_stock_data(ticker):
|
|
55 |
hist = stock.history(period="6mo") # 지난 6개월간의 데이터를 가져옵니다.
|
56 |
return hist
|
57 |
|
58 |
-
def apply_technical_indicators(df):
|
59 |
-
df['SMA'] = talib.SMA(df['Close'], timeperiod=20)
|
60 |
-
df['EMA'] = talib.EMA(df['Close'], timeperiod=20)
|
61 |
-
df['RSI'] = talib.RSI(df['Close'], timeperiod=14)
|
62 |
-
macd, macdsignal, macdhist = talib.MACD(df['Close'], fastperiod=12, slowperiod=26, signalperiod=9)
|
63 |
-
df['MACD'] = macd
|
64 |
-
df['MACD_signal'] = macdsignal
|
65 |
-
return df
|
66 |
-
|
67 |
def plot_technical_indicators(df):
|
68 |
plt.figure(figsize=(14, 7))
|
69 |
plt.subplot(2, 1, 1)
|
|
|
55 |
hist = stock.history(period="6mo") # 지난 6개월간의 데이터를 가져옵니다.
|
56 |
return hist
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
def plot_technical_indicators(df):
|
59 |
plt.figure(figsize=(14, 7))
|
60 |
plt.subplot(2, 1, 1)
|