中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁(yè) > news >正文

織夢(mèng)網(wǎng)站識(shí)別合肥seo管理

織夢(mèng)網(wǎng)站識(shí)別,合肥seo管理,藥品網(wǎng)上商城,溫嶺網(wǎng)站制作文章目錄 前言一、生態(tài)系統(tǒng)1. 金融AI代理(Financial AI Agents)2. 金融大型語(yǔ)言模型(Financial LLMs)3. LLMOps4. 數(shù)據(jù)操作(DataOps)5. 多源LLM基礎(chǔ)模型(Multi-Source LLM Foundation Models&am…

文章目錄

  • 前言
  • 一、生態(tài)系統(tǒng)
    • 1. 金融AI代理(Financial AI Agents)
    • 2. 金融大型語(yǔ)言模型(Financial LLMs)
    • 3. LLMOps
    • 4. 數(shù)據(jù)操作(DataOps)
    • 5. 多源LLM基礎(chǔ)模型(Multi-Source LLM Foundation Models)
    • 6. Agent工作流
      • 1. 感知模塊(Perception)
      • 2.大腦模塊(Brain)
      • 3.行動(dòng)模塊(Action)
  • 二、示例代碼解釋
    • 1. demo
    • 2. 小弟各司其職
  • 三. 測(cè)試
    • 1. Market Forecaster Agent (Predict Stock Movements Direction)
    • 2.Financial Analyst Agent for Report Writing (Equity Research Report)
    • 3. 補(bǔ)充10-K干嘛的
  • 四. 總結(jié)

前言

FinRobot 是一個(gè)超越 FinGPT 范圍的人工智能代理平臺(tái),代表為金融應(yīng)用精心設(shè)計(jì)的全面解決方案。它整合了多種人工智能技術(shù),遠(yuǎn)遠(yuǎn)不止是簡(jiǎn)單的語(yǔ)言模型。這種宏大的愿景突出了平臺(tái)的多功能性和適應(yīng)性,能夠滿(mǎn)足金融行業(yè)的多樣化需求。
AI 代理的概念:
AI 代理是一種智能實(shí)體,它以大型語(yǔ)言模型作為“大腦”,感知環(huán)境、做出決策并執(zhí)行行動(dòng)。與傳統(tǒng)人工智能不同,AI 代理具備獨(dú)立思考的能力,并能夠利用工具逐步實(shí)現(xiàn)既定目標(biāo)。
本文主要講明白,這東西有啥用,怎么構(gòu)成的以及怎么用。

一、生態(tài)系統(tǒng)

示例:pandas 是基于NumPy 的一種工具,該工具是為了解決數(shù)據(jù)分析任務(wù)而創(chuàng)建的。
這張圖展示了 FinRobot 生態(tài)系統(tǒng),這是一個(gè)使用大型語(yǔ)言模型(LLMs)進(jìn)行金融應(yīng)用的開(kāi)源AI代理平臺(tái)。圖中分為幾個(gè)主要部分,每個(gè)部分都有特定的功能和作用。以下是對(duì)圖中每個(gè)部分的詳細(xì)分析:

1. 金融AI代理(Financial AI Agents)

這部分展示了FinRobot平臺(tái)支持的不同類(lèi)型的AI代理,這些代理用于執(zhí)行特定的金融任務(wù):
市場(chǎng)預(yù)測(cè)代理(Market Forecasting Agents):包括交易策略代理(Trading Strategist Agent)、多模態(tài)代理(Multimodal Agent)、全球股票市場(chǎng)代理(Global Stock Market Agent)。
文檔分析與生成代理(Document Analysis & Generation Agents):包括收益報(bào)告分析代理(Earnings Report Analysis Agent)、財(cái)務(wù)報(bào)告生成代理(Financial Report Generation Agent)、風(fēng)險(xiǎn)評(píng)估代理(Risk Assessment)、報(bào)告分析代理(Report Analysis Agent)、股票研究報(bào)告生成代理(Equity Research Report Generation Agent)。

2. 金融大型語(yǔ)言模型(Financial LLMs)

這部分展示了支持FinRobot平臺(tái)的不同類(lèi)型的金融大型語(yǔ)言模型(LLMs):
金融多模態(tài)LLMs(Financial Multimodal LLMs)
金融強(qiáng)化學(xué)習(xí)(FinRL)
金融機(jī)器學(xué)習(xí)(FinML)
金融大型語(yǔ)言模型(FinGPT)

3. LLMOps

這部分展示了用于管理和優(yōu)化大型語(yǔ)言模型的操作工具:
提示工程(Prompt Engineering)
持續(xù)集成/持續(xù)部署(CI/CD)
模型部署(Model Deployment)
模型評(píng)估(Model Evaluation)
指令調(diào)整(Instruction Tuning)
RLHF(Reinforcement Learning from Human Feedback)
智能調(diào)度器(Smart Scheduler)

4. 數(shù)據(jù)操作(DataOps)

這部分展示了用于處理和分析金融數(shù)據(jù)的工具和技術(shù):
金融數(shù)據(jù)與金融自然語(yǔ)言處理(Financial Data & FinNLP)
市場(chǎng)新聞(Market News)
社交媒體(Social Media)
市場(chǎng)情緒(Market Sentiment)
金融比率(Financial Ratios)
FinRL-Meta
表格數(shù)據(jù)(Tabular Data)
Gym環(huán)境(Gym Env)
非結(jié)構(gòu)化數(shù)據(jù)(Unstructured Data)
第三方API(Third Party API)
向量數(shù)據(jù)庫(kù)(Vector Database)
RAG(Retrieval-Augmented Generation)
知識(shí)圖譜(Knowledge Graph)

5. 多源LLM基礎(chǔ)模型(Multi-Source LLM Foundation Models)

這部分展示了FinRobot平臺(tái)支持的多種基礎(chǔ)模型,這些模型提供了底層的語(yǔ)言處理能力:
Llama3
ChatGLM3
Qwen
Falcon
ChatGPT
Gemma
Baichuan
InternLM
Mistral

6. Agent工作流

在這里插入圖片描述

1. 感知模塊(Perception)

該模塊通過(guò)復(fù)雜的手段捕捉并解釋來(lái)自市場(chǎng)數(shù)據(jù)流、新聞和經(jīng)濟(jì)指標(biāo)的多模態(tài)金融數(shù)據(jù),將數(shù)據(jù)結(jié)構(gòu)化以便進(jìn)行深入分析。

2.大腦模塊(Brain)

作為核心處理單元,該模塊利用大型語(yǔ)言模型(LLMs)感知來(lái)自感知模塊的數(shù)據(jù),并通過(guò)金融思維鏈(Chain-of-Thought, CoT)流程生成結(jié)構(gòu)化的指令。

3.行動(dòng)模塊(Action)

該模塊執(zhí)行來(lái)自大腦模塊的指令,運(yùn)用工具將分析洞察轉(zhuǎn)化為可執(zhí)行的結(jié)果。行動(dòng)包括交易、調(diào)整投資組合、生成報(bào)告或發(fā)送警報(bào),從而積極影響金融環(huán)境。

二、示例代碼解釋

1. demo

在這里插入圖片描述
其中每一份報(bào)告都對(duì)應(yīng)一個(gè)初級(jí)版本和一個(gè)高級(jí)版本,初級(jí)的主要是針對(duì)普通用戶(hù),也就是絕大部分散戶(hù)。高級(jí)主要專(zhuān)家級(jí)別,主要服務(wù)對(duì)象是從事金融行業(yè)。
應(yīng)用場(chǎng)景也可以根據(jù)需要在demo代碼的基礎(chǔ)上修改。
年度報(bào)告分析代理.ipynb
財(cái)務(wù)預(yù)測(cè)代理.ipynb
交易策略代理.ipynb
基于Matplotlib Finance的LLM代理.ipynb
基于簡(jiǎn)單移動(dòng)平均交叉的LLM優(yōu)化代理.ipynb

2. 小弟各司其職

每一個(gè)agent就代表一個(gè)打工者,每個(gè)具體的崗位就是name,system_message,就是該崗位需要負(fù)責(zé)哪些任務(wù),也可以說(shuō)是給agent的指令。description小弟的個(gè)人簡(jiǎn)介。model,根據(jù)需要可以設(shè)置不用大模型

agent_configs": [{"name": "financial_data_analyst","model": "gpt-4","system_message": "You are now in a group chat. As a financial_data_analyst, you are tasked with particular responsibilities that will need your analytical and Python programming skills. Be ready to:\n\n    1. Make use of Python to gather relevant data. This could be information on specific companies, such as the company profile, recent stock price fluctuations, market news, and financial basics. The Python code should be able to output this necessary information. For instance, it may need to browse or search the web, download/read a file or print the content of a webpage or a file.\n\n    2. Use the gathered data to provide a well-informed analysis of the company. This may involve understanding current positive developments and potential concerns. You may also need to make a rough prediction of the next week's stock price (e.g., up by 2-3%) and provide an elaborative summary of the reasons. This task may necessitate the use of both your data analysis skills and your language proficiency to effectively convey the outcomes of your analysis.\n\n    3. Ensure clarity when using Python to solve a task, specifically by explaining your plan beforehand. Indicate when you will use code and when you will use your language skills. For example, the code may be used to extract financial data so that you can utilize your language skills for the analysis part.\n\n    4. Eliminate the necessity for the user to make changes to your code. Make sure your Python code is complete and doesn't call for modifications by the user. Also, ensure the code can run independently and avoid including anything that could prompt the user to copy and paste the result.\n\n    5. Be diligent in checking the execution results returned by the user. If there is an error, fix it, and if the error can't be fixed or the task isn't solved, think of a different approach. You can then output the full corrected code once again. \n\n    6. At the end of your tasks, remember to verify your answers with evidence where possible. When you are confident that your work is complete and correct, reply with \"TERMINATE.\"\n\nRemember, when puzzled, it's ok to communicate the issue to your group chat manager who will help guide you through or assign someone else to tackle the task.","description": "A financial data analyst is a specialized professional who collects, monitors, and creates reports from complex data sets to help a business in decision-making processes. This position should be filled by someone with strong analytical skills, a solid understanding of financial market trends, and proficiency in data analysis tools like Microsoft Excel or SQL. They should also have a keen attention to detail and the ability to communicate complicated data in understandable ways."},{"name": "market_news_researcher","model": "gpt-4","system_message": "You are now in a group chat. Your task is to complete a market research study with other participants. As a market_news_researcher, you are expected to have strong skills in Python programming, financial analysis, market research, and the ability to analyze and interpret complex data.\n\n    1. Information Collection: Use your programming skills to gather relevant data. This may involve accessing financial data and market news from online sources, reading and downloading files, or retrieving the latest stock prices. Ascertain that the output of the data you need (for instance, company profile, stock price fluctuations, and market news about the specified company) is printed on your Python console. All required data should be gathered before attempting to solve the task based on your insights.\n        \n    2. Task Execution: Use your programming skills to conduct necessary financial analyses, interpret complex financial data, and predict stock price movements. Make sure your Python code outputs the results of your analyses and provides a clear explanation of your findings. You should also specify your predictions for next week's stock price and provide a summary of the reasoning behind your predictions.\n        \n    3. Planning: Clearly outline your plan before starting to perform your task. Communicate how you intend to collect and analyze the collected data, how you will program your Python code to predict future prices, and how you plan to execute your task step by step.\n        \n    4. Error Handling: If you encounter an error when executing your Python code, rectify the error and provide the corrected Python code. Ensure that the modified Python code is complete and doesn't require the user to make adjustments. If the error persists, rethink your approach, gather additional data if necessary, and devise an alternative strategy.\n        \n    5. Verification: After obtaining results, carefully verify your findings. If possible, provide supporting evidence in your response.\n        \nThe conversation concludes when your research is successfully completed and the task has been fully accomplished. At this point, reply \"TERMINATE\". Before ending the conversation, you must ensure that the user is fully satisfied with your analysis and predictions. If you are unsure or confused, you are encouraged to ask the group chat manager for assistance and let them choose another participant.","description": "A market news researcher is a professional who stays updated with all the latest developments and trends in the market. They should possess strong analytical and research skills, along with a good understanding of business and finance. They should also have excellent communication skills to convincingly explain and debate about their findings and analysis in a group chat."},{"name": "python_programmer","model": "gpt-4","system_message": "You are now in a group chat. You have been assigned a task along with other participants. As a Python programmer, your primary role is to program solutions for data collection, analysis, and estimation tasks related to a specified company's stock.\n\nWhen there is a need to gather information, such as a company's profile, stock price history, market news, and basic financials, utilize your coding skills to achieve this. Use python code to browse or search the web, download or read relevant files, or pull the desired data from financial websites. Instead of relying on others in the group to provide this information, your code should independently fetch it. Always use a single piece of robust, comprehensive code that the users can run without needing to modify anything.\n\nWith the collected data, analyze the current positive developments and potential concerns of the specified company. Use python programs to automate your data analysis where possible and compile your observations and inferences into a clear and concise summary.\n\nBased on the data and your analysis, develop a predictive model using Python to estimate the stock's price change for the next week. Explain your model's rationale and output a numerical estimate, e.g., \"up by 2-3%\". All code should be designed to execute as standalone programs and should avoid the use of charts or visualizations.\n\nOnce your code has achieved the task at hand, carefully verify its output against reliable sources. Include any evidence or references that support your findings.\n\nWhen encountering problems or uncertainties, engage with the group chat and ask for assistance from the group chat manager. Similarly, if a code execution returns errors or does not solve the task satisfactorily, diagnose the issue, correct your assumptions, gather additional necessary information and generate a new approach with python programs.\n\nUpon completion of your tasks, ensuring the satisfaction of user's needs and the correctness of your solutions, respond with \"TERMINATE\".","description": "A Python programmer is a highly skilled individual with expertise in Python, who can write, test, debug and improve Python code. They possess the ability to detect critical programming and logic errors, thereby contributing effectively to group discussions by providing accurate answers or code corrections. They require strong problem-solving skills, a firm understanding of data structures, algorithms, and software development principles in the Python language."},{"name": "stock_price_estimator","model": "gpt-4","system_message": "You are a diligent member of a team focused on stock price estimation. Using your knowledge on data sourcing and analytical skills, you will aid in gathering essential company information through programming in Python. Conduct thorough research on specific company profiles (e.g., AAPL), monitoring recent stock price fluctuations, keeping up-to-date with market news, and understanding financial fundamentals. \n\nBased on your analysis, you will aim to predict the next week's stock price with a rough estimate (e.g., up 2-3%). Notably, your role involves creating and executing standalone python programs, generating summary explanations of stock trend reasons without resorting to graphical chart representations.\n\nCarefully, step-by-step:\n\n1. Employ your Python coding skills to gather necessary information. You can accomplish this by scripting to search the web, download/read and print the content of files, pages, current time/date, and check the operating system specifics. Execute your scripts and share the output.\n\n2. Utilize your analytical language skills to prepare comprehensive reports detailing positive developments and potential concerns based on the data available.\n\n3. Use your attention to detail to meticulously check the execution results given by other team members. If there is an error, identify and correct it, then output the comprehensive and correct Python program. In case the analysis is not complete or an error is unfixable with the current data or approach, notify the team, gather additional information as needed, and propose a different method.\n\n4. After successfully analysing and estimating a stock\u2019s price movement, ensure to verify your estimations carefully. If possible, include convincing evidence in your report.\n\n5. Instigate the termination of a task phase once you're confident the task is complete, knowing that the final decision rests with the group chat manager. \n\n6. If stumped or uncertain, refrain from hesitation. Seek guidance from the group chat manager who will direct another participant to aid you.\n\nBear in mind; coding skills are limited to Python. You are encouraged to doubt previous messages or codes in the group chat and provide corrected code if there is no output after execution. Engage in healthy team communication, negotiate doubts and difficulties, and seek assistance when needed.","description": "A stock price estimator is a financial expert who specializes in financial modeling, data analysis and has a profound understanding of financial markets. The incumbent should have strong skills in Python for analyzing data and building prediction models, with the ability to scrutinize previous messages or code in a group chat and provide revisions if uncertainties appear. Familiarity with statistical modeling tools and concepts, such as regression, time-series analysis, as well as machine learning techniques, are substantial for this role."},{"name": "financial_report_writer","model": "gpt-4","system_message": "You are now in a group chat. Your role is to complete a task with other participants. As a financial report writer specialized in analyzing company stock performances, you will use your Python programming skills to collect, analyze, and summarize relevant data pertaining to a specified company's market position and stock price trends. \n\nYou are expected to perform the following functions:\n\n    1. Gather necessary information such as a company's profile, recent stock price fluctuations, market news, and financial basics about the company. You will leverage your Python programming skills to develop codes that download, read, and print the desired content from the web.\n\n    2. After collecting the relevant information, use your financial analytical skills to evaluate the company's current positive developments and potential concerns. Your evaluation should be based on the data you have gathered.\n\n    3. When your analysis is complete, give a rough estimate (e.g., up by 2-3%) for the next week's stock price. You should also provide a summary of the reasons for your prediction.\n\n    4. Make sure every Python program you create will execute on its own. Avoid designing programs that require the user to modify your code. Each Python program you suggest should not involve chart plotting.\n\n    5. If an error occurs while running the code, you should correct the error and output the corrected code again. If the error can't be fixed or if the task isn't solved even after the code runs successfully, use your analytical skills to identify the problem and come up with an alternative approach.\n\n    6. Verify your answer carefully before presenting it. Include evidence to validate your findings, where possible.\n\n    7. If you face any confusion during the task, seek assistance from the group chat manager. If you think your task is complete and satisfactory, please reply \"TERMINATE\".","description": "A financial report writer is a professional with strong analytical skills, expertise in financial data analysis and capable of creating concise, accurate reports. This position requires proficiency in financial software, a keen understanding of financial concepts and excellent writing skills to effectively compile and present financial data. They should also possess effective communication skills and the ability to question and clarify any doubtful financial data or information shared in the group chat."}

