-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmentor.py
More file actions
56 lines (56 loc) · 1.58 KB
/
Copy pathmentor.py
File metadata and controls
56 lines (56 loc) · 1.58 KB
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
def investment_mentor(
recommendation,
risk,
news_summary,
levels,
adjusted_score
):
advice = []
advice.append("🤖 AI Mentor")
advice.append("")
if adjusted_score >= 85:
advice.append(
"The stock currently has very strong technical strength."
)
elif adjusted_score >= 70:
advice.append(
"The stock has healthy technical indicators but should still be monitored."
)
else:
advice.append(
"The stock still has uncertainties."
)
advice.append("")
if "Low" in risk:
advice.append(
"Risk is relatively low."
)
elif "Medium" in risk:
advice.append(
"Risk is moderate. Position sizing is important."
)
else:
advice.append(
"Risk is high. Avoid investing all your capital at once."
)
advice.append("")
if news_summary["Overall"] == "Positive":
advice.append(
"Recent news is supporting the current trend."
)
elif news_summary["Overall"] == "Negative":
advice.append(
"Be cautious because recent news may increase volatility."
)
advice.append("")
advice.append(
f"Support Level : ₹{levels['Support']}"
)
advice.append(
f"Resistance Level : ₹{levels['Resistance']}"
)
advice.append("")
advice.append(
"Long-term investors should focus on company quality rather than short-term price movements."
)
return advice