bstraehle commited on
Commit
0137668
·
verified ·
1 Parent(s): d6269a1

Update agents.py

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