三. 測(cè)試

地址:
https://github.com/AI4Finance-Foundation/FinRobot
環(huán)境配置,更多介紹可以git上查看,運(yùn)行代碼前需要有三個(gè)key去配置,一個(gè)openai,2個(gè)和財(cái)經(jīng)相關(guān)。
add your own finnhub-api “YOUR_FINNHUB_API_KEY”
add your own financialmodelingprep and sec-api keys “YOUR_FMP_API_KEY” and “YOUR_SEC_API_KEY” (for financial report generation)
這個(gè)都是私有,需要自己申請(qǐng)。

1. Market Forecaster Agent (Predict Stock Movements Direction)

市場(chǎng)預(yù)測(cè)代理(Market Forecaster Agent)是FinRobot平臺(tái)中的一個(gè)功能,它能夠分析公司的股票代碼、最新財(cái)務(wù)數(shù)據(jù)和市場(chǎng)新聞,預(yù)測(cè)其股票走勢(shì)。這一功能對(duì)于投資者和分析師來(lái)說(shuō)非常有價(jià)值,因?yàn)樗峁┝藢?duì)公司股票未來(lái)表現(xiàn)的洞察。

import autogen
from finrobot.utils import get_current_date, register_keys_from_json
from finrobot.agents.workflow import SingleAssistant# Read OpenAI API keys from a JSON file
llm_config = {"config_list": autogen.config_list_from_json("../OAI_CONFIG_LIST",filter_dict={"model": ["gpt-4-0125-preview"]},),"timeout": 120,"temperature": 0,
}# Register FINNHUB API keys
register_keys_from_json("../config_api_keys")company = "NVDA"assitant = SingleAssistant("Market_Analyst",llm_config,# set to "ALWAYS" if you want to chat instead of simply receiving the predicitonhuman_input_mode="NEVER",
)
assitant.chat(f"Use all the tools provided to retrieve information available for {company} upon {get_current_date()}. Analyze the positive developments and potential concerns of {company} ""with 2-4 most important factors respectively and keep them concise. Most factors should be inferred from company related news. "f"Then make a rough prediction (e.g. up/down by 2-3%) of the {company} stock price movement for next week. Provide a summary analysis to support your prediction."
)

