Spaces:
Running
Running
Update crypto__analysis_tasks.py
Browse files- crypto__analysis_tasks.py +103 -82
crypto__analysis_tasks.py
CHANGED
|
@@ -1,83 +1,104 @@
|
|
| 1 |
-
from crewai import Task
|
| 2 |
-
from textwrap import dedent
|
| 3 |
-
|
| 4 |
-
class CryptoAnalysisTasks:
|
| 5 |
-
def market_research(self, agent, crypto):
|
| 6 |
-
return Task(description=dedent(f"""
|
| 7 |
-
Conduct comprehensive market research on {crypto}.
|
| 8 |
-
Analyze its current market position, recent price movements,
|
| 9 |
-
and overall market sentiment. Include information about its
|
| 10 |
-
technology, use cases, and any recent developments or partnerships.
|
| 11 |
-
|
| 12 |
-
Your final answer MUST be a detailed report that includes:
|
| 13 |
-
1. Current market status
|
| 14 |
-
2. Recent price analysis
|
| 15 |
-
3. Market sentiment overview
|
| 16 |
-
4. Key technological aspects and use cases
|
| 17 |
-
5. Recent news and developments
|
| 18 |
-
|
| 19 |
-
Make sure to use the most recent data possible.
|
| 20 |
-
|
| 21 |
-
Selected cryptocurrency: {crypto}
|
| 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 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
)
|
|
|
|
| 1 |
+
from crewai import Task
|
| 2 |
+
from textwrap import dedent
|
| 3 |
+
|
| 4 |
+
class CryptoAnalysisTasks:
|
| 5 |
+
def market_research(self, agent, crypto):
|
| 6 |
+
return Task(description=dedent(f"""
|
| 7 |
+
Conduct comprehensive market research on {crypto}.
|
| 8 |
+
Analyze its current market position, recent price movements,
|
| 9 |
+
and overall market sentiment. Include information about its
|
| 10 |
+
technology, use cases, and any recent developments or partnerships.
|
| 11 |
+
|
| 12 |
+
Your final answer MUST be a detailed report that includes:
|
| 13 |
+
1. Current market status
|
| 14 |
+
2. Recent price analysis
|
| 15 |
+
3. Market sentiment overview
|
| 16 |
+
4. Key technological aspects and use cases
|
| 17 |
+
5. Recent news and developments
|
| 18 |
+
|
| 19 |
+
Make sure to use the most recent data possible.
|
| 20 |
+
|
| 21 |
+
Selected cryptocurrency: {crypto}
|
| 22 |
+
"""),
|
| 23 |
+
expected_output="A detailed report covering the current market status, recent price analysis, market sentiment overview, key technological aspects and use cases, and recent news and developments.",
|
| 24 |
+
agent=agent
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
def technical_analysis(self, agent):
|
| 28 |
+
return Task(description=dedent(f"""
|
| 29 |
+
Perform a thorough technical analysis of the cryptocurrency.
|
| 30 |
+
Examine key technical indicators such as RSI, moving averages,
|
| 31 |
+
and trading volumes. Identify potential support and resistance levels.
|
| 32 |
+
|
| 33 |
+
Your final report MUST include:
|
| 34 |
+
1. Analysis of key technical indicators
|
| 35 |
+
2. Identification of chart patterns
|
| 36 |
+
3. Support and resistance levels
|
| 37 |
+
4. Volume analysis
|
| 38 |
+
5. Short-term and long-term price projections based on technical factors
|
| 39 |
+
|
| 40 |
+
Ensure your analysis is based on the most recent market data.
|
| 41 |
+
"""),
|
| 42 |
+
expected_output="A technical analysis report that includes key technical indicators, chart patterns, support and resistance levels, volume analysis, and price projections.",
|
| 43 |
+
agent=agent
|
| 44 |
+
)
|
| 45 |
+
|
| 46 |
+
def sentiment_analysis(self, agent):
|
| 47 |
+
return Task(description=dedent(f"""
|
| 48 |
+
Conduct a sentiment analysis of the cryptocurrency across various platforms.
|
| 49 |
+
Analyze social media trends, news sentiment, and community engagement.
|
| 50 |
+
|
| 51 |
+
Your final answer must be a comprehensive report that includes:
|
| 52 |
+
1. Overall sentiment score
|
| 53 |
+
2. Analysis of social media trends
|
| 54 |
+
3. News sentiment overview
|
| 55 |
+
4. Community engagement metrics
|
| 56 |
+
5. Any notable shifts in sentiment and potential reasons
|
| 57 |
+
|
| 58 |
+
Use the most recent data and consider both quantitative and qualitative factors.
|
| 59 |
+
"""),
|
| 60 |
+
expected_output="""
|
| 61 |
+
A comprehensive sentiment analysis report that includes:
|
| 62 |
+
1. An overall sentiment score for the cryptocurrency.
|
| 63 |
+
2. Detailed analysis of social media trends related to the cryptocurrency.
|
| 64 |
+
3. Overview of the sentiment reflected in news articles and reports.
|
| 65 |
+
4. Metrics and insights on community engagement (e.g., forum discussions, user activity).
|
| 66 |
+
5. Any notable shifts in sentiment, along with potential reasons or events that caused these changes.
|
| 67 |
+
""",
|
| 68 |
+
agent=agent
|
| 69 |
+
)
|
| 70 |
+
|
| 71 |
+
def recommend(self, agent):
|
| 72 |
+
return Task(description=dedent(f"""
|
| 73 |
+
Review and synthesize the analyses provided by the Market Analyst
|
| 74 |
+
and Technical Analyst. Combine these insights to form a comprehensive
|
| 75 |
+
investment recommendation.
|
| 76 |
+
|
| 77 |
+
Consider all aspects, including market trends, technical indicators,
|
| 78 |
+
sentiment analysis, and fundamental factors.
|
| 79 |
+
|
| 80 |
+
Your final answer MUST be a detailed investment recommendation report for your client. It should include:
|
| 81 |
+
1. Executive summary
|
| 82 |
+
2. Market analysis recap
|
| 83 |
+
3. Technical analysis insights
|
| 84 |
+
4. Sentiment analysis overview
|
| 85 |
+
5. Risk assessment
|
| 86 |
+
6. Short-term and long-term price projections
|
| 87 |
+
7. Clear investment strategy and recommendations
|
| 88 |
+
8. Potential scenarios and their impacts
|
| 89 |
+
|
| 90 |
+
Provide a well-formatted, comprehensive report that a client can use to make informed decisions.
|
| 91 |
+
"""),
|
| 92 |
+
expected_output="""
|
| 93 |
+
A detailed investment recommendation report that includes:
|
| 94 |
+
1. An executive summary summarizing the key findings and recommendations.
|
| 95 |
+
2. A recap of the market analysis, highlighting key market trends and their implications.
|
| 96 |
+
3. Insights from the technical analysis, including key indicators and price projections.
|
| 97 |
+
4. Overview of sentiment analysis results, summarizing public and community sentiment.
|
| 98 |
+
5. A thorough risk assessment that outlines potential risks and their impact.
|
| 99 |
+
6. Short-term and long-term price projections based on both market and technical analysis.
|
| 100 |
+
7. A clear and actionable investment strategy, with specific recommendations.
|
| 101 |
+
8. Analysis of potential scenarios (e.g., bullish, bearish) and how they might impact the investment strategy.
|
| 102 |
+
""",
|
| 103 |
+
agent=agent
|
| 104 |
)
|