File size: 2,938 Bytes
56daaee
 
30ae45a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
61
62
from crewai import Agent, Task, Crew

class Agents:
    def get_data_analyst_agent():
        return Agent(
            role="Data Analyst",
            goal="Monitor and analyze market data in real-time "
                 "to identify trends and predict market movements.",
            backstory="Specializing in financial markets, this agent "
                      "uses statistical modeling and machine learning "
                      "to provide crucial insights. With a knack for data, "
                      "the Data Analyst Agent is the cornerstone for "
                      "informing trading decisions.",
            verbose=True,
            allow_delegation=True,
            tools = [scrape_tool, search_tool]
        )
    
    def get_trading_strategy_agent():
        return Agent(
            role="Trading Strategy Developer",
            goal="Develop and test various trading strategies based "
                 "on insights from the Data Analyst Agent.",
            backstory="Equipped with a deep understanding of financial "
                      "markets and quantitative analysis, this agent "
                      "devises and refines trading strategies. It evaluates "
                      "the performance of different approaches to determine "
                      "the most profitable and risk-averse options.",
            verbose=True,
            allow_delegation=True,
            tools = [scrape_tool, search_tool]
        )
    
    def get_execution_agent():
        return Agent(
            role="Trade Advisor",
            goal="Suggest optimal trade execution strategies "
                 "based on approved trading strategies.",
            backstory="This agent specializes in analyzing the timing, price, "
                      "and logistical details of potential trades. By evaluating "
                      "these factors, it provides well-founded suggestions for "
                      "when and how trades should be executed to maximize "
                      "efficiency and adherence to strategy.",
            verbose=True,
            allow_delegation=True,
            tools = [scrape_tool, search_tool]
        )
    
    def get_risk_management_agent():
        return Agent(
            role="Risk Advisor",
            goal="Evaluate and provide insights on the risks "
                 "associated with potential trading activities.",
            backstory="Armed with a deep understanding of risk assessment models "
                      "and market dynamics, this agent scrutinizes the potential "
                      "risks of proposed trades. It offers a detailed analysis of "
                      "risk exposure and suggests safeguards to ensure that "
                      "trading activities align with the firm’s risk tolerance.",
            verbose=True,
            allow_delegation=True,
            tools = [scrape_tool, search_tool]
        )