運(yùn)行代碼以后,會(huì)先自動(dòng)去下載一個(gè)NLTK 的 punkt 數(shù)據(jù)包(用于分詞),然后它會(huì)自動(dòng)解壓,解壓后的目錄包含預(yù)訓(xùn)練的分詞模型和相關(guān)元數(shù)據(jù)。

(autogen_env) root@autodl-container-f111409ec6-08df088d:~/autodl-tmp/FinRobot/test# python test1.py
[nltk_data] Downloading package punkt to /root/nltk_data...
[nltk_data]   Unzipping tokenizers/punkt.zip.
[nltk_data] Downloading package averaged_perceptron_tagger to
[nltk_data]     /root/nltk_data...

在這里插入圖片描述
如果配置文件里沒(méi)有api-key,打印出提示信息。

(autogen_env) root@autodl-container-f111409ec6-08df088d:~/autodl-tmp/FinRobot/test# python test1.py
[nltk_data] Downloading package punkt to /root/nltk_data...
[nltk_data]   Unzipping tokenizers/punkt.zip.
[nltk_data] Downloading package averaged_perceptron_tagger to
[nltk_data]     /root/nltk_data...
[nltk_data]   Unzipping taggers/averaged_perceptron_tagger.zip.
[autogen.oai.client: 03-01 02:40:35] {307} WARNING - The API key specified is not a valid OpenAI format; it won't work with the OpenAI-hosted model.
[autogen.oai.client: 03-01 02:40:35] {307} WARNING - The API key specified is not a valid OpenAI format; it won't work with the OpenAI-hosted model.
User_Proxy (to Market_Analyst):
Use all the tools provided to retrieve information available for NVDA upon 2025-03-01. Analyze the positive developments and potential concerns of NVDA with 2-4 most important factors respectively and keep them concise. Most factors should be inferred from company related news. Then make a rough prediction (e.g. up/down by 2-3%) of the NVDA stock price movement for next week. Provide a summary analysis to support your prediction.
utogen_env/lib/python3.10/site-packages/openai/_base_client.py", line 1033, in _requestreturn self._retry_request(File "/root/miniconda3/envs/autogen_env/lib/python3.10/site-packages/openai/_base_client.py", line 1111, in _retry_requestreturn self._request(File "/root/miniconda3/envs/autogen_env/lib/python3.10/site-packages/openai/_base_client.py", line 1043, in _requestraise APIConnectionError(request=request) from err
openai.APIConnectionError: Connection error.

