Chúng tôi không thể tìm thấy kết nối internet
Đang cố gắng kết nối lại
Có lỗi xảy ra!
Hãy kiên nhẫn trong khi chúng tôi khắc phục sự cố
Xây dựng Quỹ Đầu Cơ AI để Phân tích Cổ phiếu bằng Python (LangChain + Perplexity Sonar)
This tutorial demonstrates how you can build an AI agent workflow in Python that simulates a financial hedge fund, using LangChain and the Perplexity Sonar API. Most agentic AI workflows rely on external tool calls for web browsing, but the Perplexity Sonar Reasoning model incorporates real-time internet access in its boosted DeepSeek-R1 model. AI agent building cheat code!
We’ll create a modular AI pipeline where specialized AI agents retrieve real-time market data, analyze sentiment, assess macroeconomic trends, develop a trading strategy, and evaluate risk.
This workflow is just the beginning. You can expand it by incorporating alternative data sources, specify an investment thesis, and add additional AI agents that mimic other types of financial analysts. You could also automate this code to quickly gather investment strategies for multiple stocks.
****Important Note: This video is not financial or investing advice. It is an educational tutorial on how to automate financial data collection and use AI/LLM models in Python. Also, don't blindly trust the results of LLM model results without critical thinking or subject matter expertise 🧠. LLM's are still experimental technology that have high error rates.****
If you find this helpful :
- **Like (👍)**
- Comment
- **Subscribe**
- **Subscribe for FREE to the Deep Charts Newsletter** -- https://deepcharts.substack.com/
**Full Code**
- https://deepcharts.substack.com/p/build-an-ai-hedge-fund-for-stock
- Environment (Python 3.9): pip install langchain==0.3.19 langchain-community==0.3.18 openai==1.65.2 ipykernel==6.29.5
**Resources**
LangChain docs: https://python.langchain.com/docs/introduction/
Perplexity Sonar: https://sonar.perplexity.ai/
**Chapters**
0:00 Introduction
0:36 AI Agent Hedge Fund Workflow
1:20 AI Stack for the current analysis: LangChain and Perplexity Sonar
2:05 Disclaimer: For Educational Purposes Only
2:28 How to set up an API key from the Perplexity Sonar API
3:12 Python Environment Setup
3:25 How to call Perplexity Sonar with LangChain
4:17 How to setup an AI agent pipeline with LangChain
6:14 How to use SequentialChain function in LangChain
6:50 Execute the full AI Hedge Fund Pipeline
7:36 Evaluation of the results
Dịch Vào Lúc: 2025-03-08T17:49:31Z