Komeng commited on
Commit
2dadea5
·
1 Parent(s): f7b8d4c
Files changed (46) hide show
  1. ADHI.h5 +3 -0
  2. ADRO.h5 +3 -0
  3. AKRA.h5 +3 -0
  4. ANTM.h5 +3 -0
  5. ASII.h5 +3 -0
  6. ASRI.h5 +3 -0
  7. BBCA.h5 +3 -0
  8. BBNI.h5 +3 -0
  9. BBRI.h5 +3 -0
  10. BBTN.h5 +3 -0
  11. BKSL.h5 +3 -0
  12. BMRI.h5 +3 -0
  13. BSDE.h5 +3 -0
  14. CPIN.h5 +3 -0
  15. ELSA.h5 +3 -0
  16. EXCL.h5 +3 -0
  17. GGRM.h5 +3 -0
  18. HMSP.h5 +3 -0
  19. ICBP.h5 +3 -0
  20. INCO.h5 +3 -0
  21. INDF.h5 +3 -0
  22. INDY.h5 +3 -0
  23. INKP.h5 +3 -0
  24. INTP.h5 +3 -0
  25. ITMG.h5 +3 -0
  26. JSMR.h5 +3 -0
  27. KLBF.h5 +3 -0
  28. LPKR.h5 +3 -0
  29. LPPF.h5 +3 -0
  30. MEDC.h5 +3 -0
  31. MNCN.h5 +3 -0
  32. PGAS.h5 +3 -0
  33. PTBA.h5 +3 -0
  34. PTPP.h5 +3 -0
  35. Procfile +1 -0
  36. SCMA.h5 +3 -0
  37. SMGR.h5 +3 -0
  38. TLKM.h5 +3 -0
  39. TPIA.h5 +3 -0
  40. UNTR.h5 +3 -0
  41. UNVR.h5 +3 -0
  42. WIKA.h5 +3 -0
  43. WSKT.h5 +3 -0
  44. app.py +83 -0
  45. requirements.txt +7 -0
  46. setup.sh +13 -0
ADHI.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a55e0f9b80ad677e6da3f32c37d49ce0462a0135d7efb07075c75a7441c5ad2b
3
+ size 2919964
ADRO.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:09fa2ef3eb39b8f200957421a7063c3f09206b6d1d52ab1882aaec70db0a8aa3
3
+ size 2919964
AKRA.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b49170754f9d8fd91c72d64a92c7c4606456f014195e3d054df7cd11db1e4fcf
3
+ size 2919964
ANTM.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:07c8e3e78c2b0f07c9d908cf25c818423a99338d353dabecd1e8b75b5770dac6
3
+ size 2919964
ASII.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1eda57441e37d40d422352df02766eb3314d70b09d85b63fb026ad055eba692d
3
+ size 2919964
ASRI.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a96ec4341bfed54d9cbb3023f8af6cf74d4fd5b19aaea585bc0506987ca72cc9
3
+ size 2919964
BBCA.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fafce3070b34dcbefa298102d79b69793d9b1746a779dcabd3fc91d798e88183
3
+ size 2919964
BBNI.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a58f63fd555632e3d26ea45e825cf8da6b74caad167ce1fe00ded1341cf32801
3
+ size 2919964
BBRI.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3c99fbb8fbf81db900f80531a29efe0c023f28b9f27612852ff7a79c0a56e6fb
3
+ size 2919964
BBTN.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8e3924f663e483d7cd4151f04ce7e25628037735f90f9b1175875b5c2632bd2d
3
+ size 2919964
BKSL.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3300f254d909a00ecf38db3abdc3eef930945ccb804f0f7d700a30835a95f52d
3
+ size 2919964
BMRI.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9fcae29d75bd258049f8b6c7ad7d111c1a5302470ecaa46b956c02b3034d1c29
3
+ size 2919964
BSDE.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:65c677a83ad127ba8ab6d64d8ea7b8124b4b9add15d5e60a2b450cb25ff666b8
3
+ size 2919964
CPIN.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:16454f89b2475ea606cb984fa73d631b96e0c56ea5eaac99a1627c069975937d
3
+ size 2919964
ELSA.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3210c86d938288aef5b2478c286d56f4fbf063b4598a50211b364b047a4a3c98
3
+ size 2919964
EXCL.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca593b0c2d5d324a00e255014f0f6a7447df65bfabcd4580d07ee7fda40257e2
3
+ size 2919964
GGRM.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e57d250bedf34d17cf16e5755aa6395af529c03b3ebb900b73eb20c4e522644d
3
+ size 2919964
HMSP.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c51b2043bca1487f117e903acc16ae69286728d86c09092486d35ca375d7c6e8
3
+ size 2919964
ICBP.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7eebc79f6039412bcbad2d97c26bb18ad0eb65088fae22a1962995b6e508ea32
3
+ size 2919964
INCO.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c626b4bd896b2c73cb36570ff9c33c10f58b00868772fd0b20af07c432c4c505
3
+ size 2919964
INDF.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e516a6b0c95c9b90a30f8bfef0ed8c3381c8698141ea960afbf8cce79267027
3
+ size 2919964
INDY.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:00e724b6ddfeb5c7de748d0272b9b63aebe9a4863a2a152fefd75756e9b141f0
3
+ size 2919964
INKP.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:86d40287d6b762cc3824caca50d2020db6c4ee159328d996bc123a149c8a41d4
3
+ size 2919964
INTP.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:700c470aea6e676d1838a16366bbee5d34f27bf9125f038a0be8c8d45d7bd5e7
3
+ size 2919964
ITMG.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4774d2c669571658b32ed02f4ccfebd72a886a8367047ea1df6316e5a8c5a024
3
+ size 2919964
JSMR.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:921a1c091340ef93c550b1e9dafa07a474260cff2487f377747b5be64fbe8b7c
3
+ size 2919964
KLBF.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:867a9a5f73de427b09f018007fd0b9db202bb71edb6f5b054a39f2dbf19d0a18
3
+ size 2919964
LPKR.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:557cfe7a57facc2e2c198d3ba82b53054ca623a79678b9b15e471cde3b82c914
3
+ size 2919964
LPPF.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6ca2775fd71c863864e042d9df2172d7c022b1b83ecc8f3e4e777c5484a3fa0e
3
+ size 2919964
MEDC.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44d4c757aa90a44f75a1fe9c204c2cf5afad2555654cd6fd6272415ee5238a3e
3
+ size 2919964
MNCN.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f5e7f387cc5b5c3f5543c5f54c114f2283a2667748570bfd016507141f4bf547
3
+ size 2919964
PGAS.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da3723ce6f41a44a1d87d7661730a586744444ccb6c4df0b3ee011a7458fddc8
3
+ size 2919964
PTBA.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1ed16ee058dc5bed535b87553f4e39cd76832d35750241c5733ca339207e0004
3
+ size 2919964
PTPP.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d30945b3b7b8efc7df650045db30ba666345d61ed4dac54d98894fe43f36605
3
+ size 2919964
Procfile ADDED
@@ -0,0 +1 @@
 
 
1
+ web: sh setup.sh && streamlit run app.py
SCMA.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4bd118ce44098781c653800ef641f1f6f01f4a510b267b5669eba135834931d6
3
+ size 2919964
SMGR.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d45992af94cf1828e50b54ce031685b3f0003bae19f247f95c497e869f2c9a48
3
+ size 2919964
TLKM.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:741643a76979b0d23b60bcc29428f6e293d5d4b582799fa2727af3793633e891
3
+ size 2919964
TPIA.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:88708efb76cbcd887a4617758ee70382cd96078814b42fff8fcaee7c4e0e9bd8
3
+ size 2919964
UNTR.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a16dce69eaa10d4511ba0d1a3b75f4a737c52c60c668125d8be07fb519082b01
3
+ size 2919964
UNVR.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb9d6582ca3402c5856b68f53d80d738826df8379d27ab2207a249fed4d49e09
3
+ size 2919964
WIKA.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f3785c46228de2c69bce1974ebd5b33f5a4f9b030456aed2f4db3b9b460d83fc
3
+ size 2919964
WSKT.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a13e1d91f4625b41b44266b87980f5afbcfed39da60cbd38648b4fa9576ced38
3
+ size 2919964
app.py ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import yfinance as yf
2
+ import streamlit as st
3
+ import pandas as pd
4
+ import datetime
5
+
6
+ import numpy as np
7
+ import matplotlib.pyplot as plt
8
+ from keras.models import Sequential
9
+ from keras.layers import LSTM
10
+ from keras.layers import Dense
11
+ from keras.layers import Bidirectional
12
+
13
+
14
+ st.write("""
15
+ # Simple Stock Price App
16
+
17
+ Shown are the stock **closing price** and **volume**.
18
+ """)
19
+
20
+ def user_input_features() :
21
+ stock_symbol = st.sidebar.selectbox('Symbol',('ADHI', 'ANTM', 'TLKM'))
22
+ date_start = st.sidebar.date_input("Start Date", datetime.date(2015, 5, 31))
23
+ date_end = st.sidebar.date_input("End Date", datetime.date.today())
24
+
25
+ tickerData = yf.Ticker(stock_symbol+'.JK')
26
+ tickerDf = tickerData.history(period='1d', start=date_start, end=date_end)
27
+ return tickerDf, stock_symbol
28
+
29
+ input_df, stock_symbol = user_input_features()
30
+
31
+ st.line_chart(input_df.Close)
32
+ st.line_chart(input_df.Volume)
33
+
34
+ st.write("""
35
+ # Stock Price Prediction
36
+
37
+ Shown are the stock prediction for next 20 days.
38
+ """)
39
+
40
+ n_steps = 100
41
+ n_features = 1
42
+
43
+ model = Sequential()
44
+ model.add(Bidirectional(LSTM(300, activation='relu'), input_shape=(n_steps, n_features)))
45
+ model.add(Dense(1))
46
+ model.compile(optimizer='adam', loss='mse')
47
+
48
+ model.load_weights(stock_symbol + ".h5")
49
+ df = input_df.dropna(axis=0, how='any', thresh=None, subset=None, inplace=False)
50
+ df = df[df.Volume > 0]
51
+
52
+ close = df['Close'][-n_steps:].to_list()
53
+ min_in = min(close)
54
+ max_in = max(close)
55
+ in_seq = []
56
+ for i in close :
57
+ in_seq.append((i - min_in) / (max_in - min_in))
58
+
59
+ for i in range(20) :
60
+ x_input = np.array(in_seq[-100:])
61
+ x_input = x_input.reshape((1, n_steps, n_features))
62
+ yhat = model.predict(x_input, verbose=0)
63
+ in_seq.append(yhat[0][0])
64
+
65
+ norm_res = in_seq[-20:]
66
+ res = []
67
+ for i in norm_res :
68
+ res.append(i * (max_in - min_in) + min_in)
69
+
70
+ closepred = close[-80:]
71
+ for x in res :
72
+ closepred.append(x)
73
+
74
+ plt.figure(figsize = (20,10))
75
+ plt.plot(closepred, label="Prediction")
76
+ plt.plot(close[-80:], label="Previous")
77
+ plt.ylabel('Price (Rp)', fontsize = 15 )
78
+ plt.xlabel('Days', fontsize = 15 )
79
+ plt.title(stock_symbol + " Stock Prediction", fontsize = 20)
80
+ plt.legend()
81
+ plt.grid()
82
+
83
+ st.pyplot(plt)
requirements.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ keras==2.10.0
2
+ matplotlib==3.5.1
3
+ numpy==1.21.5
4
+ pandas==1.4.2
5
+ streamlit==1.13.0
6
+ yfinance==0.1.77
7
+ tensorflow
setup.sh ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ mkdir -p ~/.streamlit/
2
+
3
+ echo "\
4
+ [general]\n\
5
+ email = \"your-email@domain.com\"\n\
6
+ " > ~/.streamlit/credentials.toml
7
+
8
+ echo "\
9
+ [server]\n\
10
+ headless = true\n\
11
+ enableCORS=false\n\
12
+ port = $PORT\n\
13
+ " > ~/.streamlit/config.toml