分別在config_list和api_key里加入相應(yīng)的值。
在這里插入圖片描述
在這里插入圖片描述
再次運(yùn)行,可以看到已經(jīng)出現(xiàn)Market_Analyst給出的信息,后面又給了一個(gè)錯(cuò)誤信息,Error: FinnhubAPIException(status_code: 401): Invalid API key。官方介紹的文檔里,提到3個(gè)key必須填,看來(lái)還漏了一個(gè)key,對(duì)于這份代碼,Finnhub也是必須的。

(autogen_env) root@autodl-container-f111409ec6-08df088d:~/autodl-tmp/FinRobot/test# python test1.pyUser_Proxy (to Market_Analyst):Use all the tools provided to retrieve information available for NVDA upon 2025-03-01. Analyze the positive developments and potential concerns of NVDA with 2-4 most important factors respectively and keep them concise. Most factors should be inferred from company related news. Then make a rough prediction (e.g. up/down by 2-3%) of the NVDA stock price movement for next week. Provide a summary analysis to support your prediction.--------------------------------------------------------------------------------
Market_Analyst (to User_Proxy):***** Suggested tool call (chatcmpl-uY6H36uQN976z6im3mESZRAb4Zqbx): get_company_profile *****
Arguments: 
{"symbol": "NVDA"}
*********************************************************************************************
***** Suggested tool call (chatcmpl-uY6H36uQN976z6im3mESZRAb4Zqbx): get_company_news *****
Arguments: 
{"end_date": "2025-03-01", "start_date": "2025-02-01", "symbol": "NVDA"}
******************************************************************************************
***** Suggested tool call (chatcmpl-uY6H36uQN976z6im3mESZRAb4Zqbx): get_basic_financials *****
Arguments: 
{"symbol": "NVDA"}
**********************************************************************************************
***** Suggested tool call (chatcmpl-uY6H36uQN976z6im3mESZRAb4Zqbx): get_stock_data *****
Arguments: 
{"end_date": "2025-03-01", "start_date": "2025-02-01", "symbol": "NVDA"}
****************************************************************************************-------------------------------------------------------------------------------->>>>>>>> EXECUTING FUNCTION get_company_news...
Call ID: chatcmpl-uY6H36uQN976z6im3mESZRAb4Zqbx
Input arguments: {'end_date': '2025-03-01', 'start_date': '2025-02-01', 'symbol': 'NVDA'}
Finnhub client initialized>>>>>>>> EXECUTING FUNCTION get_stock_data...
Call ID: chatcmpl-uY6H36uQN976z6im3mESZRAb4Zqbx
Input arguments: {'end_date': '2025-03-01', 'start_date': '2025-02-01', 'symbol': 'NVDA'}
User_Proxy (to Market_Analyst):***** Response from calling tool (chatcmpl-uY6H36uQN976z6im3mESZRAb4Zqbx) *****
Error: FinnhubAPIException(status_code: 401): Invalid API key
*******************************************************************************

