MCPcopy Create free account
hub / github.com/DVampire/FinAgent / parse_args

Function parse_args

tools/main_strategy.py:29–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27from finagent.tools import StrategyAgents
28
29def parse_args():
30 parser = argparse.ArgumentParser(description='Main')
31 parser.add_argument("--config", default=os.path.join(ROOT, "configs", "exp", "trading", "AAPL.py"), help="config file path")
32 parser.add_argument(
33 '--cfg-options',
34 nargs='+',
35 action=DictAction,
36 help='override some settings in the used config, the key-value pair '
37 'in xxx=yyy format will be merged into config file. If the value to '
38 'be overwritten is a list, it should be like key="[a,b]" or key=a,b '
39 'It also allows nested list/tuple values, e.g. key="[(a,b),(c,d)]" '
40 'Note that the quotation marks are necessary and that no white space '
41 'is allowed.')
42 parser.add_argument("--root", type=str, default=ROOT)
43 parser.add_argument("--if_remove", action="store_true", default=False)
44
45 # train
46 parser.add_argument("--checkpoint_start_date", type=str, default=None)
47 parser.add_argument("--if_load_memory", action="store_true", default=True)
48 parser.add_argument("--memory_path", type=str, default=None)
49 parser.add_argument("--if_load_trading_record", action="store_true", default=True)
50 parser.add_argument("--trading_record_path", type=str, default=None)
51 parser.add_argument("--if_train", action="store_true", default=False)
52 parser.add_argument("--if_valid", action="store_true", default=True)
53
54 # valid
55 # parser.add_argument("--if_load_memory", action="store_true", default=True)
56 # parser.add_argument("--if_train", action="store_true", default=False)
57 # parser.add_argument("--if_valid", action="store_true", default=True)
58
59 args = parser.parse_args()
60 return args
61
62def main():
63 args = parse_args()

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected