THS Advanced Analysis for Openclaw

A high-performance financial analysis skill for AI agents providing minute-level K-lines, sector rankings, and multi-market real-time data via the thsdk.

bensema
v1.0.4
Mar 17, 2026
7
4.9k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install ths-advanced-analysis

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install ths-advanced-analysis using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is THS Advanced Analysis?

THS Advanced Analysis is a robust technical tool designed for Openclaw Skills users who require deep market introspection. It leverages the thsdk to provide high-frequency trading data, including granular minute-level K-lines (1m to 120m), real-time order book depth, and big order flow tracking. This skill bridges the gap between simple price tracking and professional-grade quantitative research, offering a comprehensive suite for analyzing A-shares, Hong Kong stocks, US markets, forex, and futures.

Beyond basic price action, the skill excels at comparative analysis and natural language discovery. Users can execute complex multi-stock comparisons with normalized trend charts and correlation heatmaps. It also integrates seamlessly with the Wencai NLP engine, allowing for sophisticated stock screening based on financial metrics, technical patterns, and real-time market anomalies like call auction spikes or sudden price surges.

THS Advanced Analysis Use Cases

  • Intraday technical analysis using minute-level K-line data and moving averages.
  • Monitoring market sentiment through call auction anomalies and big order flow tracking.
  • Comparing multiple stocks across different markets with normalized performance charts.
  • Sector-specific research including industry rankings, concept constituents, and fund flows.
  • Natural language stock screening using financial indicators (ROE, PE, PB) and technical indicators (MACD, Gold Cross).
  • Tracking global markets including HK/US stocks, forex exchange rates, and futures contracts.

How THS Advanced Analysis Works

  1. Symbol Resolution: The skill first uses search_symbols to resolve user input (names or abbreviations) into official THSCODEs.
  2. Contextual Intent: Based on the user query, it selects the appropriate endpoint (e.g., klines for charts, depth for order books, or wencai_nlp for screening).
  3. Data Acquisition: It establishes a connection via the thsdk (supporting guest mode) to pull real-time or historical dataframes.
  4. Transformation & Analysis: Raw data is processed into structured formats, such as calculating correlation matrices for multi-stock comparisons or mapping anomaly codes to human-readable labels.
  5. Visualization Readiness: Data is formatted into Markdown tables or prepared for chart generation (e.g., trend lines, heatmaps) to provide clear actionable insights.

THS Advanced Analysis Setup

To integrate this into your environment, install the required SDK and ensure you are running Python 3.9+.

pip install --upgrade thsdk

Basic connection template:

from thsdk import THS

# Openclaw Skills implementation using guest mode
with THS() as ths:
    resp = ths.search_symbols("Tonghuashun")
    print(resp.df)

THS Advanced Analysis Data Schema & Taxonomy

The skill organizes data primarily through Pandas DataFrames with standardized naming conventions:

Data Category Key Fields Format
K-Line Data time, open, high, low, close, volume, amount DataFrame
Order Book bid1-5_price/vol, ask1-5_price/vol, last_close DataFrame
Market Anomaly time, price, anomaly_type, code, name List/Table
Multi-Stock stock_name, latest_price, change_pct, turnover, cap Table
NLP Results ths_code, stock_name, query_specific_fields DataFrame

All timestamps are localized to Asia/Shanghai (UTC+8).

THS Advanced Analysis Advanced Features

  • Multi-market support: Unified interface for CN/HK/US/Forex/Futures/Bonds/ETFs.
  • Advanced K-line adjustments: Supports forward-adjusted prices for accurate backtesting.
  • Real-time Depth Analysis: Access to bid/ask details and 3-second Level 1 ticks.
  • NLP Integration: Complex boolean logic support for screening (e.g., 'ROE > 15% and non-ST').
  • Batch Processing: Optimized grouping by market to handle multi-stock queries without rate limiting.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*