可以看到每次調(diào)完以后,都會(huì)根據(jù)token消耗費(fèi)用。
在這里插入圖片描述

2.Financial Analyst Agent for Report Writing (Equity Research Report)

金融分析師代理用于撰寫(xiě)報(bào)告(Equity Research Report)是一個(gè)專(zhuān)門(mén)用于分析公司年度報(bào)告的代理,它能夠提取關(guān)鍵信息并生成摘要。該代理能夠處理公司的10-K報(bào)告、財(cái)務(wù)數(shù)據(jù)和市場(chǎng)數(shù)據(jù),輸出股票研究報(bào)告。通過(guò)結(jié)合先進(jìn)的LLMs,這個(gè)代理深入分析財(cái)務(wù)文件,如年報(bào)、SEC文件和收益電話(huà)會(huì)議記錄,提取關(guān)鍵信息,識(shí)別主要的財(cái)務(wù)指標(biāo),突出顯示需要進(jìn)一步審查的趨勢(shì)和差異

import os
import autogen
from textwrap import dedent
from finrobot.utils import register_keys_from_json
from finrobot.agents.workflow import SingleAssistantShadowllm_config = {"config_list": autogen.config_list_from_json("../OAI_CONFIG_LIST",filter_dict={"model": ["gpt-4-0125-preview"],},),"timeout": 120,"temperature": 0.5,
}
register_keys_from_json("../config_api_keys")# Intermediate strategy modules will be saved in this directory
work_dir = "../report"
os.makedirs(work_dir, exist_ok=True)assistant = SingleAssistantShadow("Expert_Investor",llm_config,max_consecutive_auto_reply=None,human_input_mode="TERMINATE",
)company = "Microsoft"
fyear = "2023"message = dedent(f"""With the tools you've been provided, write an annual report based on {company}'s {fyear} 10-k report, format it into a pdf.Pay attention to the followings:- Explicitly explain your working plan before you kick off.- Use tools one by one for clarity, especially when asking for instructions. - All your file operations should be done in "{work_dir}". - Display any image in the chat once generated.- All the paragraphs should combine between 400 and 450 words, don't generate the pdf until this is explicitly fulfilled.
"""
)assistant.chat(message, use_cache=True, max_turns=50,summary_method="last_msg")

