bstraehle commited on
Commit
30ae45a
1 Parent(s): 0137668

Update agents.py

Browse files
Files changed (1) hide show
  1. agents.py +60 -59
agents.py CHANGED
@@ -1,61 +1,62 @@
1
  from crewai import Agent, Task, Crew
2
 
3
- def get_data_analyst_agent():
4
- return Agent(
5
- role="Data Analyst",
6
- goal="Monitor and analyze market data in real-time "
7
- "to identify trends and predict market movements.",
8
- backstory="Specializing in financial markets, this agent "
9
- "uses statistical modeling and machine learning "
10
- "to provide crucial insights. With a knack for data, "
11
- "the Data Analyst Agent is the cornerstone for "
12
- "informing trading decisions.",
13
- verbose=True,
14
- allow_delegation=True,
15
- tools = [scrape_tool, search_tool]
16
- )
17
-
18
- def get_trading_strategy_agent():
19
- return Agent(
20
- role="Trading Strategy Developer",
21
- goal="Develop and test various trading strategies based "
22
- "on insights from the Data Analyst Agent.",
23
- backstory="Equipped with a deep understanding of financial "
24
- "markets and quantitative analysis, this agent "
25
- "devises and refines trading strategies. It evaluates "
26
- "the performance of different approaches to determine "
27
- "the most profitable and risk-averse options.",
28
- verbose=True,
29
- allow_delegation=True,
30
- tools = [scrape_tool, search_tool]
31
- )
32
-
33
- def get_execution_agent():
34
- return Agent(
35
- role="Trade Advisor",
36
- goal="Suggest optimal trade execution strategies "
37
- "based on approved trading strategies.",
38
- backstory="This agent specializes in analyzing the timing, price, "
39
- "and logistical details of potential trades. By evaluating "
40
- "these factors, it provides well-founded suggestions for "
41
- "when and how trades should be executed to maximize "
42
- "efficiency and adherence to strategy.",
43
- verbose=True,
44
- allow_delegation=True,
45
- tools = [scrape_tool, search_tool]
46
- )
47
-
48
- def get_risk_management_agent():
49
- return Agent(
50
- role="Risk Advisor",
51
- goal="Evaluate and provide insights on the risks "
52
- "associated with potential trading activities.",
53
- backstory="Armed with a deep understanding of risk assessment models "
54
- "and market dynamics, this agent scrutinizes the potential "
55
- "risks of proposed trades. It offers a detailed analysis of "
56
- "risk exposure and suggests safeguards to ensure that "
57
- "trading activities align with the firm’s risk tolerance.",
58
- verbose=True,
59
- allow_delegation=True,
60
- tools = [scrape_tool, search_tool]
61
- )
 
 
1
  from crewai import Agent, Task, Crew
2
 
3
+ class Agents:
4
+ def get_data_analyst_agent():
5
+ return Agent(
6
+ role="Data Analyst",
7
+ goal="Monitor and analyze market data in real-time "
8
+ "to identify trends and predict market movements.",
9
+ backstory="Specializing in financial markets, this agent "
10
+ "uses statistical modeling and machine learning "
11
+ "to provide crucial insights. With a knack for data, "
12
+ "the Data Analyst Agent is the cornerstone for "
13
+ "informing trading decisions.",
14
+ verbose=True,
15
+ allow_delegation=True,
16
+ tools = [scrape_tool, search_tool]
17
+ )
18
+
19
+ def get_trading_strategy_agent():
20
+ return Agent(
21
+ role="Trading Strategy Developer",
22
+ goal="Develop and test various trading strategies based "
23
+ "on insights from the Data Analyst Agent.",
24
+ backstory="Equipped with a deep understanding of financial "
25
+ "markets and quantitative analysis, this agent "
26
+ "devises and refines trading strategies. It evaluates "
27
+ "the performance of different approaches to determine "
28
+ "the most profitable and risk-averse options.",
29
+ verbose=True,
30
+ allow_delegation=True,
31
+ tools = [scrape_tool, search_tool]
32
+ )
33
+
34
+ def get_execution_agent():
35
+ return Agent(
36
+ role="Trade Advisor",
37
+ goal="Suggest optimal trade execution strategies "
38
+ "based on approved trading strategies.",
39
+ backstory="This agent specializes in analyzing the timing, price, "
40
+ "and logistical details of potential trades. By evaluating "
41
+ "these factors, it provides well-founded suggestions for "
42
+ "when and how trades should be executed to maximize "
43
+ "efficiency and adherence to strategy.",
44
+ verbose=True,
45
+ allow_delegation=True,
46
+ tools = [scrape_tool, search_tool]
47
+ )
48
+
49
+ def get_risk_management_agent():
50
+ return Agent(
51
+ role="Risk Advisor",
52
+ goal="Evaluate and provide insights on the risks "
53
+ "associated with potential trading activities.",
54
+ backstory="Armed with a deep understanding of risk assessment models "
55
+ "and market dynamics, this agent scrutinizes the potential "
56
+ "risks of proposed trades. It offers a detailed analysis of "
57
+ "risk exposure and suggests safeguards to ensure that "
58
+ "trading activities align with the firm’s risk tolerance.",
59
+ verbose=True,
60
+ allow_delegation=True,
61
+ tools = [scrape_tool, search_tool]
62
+ )