SEC 申報文件
SEC 申報文件是提交給美國證券交易委員會 (SEC) 的財務報表或其他正式文件。上市公司、特定內部人士和經紀交易商必須定期提交
SEC filings
。投資者和金融專業人士依賴這些申報文件來獲取有關他們正在評估以進行投資的公司資訊。
SEC filings
資料由 Kay.ai 和 Cybersyn 透過 Snowflake Marketplace 提供。
設定
首先,您需要安裝 kay
套件。您還需要一個 API 金鑰:您可以從 https://kay.ai 免費取得一個。取得 API 金鑰後,您必須將其設定為環境變數 KAY_API_KEY
。
在本範例中,我們將使用 KayAiRetriever
。請查看 kay 筆記本 以取得有關其接受參數的更詳細資訊。`
# Setup API keys for Kay and OpenAI
from getpass import getpass
KAY_API_KEY = getpass()
OPENAI_API_KEY = getpass()
········
········
import os
os.environ["KAY_API_KEY"] = KAY_API_KEY
os.environ["OPENAI_API_KEY"] = OPENAI_API_KEY
範例
from langchain.chains import ConversationalRetrievalChain
from langchain_community.retrievers import KayAiRetriever
from langchain_openai import ChatOpenAI
model = ChatOpenAI(model="gpt-3.5-turbo")
retriever = KayAiRetriever.create(
dataset_id="company", data_types=["10-K", "10-Q"], num_contexts=6
)
qa = ConversationalRetrievalChain.from_llm(model, retriever=retriever)
questions = [
"What are patterns in Nvidia's spend over the past three quarters?",
# "What are some recent challenges faced by the renewable energy sector?",
]
chat_history = []
for question in questions:
result = qa({"question": question, "chat_history": chat_history})
chat_history.append((question, result["answer"]))
print(f"-> **Question**: {question} \n")
print(f"**Answer**: {result['answer']} \n")
-> **Question**: What are patterns in Nvidia's spend over the past three quarters?
**Answer**: Based on the provided information, here are the patterns in NVIDIA's spend over the past three quarters:
1. Research and Development Expenses:
- Q3 2022: Increased by 34% compared to Q3 2021.
- Q1 2023: Increased by 40% compared to Q1 2022.
- Q2 2022: Increased by 25% compared to Q2 2021.
Overall, research and development expenses have been consistently increasing over the past three quarters.
2. Sales, General and Administrative Expenses:
- Q3 2022: Increased by 8% compared to Q3 2021.
- Q1 2023: Increased by 14% compared to Q1 2022.
- Q2 2022: Decreased by 16% compared to Q2 2021.
The pattern for sales, general and administrative expenses is not as consistent, with some quarters showing an increase and others showing a decrease.
3. Total Operating Expenses:
- Q3 2022: Increased by 25% compared to Q3 2021.
- Q1 2023: Increased by 113% compared to Q1 2022.
- Q2 2022: Increased by 9% compared to Q2 2021.
Total operating expenses have generally been increasing over the past three quarters, with a significant increase in Q1 2023.
Overall, the pattern indicates a consistent increase in research and development expenses and total operating expenses, while sales, general and administrative expenses show some fluctuations.