-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__main__.py
61 lines (51 loc) · 1.2 KB
/
__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
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
from argparse import ArgumentParser
from data import Data
import pickle as pkl
from model import Model
arg_parser = ArgumentParser(description='Control the project')
arg_parser.add_argument(
'-l',
help='Load Data',
dest='load',
action='store_true',
default=False,
required=False
)
arg_parser.add_argument(
'-c',
help='Input initial vol to network',
dest='combined',
action='store_true',
default=False,
required=False
)
arg_parser.add_argument(
'-t',
help='Train network, if false, load',
dest='train',
action='store_true',
default=False,
required=False
)
arg_parser.add_argument(
'-s',
help='The ticker symbol for the underlying',
dest='ticker',
type=str,
default="SPY"
)
arg_parser.add_argument(
'-v',
help='Path to volatility file',
dest='vol_file',
type=str,
default='vol_prediction/vix_data_1990.csv'
)
args = arg_parser.parse_args()
if args.load:
spy_data = Data(args.ticker, args.vol_file, skip_init=True)
spy_data.load_data()
else:
spy_data = Data(args.ticker, args.vol_file)
spy_data.save_data()
model = Model(spy_data, combined=args.combined, train=args.train, ticker=args.ticker)