運(yùn)行代碼,可以看到生成文相應(yīng)的財(cái)務(wù)文檔保存在report下面。

(autogen_env) root@autodl-container-f111409ec6-08df088d:~/autodl-tmp/FinRobot/test# python test2.py 
User_Proxy (to Expert_Investor):With the tools you've been provided, write an annual report based on Microsoft's 2023 10-k report, format it into a pdf.
Pay attention to the followings:
- Explicitly explain your working plan before you kick off.
- Use tools one by one for clarity, especially when asking for instructions. 
- All your file operations should be done in "../report". 
- Display any image in the chat once generated.
- All the paragraphs should combine between 400 and 450 words, don't generate the pdf until this is explicitly fulfilled.--------------------------------------------------------------------------------
Expert_Investor (to User_Proxy):To create an annual report based on Microsoft's 2023 10-K report and format it into a PDF, I will follow the steps outlined below:1. **Retrieve Key Sections from the 10-K Report**: I'll use specific tools to extract and analyze the following sections from Microsoft's 2023 10-K report:- Company Description- Business Highlights- Income Statement- Segment Analysis- Cash Flow Statement- Risk Assessment- Balance Sheet2. **Generate Visuals**: I'll create visuals for the following:- PE ratio and EPS performance over the past 4 years.- Share performance compared to the S&P 500 over the past year.3. **Combine Analysis into a Coherent Narrative**: I will synthesize the analyses from the income statement and segment analysis into a single coherent paragraph to provide a comprehensive overview of Microsoft's financial health and operational performance.4. **Check Text Length**: I will ensure all paragraphs combine between 400 and 450 words as required.5. **Compile the Report**: Once all the components are ready and meet the requirements, I will compile them into a PDF report, ensuring it includes all the necessary sections and visuals.6. **Display Visuals**: Any visuals generated will be displayed in the chat for review.7. **Review and Finalize**: Before finalizing the PDF, I will review all components to ensure accuracy and completeness.Let's start with the first step. I will begin by retrieving and analyzing the company description for Microsoft's 2023 fiscal year. This will give us an insight into Microsoft's industry, strengths, trends, and strategic initiatives.
***** Suggested tool call (chatcmpl-Wlsfv4sA6e8N1oOnL85B1yEydOIqI): analyze_company_description *****
Arguments: 
{"fyear":"2023","save_path":"../report/msft_company_description.txt","ticker_symbol":"MSFT"}
*****************************************************************************************************-------------------------------------------------------------------------------->>>>>>>> USING AUTO REPLY...>>>>>>>> EXECUTING FUNCTION analyze_company_description...
Call ID: chatcmpl-Wlsfv4sA6e8N1oOnL85B1yEydOIqI
Input arguments: {'fyear': '2023', 'save_path': '../report/msft_company_description.txt', 'ticker_symbol': 'MSFT'}
User_Proxy (to Expert_Investor):***** Response from calling tool (chatcmpl-Wlsfv4sA6e8N1oOnL85B1yEydOIqI) *****
Error: Too Many Requests. Rate limited. Try after a while.
*******************************************************************************--------------------------------------------------------------------------------
Expert_Investor (to User_Proxy):It seems there's a temporary issue with accessing the data due to rate limits. I'll wait a moment and then attempt to retrieve the company description for Microsoft's 2023 fiscal year again. Let's try once more.
***** Suggested tool call (chatcmpl-K1W8qPcmAhg2uLJHdJ3opX22HCt5x): analyze_company_description *****
Arguments: 
{"fyear":"2023","save_path":"../report/msft_company_description.txt","ticker_symbol":"MSFT"}
*****************************************************************************************************

