-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.py
More file actions
18 lines (14 loc) · 1.09 KB
/
init.py
File metadata and controls
18 lines (14 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import argparse
import ast
from statisticsModule import calculate_stats
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Calculates relevant descriptive statistics of given symbols. Set -d to true to visualize the drawdown.')
parser.add_argument("-s", "--symbols", type=str, nargs='+', help="List of stock symbols to plot")
parser.add_argument('-b', '--begin', type=str, help='Start date in YYYY-MM-DD format', default=None)
parser.add_argument('-e', '--end', type=str, help='End date in YYYY-MM-DD format', default=None)
parser.add_argument('-md', '--markdown', type=str, help='Defines if .txt output should be saved in .md compatible format. Default is True.', default='True')
parser.add_argument('-d', '--drawdown-picture', type=str, help='Visualizes the drawdown and allows to save exports as .png and .html', default='False')
args = parser.parse_args()
drawdown_picture = ast.literal_eval(args.drawdown_picture)
markdown = ast.literal_eval(args.markdown)
calculate_stats(args.symbols, args.begin, args.end, drawdown_picture, markdown)