-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_scripts.py
42 lines (31 loc) · 1.37 KB
/
run_scripts.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import sys
from scripts.price_forecast import PriceForecast
from scripts.crypto_ohlcv import enchanced_ohlcv_with_techinical_indicators, process_stablecoins_ohlcv, extract_ohlcv_with_ti
from scripts.run_sentimental_analysis import perform_sentiment_on_news_articles
if __name__ == '__main__':
command = ''
try:
command = sys.argv[1]
except IndexError:
print ('after run_script.py need a command. Avail-CMD: ohlcv, forecast')
if command == 'ohlcv':
process_stablecoins_ohlcv()
enchanced_ohlcv_with_techinical_indicators('cryptos_blw1_ohlcv')
elif command == 'forecast':
# try forecasting BTC price with OHLCV daily data
forecast = PriceForecast('btc_ohlcv')
num_day = 7
if len(sys.argv) >= 3:
num_day = int(sys.argv[2])
forecast_prices = forecast.run_forecast(model='SARIMAX', plot_chart=False, day=num_day)
print(forecast_prices)
elif command == 'sa':
perform_sentiment_on_news_articles()
elif command == 'export-ti':
try:
crypto_asset = sys.argv[2]
extract_ohlcv_with_ti(crypto_asset)
except IndexError:
print('Please add the crypto asset you want to pull after export-ti <crypto_asset>')
else:
print('>> Not A valid command !\n Available Command: ohlcv, forecast, sa')