skills/financial/market-regime/SKILL.md
Analyzes financial market regimes to identify trends, volatility, and shifts in asset classes.
npx skillsauth add alphaonedev/openclaw-graph market-regimeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill analyzes financial market regimes to detect trends, volatility, and shifts in asset classes like stocks, bonds, or cryptocurrencies. It processes historical data to classify regimes (e.g., bull, bear, sideways) and provides actionable insights for trading or risk management.
Use this skill when you need to evaluate market conditions for decision-making, such as before executing trades, assessing portfolio risk, or building predictive models. Apply it in volatile markets, during economic events, or for backtesting strategies. Avoid if you lack historical data access, as it requires at least 1 year of price data.
Invoke this skill via CLI for quick analysis or integrate it into Python scripts for automated workflows. Always provide asset symbols and time periods. For CLI, use synchronous calls; for API, handle asynchronous responses. Configure with a JSON file for custom parameters, e.g., set thresholds for volatility detection.
To run a basic analysis:
export OPENCLAW_API_KEY=your_api_key_here.Use the OpenClaw CLI or REST API for interactions. Authentication requires the $OPENCLAW_API_KEY environment variable.
CLI Command: openclaw market-regime analyze --asset AAPL --period 90d --metric volatility
--asset (required, e.g., stock symbol), --period (e.g., "30d" for 30 days), --metric (e.g., "volatility" or "trend").API Endpoint: POST to https://api.openclaw.ai/v1/market-regime/analyze
{"asset": "BTC-USD", "period": "1y", "metrics": ["volatility", "trends"]}{"regime": "bull", "volatility": 0.15}.Authorization: Bearer $OPENCLAW_API_KEY.Code snippet for Python integration:
import requests
api_key = os.environ.get('OPENCLAW_API_KEY')
response = requests.post('https://api.openclaw.ai/v1/market-regime/analyze',
headers={'Authorization': f'Bearer {api_key}'},
json={'asset': 'GOOGL', 'period': '180d'})
print(response.json()['regime']) # Outputs e.g., 'bear'
Config format: Use a YAML file for advanced settings, e.g.,
asset: SPY
period: 365d
metrics:
- volatility
- trends
thresholds:
volatility_high: 0.2
Integrate with other OpenClaw skills by piping outputs or using shared data models. For example, combine with trading-strategies skill for automated alerts. Ensure data consistency by using standard formats like OHLCV (Open, High, Low, Close, Volume). If using external data, map it to the skill's expected schema (e.g., CSV with columns: date, open, high, low, close). Test integrations in a sandbox environment first. For web apps, use webhooks to receive regime updates.
Handle errors by checking HTTP status codes or CLI exit codes. Common errors:
$OPENCLAW_API_KEY is set and valid.In code, use try-except blocks:
try:
response = requests.post(...) # As above
response.raise_for_status()
except requests.exceptions.HTTPError as err:
print(f"Error: {err.response.status_code} - {err.response.text}")
# Retry or log the error
If data fetch fails (e.g., invalid period), the skill returns a specific error code; parse the response for details like "ERR_INVALID_PERIOD".
Example 1: Analyze Stock Volatility
openclaw market-regime analyze --asset AAPL --period 60d --metric volatility{"regime": "high_volatility", "score": 0.25}. Use this to trigger a sell alert in a trading bot.Example 2: Identify Crypto Trends
/v1/market-regime/analyze with body {"asset": "BTC-USD", "period": "1y", "metrics": ["trends"]}response = requests.post(..., json={'asset': 'BTC-USD', 'period': '1y', 'metrics': ['trends']})
trends = response.json()['trends'] # e.g., ['upward_shift_at_2023-06-01']
tools
Root web development: project structure, tooling selection, deployment decisions
development
WebAssembly: Rust/Go/C to WASM, wasm-bindgen, Emscripten, WASM Component Model
development
Vue 3: Composition API script setup, Pinia, Vue Router 4, SFCs, Vite, Nuxt 3
tools
Tailwind CSS 4: utility classes, config, JIT, arbitrary values, darkMode, plugins, shadcn/ui