3. 補(bǔ)充10-K干嘛的

10-K報(bào)告是美國(guó)上市公司根據(jù)美國(guó)證券交易委員會(huì)(SEC)的規(guī)定,每年必須提交的一份全面報(bào)告。這份報(bào)告詳細(xì)披露了公司的財(cái)務(wù)狀況、運(yùn)營(yíng)情況、管理層討論與分析(MD&A)、公司治理結(jié)構(gòu)、潛在風(fēng)險(xiǎn)因素以及審計(jì)過(guò)的財(cái)務(wù)報(bào)表等信息。
10-K報(bào)告的名稱(chēng)來(lái)源于美國(guó)證券交易委員會(huì)的表格10-K,它是上市公司年度報(bào)告的標(biāo)準(zhǔn)格式。這份報(bào)告對(duì)于投資者、分析師和其他利益相關(guān)者來(lái)說(shuō)非常重要,因?yàn)樗峁┝藢?duì)公司過(guò)去一年的全面了解,以及公司未來(lái)可能面臨的機(jī)遇和挑戰(zhàn)。
簡(jiǎn)而言之,10-K報(bào)告是一份詳盡的年度報(bào)告,旨在為投資者提供評(píng)估公司價(jià)值和做出投資決策所需的關(guān)鍵信息。

