forked from ztuntrade/Quant-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
28 lines (18 loc) · 715 Bytes
/
main.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
# Refer Examples for more details
import multiprocessing
import time
def backtest():
# User should write their backtest logic here.
# Run backtest logic here. This is just a placeholder loop for demonstration.
print("Backtest started")
def fronttest():
# User should write their fronttest logic here.
# This function should be designed to run continuously.
print("Fronttest started")
if __name__ == "__main__":
backtest_process = multiprocessing.Process(target=backtest)
fronttest_process = multiprocessing.Process(target=fronttest)
backtest_process.start()
fronttest_process.start()
backtest_process.join()
# Note: The fronttest process will keep running.