-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
83 lines (69 loc) · 2.07 KB
/
config.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
"""
Config
------------------------------------------------------------------------------
Program Description
-------------------------------------------------------------------------------
Class for setting and controlling defaults for the Screener Application.
----------------------------------------------------------------------------------
"""
class ScreenerConfig:
# Connection URLs to various DB's
database_defaults = {
"sqlite": {
"DB_FILE": "./stock-db.db",
"DB_FILE_SA_SQLITE": "sqlite:///./stock-db.db",
"USERNAME": "",
"PASSWORD": "",
},
"mysql": {
"host": "localhost",
"user": "root",
"passwd": "my secret password",
"db": "db-name",
},
"postgres": {
'drivername': 'postgres',
'username': 'postgres',
'password': 'postgres',
'host': '192.168.99.100',
'port': 5432
},
"oracle": {
},
"mssqlserver": {
},
}
# Defaults for Stocks things such as days in a year, bollinger band pds etc.
stock_defaults = {
"ratios": {
"INDUSTRY_RATIOS": "./data/IndustryRatios_Aug22_2021.csv",
"SECTOR_RATIOS": "./data/SQL/read/sector_analysis/SectorRatios.sql",
},
"fundamental": {
'fiscal_days_in_year': 365,
},
"technical": {
"ST_PERIOD": 20,
"LG_PERIOD": 50,
"BB_MULTIPLIER": 1.96,
"RSI_PERIOD": 14,
"MA50": 50,
"MA72": 72,
"MA200": 200,
"MACD_FAST_PD": 12,
"MACD_SLOW_PD": 26,
"MACD_SIGNAL_LINE": 9,
},
"options": {
}
}
# Logging information Default
logging = {
'basic_logger': {
'level': '',
'encoding': 'utf-8',
'filename': 'path/to/log/file.name',
'filemode': 'w',
'format': "%(asctime)s - %(levelname)s - %(lineno)d | %(message)s "
}
}