Skip to content

fin-trend-analyzer analyzes financial news and sentiment to identify trends and risks in AI and tech stocks, providing structured insights for quick market assessment.

Notifications You must be signed in to change notification settings

chigwell/fin-trend-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Fin-Trend-Analyzer

PyPI version License: MIT Downloads LinkedIn

Financial Trend Analyzer for AI and Technology Stocks

A Python package that analyzes financial news and sentiment to identify and summarize market trends and risks related to AI and technology stocks.

Overview

Fin-Trend-Analyzer is a linguistic tool that quickly assesses market perceptions and potential bubble indicators by processing text inputs from news articles, reports, or social media posts. It returns structured insights, such as key risk factors, sentiment scores, and trend summaries, using pattern matching to ensure consistent and reliable output.

Installation

pip install fin_trend_analyzer

Usage

from fin_trend_analyzer import fin_trend_analyzer

response = fin_trend_analyzer(user_input="This week's earnings report was outstanding.")

API Documentation

  • fin_trend_analyzer(user_input: str, api_key: Optional[str] = None, llm: Optional[BaseChatModel] = None) -> List[str]:

    • user_input: The user input text to process.
    • api_key: The API key for LLM7, default is None and will use the environment variable LLM7_API_KEY.
    • llm: The langchain LLM instance to use, default is ChatLLM7 from langchain_llm7.

    Example using a custom LLM instance (e.g., OpenAI, Anthropic, or Google):

    from langchain_openai import ChatOpenAI
    from fin_trend_analyzer import fin_trend_analyzer
    
    llm = ChatOpenAI()
    response = fin_trend_analyzer(user_input="This week's earnings report was outstanding.", llm=llm)

Rate Limits

The default rate limits for LLM7 free tier are sufficient for most use cases of this package. If higher rate limits are needed, pass your own API key via environment variable LLM7_API_KEY or via passing it directly:

from fin_trend_analyzer import fin_trend_analyzer

response = fin_trend_analyzer(user_input="This week's earnings report was outstanding.", api_key="your_api_key")

You can get a free API key by registering at https://token.llm7.io/.

Author

Eugene Evstafev