bstraehle commited on
Commit
b3d6c85
1 Parent(s): 3670b47

Update tasks.py

Browse files
Files changed (1) hide show
  1. tasks.py +62 -63
tasks.py CHANGED
@@ -2,66 +2,65 @@ from crewai import Task
2
 
3
  from agents import get_data_analyst_agent, get_trading_strategy_agent, get_execution_agent, get_risk_management_agent
4
 
5
- class Tasks:
6
- def get_data_analysis_task():
7
- # Task for Data Analyst Agent: Analyze Market Data
8
- data_analysis_task = Task(
9
- description=(
10
- "Continuously monitor and analyze market data for "
11
- "the selected stock ({stock_selection}). "
12
- "Use statistical modeling and machine learning to "
13
- "identify trends and predict market movements."
14
- ),
15
- expected_output=(
16
- "Insights and alerts about significant market "
17
- "opportunities or threats for {stock_selection}."
18
- ),
19
- agent=get_data_analyst_agent(),
20
- )
21
-
22
- def get_strategy_development_task():
23
- # Task for Trading Strategy Agent: Develop Trading Strategies
24
- strategy_development_task = Task(
25
- description=(
26
- "Develop and refine trading strategies based on "
27
- "the insights from the Data Analyst and "
28
- "user-defined risk tolerance ({risk_tolerance}). "
29
- "Consider trading preferences ({trading_strategy_preference})."
30
- ),
31
- expected_output=(
32
- "A set of potential trading strategies for {stock_selection} "
33
- "that align with the user's risk tolerance."
34
- ),
35
- agent=get_trading_strategy_agent(),
36
- )
37
-
38
- def get_execution_planning_task():
39
- # Task for Trade Advisor Agent: Plan Trade Execution
40
- execution_planning_task = Task(
41
- description=(
42
- "Analyze approved trading strategies to determine the "
43
- "best execution methods for {stock_selection}, "
44
- "considering current market conditions and optimal pricing."
45
- ),
46
- expected_output=(
47
- "Detailed execution plans suggesting how and when to "
48
- "execute trades for {stock_selection}."
49
- ),
50
- agent=get_execution_agent(),
51
- )
52
-
53
- def get_risk_assessment_task():
54
- # Task for Risk Advisor Agent: Assess Trading Risks
55
- return = Task(
56
- description=(
57
- "Evaluate the risks associated with the proposed trading "
58
- "strategies and execution plans for {stock_selection}. "
59
- "Provide a detailed analysis of potential risks "
60
- "and suggest mitigation strategies."
61
- ),
62
- expected_output=(
63
- "A comprehensive risk analysis report detailing potential "
64
- "risks and mitigation recommendations for {stock_selection}."
65
- ),
66
- agent=get_risk_management_agent(),
67
- )
 
2
 
3
  from agents import get_data_analyst_agent, get_trading_strategy_agent, get_execution_agent, get_risk_management_agent
4
 
5
+ def get_data_analysis_task():
6
+ # Task for Data Analyst Agent: Analyze Market Data
7
+ data_analysis_task = Task(
8
+ description=(
9
+ "Continuously monitor and analyze market data for "
10
+ "the selected stock ({stock_selection}). "
11
+ "Use statistical modeling and machine learning to "
12
+ "identify trends and predict market movements."
13
+ ),
14
+ expected_output=(
15
+ "Insights and alerts about significant market "
16
+ "opportunities or threats for {stock_selection}."
17
+ ),
18
+ agent=get_data_analyst_agent(),
19
+ )
20
+
21
+ def get_strategy_development_task():
22
+ # Task for Trading Strategy Agent: Develop Trading Strategies
23
+ strategy_development_task = Task(
24
+ description=(
25
+ "Develop and refine trading strategies based on "
26
+ "the insights from the Data Analyst and "
27
+ "user-defined risk tolerance ({risk_tolerance}). "
28
+ "Consider trading preferences ({trading_strategy_preference})."
29
+ ),
30
+ expected_output=(
31
+ "A set of potential trading strategies for {stock_selection} "
32
+ "that align with the user's risk tolerance."
33
+ ),
34
+ agent=get_trading_strategy_agent(),
35
+ )
36
+
37
+ def get_execution_planning_task():
38
+ # Task for Trade Advisor Agent: Plan Trade Execution
39
+ execution_planning_task = Task(
40
+ description=(
41
+ "Analyze approved trading strategies to determine the "
42
+ "best execution methods for {stock_selection}, "
43
+ "considering current market conditions and optimal pricing."
44
+ ),
45
+ expected_output=(
46
+ "Detailed execution plans suggesting how and when to "
47
+ "execute trades for {stock_selection}."
48
+ ),
49
+ agent=get_execution_agent(),
50
+ )
51
+
52
+ def get_risk_assessment_task():
53
+ # Task for Risk Advisor Agent: Assess Trading Risks
54
+ return = Task(
55
+ description=(
56
+ "Evaluate the risks associated with the proposed trading "
57
+ "strategies and execution plans for {stock_selection}. "
58
+ "Provide a detailed analysis of potential risks "
59
+ "and suggest mitigation strategies."
60
+ ),
61
+ expected_output=(
62
+ "A comprehensive risk analysis report detailing potential "
63
+ "risks and mitigation recommendations for {stock_selection}."
64
+ ),
65
+ agent=get_risk_management_agent(),
66
+ )