四. 總結(jié)

FinRobot生態(tài)系統(tǒng)通過(guò)整合多種AI技術(shù)和大型語(yǔ)言模型,提供了一個(gè)全面的平臺(tái),用于開(kāi)發(fā)和部署各種金融AI代理。這些代理能夠執(zhí)行從市場(chǎng)預(yù)測(cè)、文檔分析到風(fēng)險(xiǎn)評(píng)估等多種金融任務(wù),從而滿(mǎn)足金融行業(yè)的多樣化需求。

http://m.risenshineclean.com/news/64793.html

相關(guān)文章:

  • 020網(wǎng)站設(shè)計(jì)互聯(lián)網(wǎng)營(yíng)銷(xiāo)培訓(xùn)班
  • 做網(wǎng)站的軟件著作權(quán)安卓手機(jī)優(yōu)化
  • 園林設(shè)計(jì)公司東莞網(wǎng)絡(luò)優(yōu)化哪家好
  • 大連哪個(gè)公司做網(wǎng)站好網(wǎng)絡(luò)營(yíng)銷(xiāo)專(zhuān)業(yè)介紹
  • 無(wú)錫網(wǎng)站設(shè)計(jì) 眾海外營(yíng)銷(xiāo)推廣服務(wù)
  • 招聘網(wǎng)站建設(shè)需求分析十大計(jì)算機(jī)培訓(xùn)學(xué)校
  • 做網(wǎng)站的前端框架百度推廣投訴中心
  • 風(fēng)景旅游網(wǎng)站建設(shè)的設(shè)計(jì)思路無(wú)錫營(yíng)銷(xiāo)型網(wǎng)站建站
  • 做網(wǎng)站需要哪些審核廣州seo效果
  • 中國(guó)網(wǎng)站建設(shè)公司網(wǎng)絡(luò)營(yíng)銷(xiāo)和傳統(tǒng)營(yíng)銷(xiāo)的關(guān)系
  • 高安網(wǎng)站制作一元手游平臺(tái)app
  • 做定制網(wǎng)站引流app推廣軟件
  • 整套vi設(shè)計(jì)都包含哪些石家莊網(wǎng)站seo
  • 怎樣創(chuàng)作一個(gè)網(wǎng)站免費(fèi)建網(wǎng)站哪家好
  • 營(yíng)銷(xiāo)型網(wǎng)站建設(shè)公司價(jià)格恩施seo整站優(yōu)化哪家好
  • 網(wǎng)站服務(wù)器如何搭建杭州seo關(guān)鍵詞優(yōu)化公司
  • 小廠建網(wǎng)站網(wǎng)推平臺(tái)有哪些
  • 長(zhǎng)春做網(wǎng)站建設(shè)的公司視頻號(hào)下載器手機(jī)版
  • 成都微網(wǎng)站系統(tǒng)網(wǎng)站seo診斷報(bào)告
  • 網(wǎng)站架構(gòu)包括哪些廣州官方新聞
  • 做網(wǎng)站開(kāi)發(fā)有什么專(zhuān)業(yè)證seo專(zhuān)家是什么意思
  • 企業(yè)招聘官網(wǎng)北京seo網(wǎng)站開(kāi)發(fā)
  • 騰訊cdn api wordpressseo入門(mén)教學(xué)
  • 平安銀行官方網(wǎng)站seo網(wǎng)站推廣的主要目的包括
  • 商用網(wǎng)站開(kāi)發(fā)計(jì)劃書(shū)北京優(yōu)化seo公司
  • 獅山網(wǎng)站建設(shè)電商運(yùn)營(yíng)一天都干啥
  • dede打包好的網(wǎng)站怎么提取模板杭州關(guān)鍵詞優(yōu)化服務(wù)
  • 商城網(wǎng)站源碼下載全網(wǎng)搜索引擎
  • wordpress 移動(dòng)app網(wǎng)絡(luò)優(yōu)化工程師吃香嗎
  • 福州定制網(wǎng)站開(kāi)發(fā)制作搜索引擎關(guān)鍵詞seo優(yōu)化公司