-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig-TEMPLATE.py
112 lines (99 loc) · 2.12 KB
/
config-TEMPLATE.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#!/usr/bin/python
'''
TEMPLATE: copy this file as 'config.py', then change any of the below
key-value configuration as needed.
'''
#
# api controls
#
twitter_api = {
'CONSUMER_KEY': 'REPLACE-ME',
'CONSUMER_SECRET': 'REPLACE-ME',
'ACCESS_TOKEN': 'REPLACE-ME',
'ACCESS_SECRET': 'REPLACE-ME'
}
quandl_api = {
'API_KEY': 'REPLACE-ME'
}
#
# model controls
#
analysis_control = {
'analysis_explore': False,
'analysis_granger': False,
'analysis_ts_stock': True,
'analysis_ts_sentiment': False,
'analysis_classify': False
}
model_control = {
'model_mnb': True,
'model_mnb_pos': True,
'model_bnb': True,
'model_bnb_pos': True,
'model_svm': True,
'model_svm_pos': True,
'model_arima': True,
'model_lstm': True
}
model_config = {
'classify_index': 'full_text',
'ts_index': 'value',
'granger_lag': 4,
'arima_auto_scale': None,
'lstm_epochs': 750,
'lstm_batch_size': 32,
'lstm_num_cells': 4,
'lstm_units': 50,
'lstm_dropout': 0.2,
'lstm_activation': 'linear',
'lstm_validation_split': 0.2,
'lstm_steps_in': 4,
'lstm_steps_out': 1,
'classify_threshold': [0.5],
'classify_split_size': 0.2,
'classify_chi2': 100,
'classify_ngram': (1,1),
'classify_kfold': 5,
'classify_top_words': 25
}
#
# save controls
#
save_result = {
'lstm': True,
'lstm_log': True,
'model_plot': True
}
#
# application controls
#
twitter_accounts = [
'jimcramer',
'ReformedBroker',
'TheStalwart',
'LizAnnSonders',
'SJosephBurns'
]
stock_codes = [
('BATS', 'BATS_AAPL'),
## ('BATS', 'BATS_AMZN'),
## ('BATS', 'BATS_GOOGL'),
## ('BATS', 'BATS_MMT'),
## ('BATS', 'BATS_NFLX'),
## ('CHRIS', 'CBOE_VX1'),
## ('NASDAQOMX', 'COMP-NASDAQ'),
## ('FINRA', 'FNYX_MMM'),
## ('FINRA', 'FNSQ_SPY'),
## ('FINRA', 'FNYX_QQQ'),
## ('EIA', 'PET_RWTC_D'),
## ('WFC', 'PR_CON_15YFIXED_IR'),
## ('WFC', 'PR_CON_30YFIXED_APR')
]
sentiments = ['negative', 'neutral', 'positive']
drop_cols = [
'compound',
'retweet_count',
'favorite_count',
'user_mentions',
'Short Volume'
]