Spaces:
Runtime error
Runtime error
Shrikrishna
commited on
Commit
•
85b11fb
1
Parent(s):
016e17f
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ import matplotlib.pyplot as plt
|
|
5 |
import yfinance as yf
|
6 |
yf.pdr_override()
|
7 |
from pandas_datareader import data as pdr
|
|
|
8 |
|
9 |
start = '2005-01-01'
|
10 |
end = '2022-12-31'
|
@@ -38,4 +39,9 @@ plt.plot(df.Close, label="Closing Price")
|
|
38 |
plt.plot(moving_avg_100,'red', label="100 Moving Average")
|
39 |
plt.plot(moving_avg_200,'green', label="200 Moving Average")
|
40 |
plt.legend()
|
41 |
-
st.pyplot(fig)
|
|
|
|
|
|
|
|
|
|
|
|
5 |
import yfinance as yf
|
6 |
yf.pdr_override()
|
7 |
from pandas_datareader import data as pdr
|
8 |
+
from sklearn.preprocessing import MinMaxScaler
|
9 |
|
10 |
start = '2005-01-01'
|
11 |
end = '2022-12-31'
|
|
|
39 |
plt.plot(moving_avg_100,'red', label="100 Moving Average")
|
40 |
plt.plot(moving_avg_200,'green', label="200 Moving Average")
|
41 |
plt.legend()
|
42 |
+
st.pyplot(fig)
|
43 |
+
|
44 |
+
#Spliting Data in Training and Testing Data
|
45 |
+
data_training = pd.DataFrame(df["Close"][0:int(len(df)*0.70)])
|
46 |
+
data_testing = pd.DataFrame(df["Close"][int(len(df)*0.70):int(len(df))])
|
47 |
+
|