-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmlfl.py
36 lines (30 loc) · 1.08 KB
/
mlfl.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
import util
import config
import time
from datetime import datetime
def test_run():
print "Welcome to MLFL {}".format(config.version)
print "Start date: {}".format(config.start_date)
print ""
print "Select action:"
print "1. Select portfolio"
print "0. Exit"
choice = '1' #raw_input()
if choice == '1':
symbol_list = config.test_portfolio #raw_input("Insert symbol list comma separated\n")
symbol_list.append('ANX.MI')
symbols = symbol_list #symbol_list.upper().split(',')
if len(symbols) < 1:
print "Error, symbol list not valid"
exit()
#util.select_portfolio(symbols, config.start_date, ['2016-01-01', '2016-12-31'], config.ref_symbol, skip_download = True)
#util.select_portfolio(symbols, config.start_date, ['2009-01-01', '2017-01-15'], config.ref_symbol, skip_download = True)
util.test_dataframe(config.ref_symbol)
elif choice == '0':
print "Exiting..."
exit()
else:
print "Invalid choice"
exit()
if __name__ == "__main__":
test_run()