-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
39 lines (31 loc) · 751 Bytes
/
config.py
File metadata and controls
39 lines (31 loc) · 751 Bytes
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
"""
Central configuration for the IPC trading stack.
Adjust host/ports or trading parameters here instead of hard-coding them
throughout the individual processes.
"""
HOST = "127.0.0.1"
PRICE_FEED_PORT = 5101
NEWS_FEED_PORT = 5102
ORDER_MANAGER_PORT = 5103
MESSAGE_DELIMITER = b"*"
# Symbols to stream and track
SYMBOLS = ["AAPL", "MSFT", "GOOG"]
# Gateway behaviour
INITIAL_PRICES = {
"AAPL": 173.2,
"MSFT": 325.1,
"GOOG": 135.8,
}
RANDOM_WALK_STD = 0.4
TICK_INTERVAL_SECONDS = 0.5
# Shared memory
SHARED_MEMORY_NAME = "pf_price_book"
# Strategy configuration
SHORT_WINDOW = 3
LONG_WINDOW = 6
BULLISH_THRESHOLD = 60
BEARISH_THRESHOLD = 40
ORDER_QUANTITY = 10
MAX_PRICE_HISTORY = LONG_WINDOW
# Logging / misc
DEFAULT_TIMEOUT = 5.0