-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprompts.py
60 lines (42 loc) · 1.45 KB
/
prompts.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
'''
This file includes functions for displaying text and prompting the user for answers.
'''
'''
This comment holds brainstorming thoughts about how we might want to build a better command line UI
Do you want to download updated stock data? Yes/No
Download Fresh Data
Enter Ticker symbol?
User will enter the company Ticker Symbol
Use Existing Data
Get list of Tickers we want to display
Which ticker do you want to use? (Select from the list)
Loading data as per the selected ticker
What is your investment risk tolerance?
Low
Moderate
High
#We have no idea about how much risk each of thses strategies carry
What type of Algorithm Strategies you want to trade?
'''
from _config import *
import questionary as qt
def welcome_message():
print()
print('Welcome to Algo Strategy Tester')
print()
print("This application will let you run a pre-defined algorithmic trading strategy on stock data you select. Results are displayed in an interactive graph that you man inspect. Enjoy!")
print()
return None
def prompt_multiple_choice(question_text, question_options):
'''This function wraps the Questionary .select() function used to prompt the user for an answer.
'''
result = qt.select(
question_text,
choices = question_options
).ask()
print()
return result
def prompt_single_choice(question_text):
result = qt.confirm(question_text).ask()
print()
return result