Awesome Finance Skills

repository·main·Indexed 25 days ago

https://github.com/rkiding/awesome-finance-skills

A plug-and-play collection of skills to transform AI agents into financial analysts. It provides capabilities for real-time news (via alphaear-news), stock data (alphaear-stock), FinBERT/LLM sentiment analysis (alphaear-sentiment), Kronos time-series forecasting (alphaear-predictor), and professional report generation (alphaear-reporter). It includes specialized tools for fetching high-frequency signals from DeepEar Lite and generating Draw.io XML logic diagrams. Compatible with agent frameworks such as Antigravity, OpenCode, OpenClaw, and Claude Code.

Tokens
10.6K
Snippets
19
Records
51
Agent score
83%

What's inside Awesome Finance Skills

  1. Use the AlphaEar Search Skill for Web and Local RAG searches

    main

    The alphaear-search skill provides unified search capabilities including web searches (via Jina, DDG, or Baidu) and local RAG (Retrieval-Augmented Generation) searches against a local daily_news database.

    To perform web searches, use the SearchTools class via scripts/search_tools.py. To perform local RAG searches, use scripts/hybrid_search.py or call SearchTools with the engine parameter set to 'local'.

  2. Use the alphaear-deepear-lite skill to fetch financial signals

    main

    The alphaear-deepear-lite skill allows you to fetch high-frequency financial signals, including titles, summaries, confidence scores, and reasoning, directly from the DeepEar Lite platform.

    To retrieve these signals, use the DeepEarLiteTools implementation via the scripts/deepear_lite.py script. The primary method is fetch_latest_signals(), which retrieves data from https://deepear.vercel.app/latest.json and returns a formatted report containing signal titles, sentiment/confidence metrics, summaries, and source links.

  3. Use AlphaEar Stock Skill for stock search and data retrieval

    main

    The alphaear-stock skill allows searching for A-Share, HK, and US stock tickers and retrieving historical price data (OHLCV) and fundamental information. It is accessed via the StockTools class using the scripts/stock_tools.py script.

    Capabilities

    • Search Tickers: Use search_ticker(query) to perform a fuzzy search by stock code or name (e.g., "Moutai" or "600519"). Returns a list of {code, name} objects.
    • Get Price History: Use get_stock_price(ticker, start_date, end_date) to retrieve OHLCV data. Dates must be in "YYYY-MM-DD" format. Returns a pandas DataFrame.
    • Get Fundamentals: Use get_stock_fundamentals(ticker) to retrieve a dictionary containing the sector, industry, market cap, PE ratio, and a summary. Supports A-Share, HK, and US stocks.
  4. Install Awesome Finance Skills via npx

    main

    The recommended way to install individual skills is using the npx skills command. You can add a specific skill directly or search for available skills.

    # Install a specific skill (e.g., alphaear-news)
    npx skills add RKiding/Awesome-finance-skills@alphaear-news
    
    # Or search for all the skills and then select one
    npx skills find "alphaear"
  5. Use AlphaEar Predictor to forecast market trends

    main

    The AlphaEar Predictor skill uses the KronosPredictorUtility to perform time-series forecasting. The workflow involves generating a base quantitative forecast and then subjectively adjusting it using a specific prompt (found in references/PROMPTS.md) to account for news sentiment.

    Key Method:

    • KronosPredictorUtility.get_base_forecast(df, lookback, pred_len, news_text): Returns a List[KLinePoint] based on technical data and news input.
    from scripts.utils.kronos_predictor import KronosPredictorUtility
    from scripts.utils.database_manager import DatabaseManager
    
    db = DatabaseManager()
    predictor = KronosPredictorUtility()
    
    # Forecast
    forecast = predictor.predict("600519", horizon="7d")
    print(forecast)
  6. Perform LLM-based agentic sentiment analysis

    main

    When higher accuracy or reasoning is required, use an LLM to analyze the text directly using a specific prompt. After analysis, use the provided helper method to save the results to the database.

    Sentiment Analysis Prompt:

    请分析以下金融/新闻文本的情绪极性。
    返回严格的 JSON 格式:
    {"score": <float: -1.0到1.0>, "label": "<positive/negative/neutral>", "reason": "<简短理由>"}
    
    文本: {text}

    Scoring Guide:

    • Positive (0.1 to 1.0): Optimistic news, profit growth, policy support, etc.
    • Negative (-1.0 to -0.1): Losses, sanctions, price drops, pessimism.
    • Neutral (-0.1 to 0.1): Factual reporting, sideways movement, ambiguous impact.

    Helper Method to save results:

    • update_single_news_sentiment(id, score, reason): Use this to save your manual LLM analysis to the database.
  7. Determine the appropriate degree of freedom for instructions

    main

    Match the level of specificity in your skill to the task's variability:

    Freedom LevelImplementation TypeUse Case
    HighText-based instructionsMultiple valid approaches, heuristic-based decisions
    MediumPseudocode or parameterized scriptsPreferred patterns exist, but some variation is acceptable
    LowSpecific scripts with few parametersFragile/error-prone operations, critical consistency requirements
  8. Generate Draw.io diagrams with AlphaEar Logic Visualizer

    main

    This skill allows an agent to create visual representations of finance logic flows, such as investment theses or signal transmission chains, by generating Draw.io XML compatible diagrams.

    Agentic Workflow

    To use this skill in an agentic workflow, follow these steps:

    1. Generate XML: Use the Draw.io XML Generation Prompt (found in references/PROMPTS.md) to convert a logical chain into XML format.
    2. Save/Render: Call the render_drawio_to_html method from scripts/visualizer.py to convert the XML into a viewable HTML file for the user.
  9. Use FinAnalyst prompt for signal parsing into InvestmentSignal JSON

    main

    Use the FinAnalyst prompt to transform research materials into actionable Investment Intelligence (ISQ). This prompt requires {signal_text} and {research_context_str} as inputs.

    Analysis Requirements:

    • Title: Must be concise (<15 words).
    • Pricing: Analyze if the signal is already priced-in based on provided price data.
    • Impact: Populate impact_tickers with codes and weights.
    • Logic: Define the transmission_chain including node_name, impact_type, and logic.
    • Prediction: The summary must contain specific targets (price or percentage change).

    Output Format: Must be a valid JSON object matching the InvestmentSignal schema.

    You are a senior financial analyst (FinAgent). Current time: {current_time}.
    Task: transform research materials into actionable Investment Intelligence (ISQ).
    
    ### Raw Signal
    {signal_text}
    
    ### Research Context
    {research_context_str}
    
    ### Analysis Requirements
    1. **Title**: Concise (<15 words).
    2. **Pricing**: Analyze if priced-in based on provided price data.
    3. **Impact**: Fill `impact_tickers` with codes and weights.
    4. **Logic**: `transmission_chain` with `node_name`, `impact_type`, `logic`.
    5. **Prediction**: `summary` must contain specific targets (price/change).
    
    ### Output (Strict JSON - InvestmentSignal)
    Output valid JSON matching the InvestmentSignal schema.