
Market Environment Analysis
- 1.4k installs
- 2.5k repo stars
- Updated July 26, 2026
- tradermonty/claude-trading-skills
market-environment-analysis is a trading skill for assessing macro and market environment conditions before strategy decisions.
About
The market-environment-analysis skill supports trading workflows by analyzing broader market environment factors such as regime, volatility, sector rotation, and macro context before strategy decisions. It complements other claude-trading-skills with situational awareness rather than single-ticker signals alone. Use when developers assess market backdrop, risk regime, or environment filters for systematic or discretionary trading plans.
- Macro and market regime context for trading decisions.
- Environment analysis before signal or execution skills.
- Part of tradermonty claude-trading-skills ecosystem.
- Risk and volatility regime awareness focus.
- Analytics-oriented grow-phase trading research.
Market Environment Analysis by the numbers
- 1,438 all-time installs (skills.sh)
- +56 installs in the week ending Jul 28, 2026 (Skillselion tracking)
- Ranked #94 of 1,136 Finance & Trading skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
market-environment-analysis capabilities & compatibility
- Capabilities
- market regime context analysis · volatility and macro factor assessment · trading environment filter guidance · claude trading skills workflow complement
- Use cases
- trading · research · data analysis
What market-environment-analysis says it does
market-environment-analysis
npx skills add https://github.com/tradermonty/claude-trading-skills --skill market-environment-analysisAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1.4k |
|---|---|
| repo stars | ★ 2.5k |
| Security audit | 2 / 3 scanners passed |
| Last updated | July 26, 2026 |
| Repository | tradermonty/claude-trading-skills ↗ |
What is the current market environment and regime context for my trading plan?
Analyze macro and market environment conditions to inform trading strategy and risk context.
Who is it for?
Traders and developers building systematic strategies needing environment filters.
Skip if: Skip for single-stock fundamental analysis without market regime context.
When should I use this skill?
User analyzes market environment, trading regime, macro backdrop, or volatility context.
What you get
Market environment assessment covering regime, volatility, and macro factors relevant to strategy.
Files
Market Environment Analysis
Comprehensive analysis tool for understanding market conditions and creating professional market reports anytime.
When to Use
- When you need a comprehensive overview of global market conditions
- Before making trading or investment decisions
- For daily/weekly market briefings
- When assessing risk-on/risk-off sentiment
- For understanding inter-market correlations and sector rotation
- When preparing market reports for clients or personal records
Prerequisites
- WebSearch access: Required for fetching real-time market data
- No API keys required: This skill uses web search for data collection
- Optional: Economic calendar data for event-driven analysis
Core Workflow
1. Initial Data Collection
Collect latest market data using web_search tool: 1. Major stock indices (S&P 500, NASDAQ, Dow, Nikkei 225, Shanghai Composite, Hang Seng) 2. Forex rates (USD/JPY, EUR/USD, major currency pairs) 3. Commodity prices (WTI crude, Gold, Silver) 4. US Treasury yields (2-year, 10-year, 30-year) 5. VIX index (Fear gauge) 6. Market trading status (open/close/current values)
2. Market Environment Assessment
Evaluate the following from collected data:
- Trend Direction: Uptrend/Downtrend/Range-bound
- Risk Sentiment: Risk-on/Risk-off
- Volatility Status: Market anxiety level from VIX
- Sector Rotation: Where capital is flowing
3. Report Structure
Standard Report Format:
1. Executive Summary (3-5 key points)
2. Global Market Overview
- US Markets
- Asian Markets
- European Markets
3. Forex & Commodities Trends
4. Key Events & Economic Indicators
5. Risk Factor Analysis
6. Investment Strategy ImplicationsScript Usage
market_utils.py
Provides common functions for report creation:
# Generate report header
python scripts/market_utils.py
# Available functions:
- format_market_report_header(): Create header
- get_market_session_times(): Check trading hours
- categorize_volatility(vix): Interpret VIX levels
- format_percentage_change(value): Format price changesReference Documentation
Key Indicators Interpretation
Load references/indicators.md when you need:
- Important levels for each index
- Technical analysis key points
- Sector-specific focus areas
Analysis Patterns
Load references/analysis_patterns.md when analyzing:
- Risk-on/Risk-off criteria
- Economic indicator interpretation
- Inter-market correlations
- Seasonality and market anomalies
Output Examples
Quick Summary Version
📊 Market Summary [2025/01/15 14:00]
━━━━━━━━━━━━━━━━━━━━━
【US】S&P 500: 5,123.45 (+0.45%)
【JP】Nikkei 225: 38,456.78 (-0.23%)
【FX】USD/JPY: 149.85 (↑0.15)
【VIX】16.2 (Normal range)
⚡ Key Events
- Japan GDP Flash
- US Employment Report
📈 Environment: Risk-On ContinuesDetailed Analysis Version
Start with executive summary, then analyze each section in detail. Key clarifications: 1. Current market phase (Bullish/Bearish/Neutral) 2. Short-term direction (1-5 days outlook) 3. Risk events to monitor 4. Recommended position adjustments
Important Considerations
Timezone Awareness
- Consider all major market timezones
- US markets: Evening to early morning (Asian time)
- European markets: Afternoon to evening (Asian time)
- Asian markets: Morning to afternoon (Local time)
Economic Calendar Priority
Categorize by importance:
- ⭐⭐⭐ Critical (FOMC, NFP, CPI, etc.)
- ⭐⭐ Important (GDP, Retail Sales, etc.)
- ⭐ Reference level
Data Source Priority
1. Official releases (Central banks, Government statistics) 2. Major financial media (Bloomberg, Reuters) 3. Broker reports 4. Analyst consensus estimates
Troubleshooting
Data Collection Notes
- Check market holidays (holiday calendars)
- Be aware of daylight saving time changes
- Distinguish between flash and final data
Market Volatility Response
1. First organize the facts 2. Reference historical similar events 3. Verify with multiple sources 4. Maintain objective analysis
Customization Options
Adjust based on user's investment style:
- Day Traders: Intraday charts, order flow focus
- Swing Traders: Daily/weekly technicals emphasis
- Long-term Investors: Fundamentals, macro economics focus
- Forex Traders: Currency correlations, interest rate differentials
- Options Traders: Volatility analysis, Greeks monitoring
Resources
references/indicators.md- Key market indicators and interpretation guidesreferences/analysis_patterns.md- Risk-on/risk-off criteria and inter-market correlationsscripts/market_utils.py- Utility functions for report formatting and market status
Market Analysis Patterns
Market Pattern Analysis
Trend Identification
1. Uptrend
- Higher highs and higher lows
- Moving averages trending upward
- Price rises accompanied by volume increases
2. Downtrend
- Lower highs and lower lows
- Moving averages trending downward
- Decreased volume on bounces
3. Range-Bound Market
- Trading within defined range
- Moving averages sideways
- Declining volume trend
Risk-On / Risk-Off Assessment
Risk-On Environment Characteristics
- Stock markets rising (especially emerging markets)
- High-yield currency buying (AUD, NZD, etc.)
- VIX index declining
- Interest rates rising
- Risk assets like crude oil rising
Risk-Off Environment Characteristics
- Flight to safe assets (yen buying, Swiss franc buying)
- Gold prices rising
- Bond buying (yields falling)
- VIX index rising
- Emerging market currencies and stocks selling
Economic Indicator Interpretation
Employment Data (US)
- Nonfarm Payrolls (NFP)
- +200k or more above expectations: Strong employment, rate hike expectations
- -100k or more below expectations: Employment deterioration, rate cut expectations
- Unemployment Rate
- 3.5% or below: Near full employment
- 4.0% or above: Signs of employment environment deterioration
Inflation Indicators
- CPI (Consumer Price Index)
- 2% YoY: Fed target level
- 3%+: Inflation alert
- Below 1%: Deflation risk
- PPI (Producer Price Index)
- Important as CPI leading indicator
- Captures upstream inflation
Central Bank Policy
- Fed (Federal Reserve)
- Watch dot plot
- Policy rate outlook changes
- BOJ (Bank of Japan)
- YCC (Yield Curve Control) policy
- ETF purchase trends
- ECB (European Central Bank)
- 2% inflation target
- Response to regional disparities
Inter-Market Correlation Analysis
Positive Correlation Patterns
- Stocks ↑ → Interest rates ↑ (strong economy)
- USD/JPY ↑ → Nikkei ↑ (exporters favorable)
- Crude oil ↑ → Inflation expectations ↑
Inverse Correlation Patterns
- Interest rates ↑ → Bond prices ↓
- Dollar ↑ → Gold prices ↓
- VIX ↑ → Stocks ↓
Seasonality & Anomalies
Monthly Patterns
- January Effect: New year fund inflows
- Sell in May: Pre-summer doldrums position closing
- September: Historically weak month
- December: Tax-loss selling, Santa Claus rally
Day-of-Week Effects
- Monday: Weekend risk pricing
- Friday: Position adjustments
Fiscal Year-End
- End of March: Japanese corporate fiscal year, repatriation flows
- End of December: Western corporate fiscal year
Technical Indicator Usage
Trend Indicators
- Moving Averages: 25-day, 75-day, 200-day line relationships
- MACD: Identifying trend turning points
- Bollinger Bands: Volatility and contrarian entry points
Oscillators
- RSI: Over 70 overbought, below 30 oversold
- Stochastics: Short-term turning points
- Volume: Confirming price movement reliability
Sentiment Analysis
Capturing Investor Psychology
- Put/Call Ratio: Option market skew
- Bull/Bear Ratio: Investor surveys
- Fear & Greed Index: CNN Fear & Greed Index
News Flow Analysis
- Headline tone changes
- Media coverage frequency
- Social media buzzwords
Market Indicators Reference
Major Stock Indices
Japan
- Nikkei 225: Stock price average of 225 representative stocks on Tokyo Stock Exchange Prime
- Key levels: 30,000, 35,000, 40,000 yen
- Moving averages: Emphasize 25-day, 75-day, 200-day lines
- TOPIX: Market-cap weighted average of all Tokyo Stock Exchange Prime stocks
- Better reflects overall market
- Heavily influenced by banking/financial sector
United States
- S&P 500: 500 large-cap US stocks
- Most representative US stock index
- Key levels: 4,000, 4,500, 5,000 points
- NASDAQ: Tech-focused
- Reflects mega-cap tech stock trends like GAFAM
- Higher volatility
- Dow Jones Industrial Average: Simple average of 30 stocks
- Historically significant but limited representation
Foreign Exchange Rates
USD/JPY (Dollar-Yen)
- Greatest impact on Japanese economy
- Key levels: 140, 145, 150, 155 yen
- BOJ intervention alert line: Reference past intervention records
EUR/JPY (Euro-Yen)
- Related to European economy
- Influenced by ECB policy
CNY/JPY (Yuan-Yen)
- Reflects Chinese economic trends
- Indicator of Asian trade
Volatility Indicators
VIX Index (Fear Index)
- Calculated from S&P 500 option prices
- Quantifies market anxiety psychology
- Interpretation:
- 10-15: Low volatility, stable market
- 15-20: Normal range
- 20-30: Unstable, caution needed
- 30+: High stress, panic selling
Nikkei VI
- Volatility indicator for Nikkei Average
- Japanese version of VIX
Commodities
Crude Oil (WTI/Brent)
- Important as inflation indicator
- Reflects geopolitical risks
- Key levels: 70, 80, 90, 100 dollars/barrel
Gold
- Representative safe asset
- Tends to rise during dollar weakness/inflation
- Key levels: 1,900, 2,000, 2,100 dollars/ounce
Interest Rates & Bonds
US 10-Year Treasury Yield
- Most critical interest rate indicator
- Direct impact on stock valuations
- Key levels: 3.5%, 4.0%, 4.5%, 5.0%
Japan 10-Year Government Bond Yield
- Reflects BOJ policy
- Watch YCC target range
Sector-Specific Focus Points
Technology
- AI-related stock trends
- Semiconductor cycle
- Regulatory risks
Financials
- Heavily influenced by interest rate trends
- Bank lending attitudes
- Non-performing loan ratios
Energy
- Linked to crude oil prices
- Impact of decarbonization policies
- Renewable energy shift
Consumer
- Consumer confidence index
- Retail sales
- Inflation impact
#!/usr/bin/env python3
"""
Market Analysis Utility Functions for Environment Report
This script provides common functions for market analysis report creation.
"""
from datetime import datetime, timedelta
def get_market_session_times():
"""Returns major market trading hours"""
return {
"Tokyo": {"open": "09:00 JST", "close": "15:00 JST", "lunch": "11:30-12:30"},
"Shanghai": {"open": "09:30 CST", "close": "15:00 CST", "lunch": "11:30-13:00"},
"Hong Kong": {"open": "09:30 HKT", "close": "16:00 HKT", "lunch": "12:00-13:00"},
"Singapore": {"open": "09:00 SGT", "close": "17:00 SGT", "lunch": "12:00-13:00"},
"London": {"open": "08:00 GMT", "close": "16:30 GMT", "lunch": None},
"New York": {"open": "09:30 EST", "close": "16:00 EST", "lunch": None},
}
def format_market_report_header():
"""Format report header"""
now = datetime.now()
weekdays = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
return f"""
=====================================
📊 Daily Market Environment Report
=====================================
Created: {now.strftime("%Y-%m-%d")} ({weekdays[now.weekday()]}) {now.strftime("%H:%M")}
=====================================
"""
def calculate_trading_days_to_event(event_date_str):
"""Calculate trading days to event"""
# Simple version: excludes weekends (doesn't consider holidays)
event_date = datetime.strptime(event_date_str, "%Y-%m-%d")
today = datetime.now().date()
trading_days = 0
current = today
while current < event_date.date():
if current.weekday() < 5: # Monday to Friday
trading_days += 1
current += timedelta(days=1)
return trading_days
def format_percentage_change(value):
"""Format percentage change"""
if value >= 0:
return f"📈 +{value:.2f}%"
else:
return f"📉 {value:.2f}%"
def categorize_volatility(vix_value):
"""Categorize volatility based on VIX level"""
if vix_value < 12:
return "Low & Stable 😌"
elif vix_value < 20:
return "Normal Range 📊"
elif vix_value < 30:
return "Elevated ⚠️"
elif vix_value < 40:
return "High Volatility 🔥"
else:
return "Extreme Volatility 🚨"
def get_market_status():
"""Determine current market status"""
now = datetime.now()
hour = now.hour
status = []
# Simple market open determination (timezone not considered)
if 9 <= hour < 15:
status.append("🟢 Tokyo Market: Trading")
elif 15 <= hour < 18:
status.append("🔴 Tokyo Market: Closed")
else:
status.append("⏰ Tokyo Market: After hours")
if 21 <= hour or hour < 4:
status.append("🟢 US Market: Trading (previous day)")
else:
status.append("🔴 US Market: Closed")
return "\n".join(status)
def generate_checklist():
"""Generate market analysis checklist"""
return """
📋 Analysis Checklist
--------------------
□ US market status check
□ Asian market status check
□ European market status check
□ Forex rates (USD/JPY, EUR/USD, CNY)
□ Index futures movements
□ VIX level check
□ Oil & Gold prices
□ Economic calendar
□ Corporate earnings schedule
□ Central bank news
□ Geopolitical risks
"""
if __name__ == "__main__":
print("Market Analysis Utility - Test Run")
print(format_market_report_header())
print("\nCurrent Market Status:")
print(get_market_status())
print("\nTrading Hours:")
for market, times in get_market_session_times().items():
lunch = f" (Lunch break: {times['lunch']})" if times.get("lunch") else ""
print(f" {market}: {times['open']} - {times['close']}{lunch}")
print(generate_checklist())
#!/usr/bin/env python3
"""Tests for market_utils.py"""
import sys
from datetime import datetime
from pathlib import Path
from unittest.mock import patch
import pytest
sys.path.insert(0, str(Path(__file__).parent.parent))
from market_utils import (
calculate_trading_days_to_event,
categorize_volatility,
format_market_report_header,
format_percentage_change,
generate_checklist,
get_market_session_times,
get_market_status,
)
class TestGetMarketSessionTimes:
def test_returns_dict_with_major_markets(self):
result = get_market_session_times()
assert isinstance(result, dict)
expected_markets = ["Tokyo", "Shanghai", "Hong Kong", "Singapore", "London", "New York"]
for market in expected_markets:
assert market in result
def test_each_market_has_open_and_close(self):
result = get_market_session_times()
for market, times in result.items():
assert "open" in times, f"{market} missing 'open'"
assert "close" in times, f"{market} missing 'close'"
def test_asian_markets_have_lunch_break(self):
result = get_market_session_times()
asian_markets = ["Tokyo", "Shanghai", "Hong Kong", "Singapore"]
for market in asian_markets:
assert result[market].get("lunch") is not None, f"{market} should have lunch break"
def test_western_markets_no_lunch_break(self):
result = get_market_session_times()
western_markets = ["London", "New York"]
for market in western_markets:
assert result[market].get("lunch") is None, f"{market} should not have lunch break"
class TestFormatMarketReportHeader:
def test_returns_string(self):
result = format_market_report_header()
assert isinstance(result, str)
def test_contains_title(self):
result = format_market_report_header()
assert "Market Environment Report" in result
@patch("market_utils.datetime")
def test_contains_formatted_date(self, mock_datetime):
mock_now = datetime(2025, 3, 15, 14, 30)
mock_datetime.now.return_value = mock_now
result = format_market_report_header()
assert "2025-03-15" in result
assert "Saturday" in result
assert "14:30" in result
class TestCalculateTradingDaysToEvent:
@patch("market_utils.datetime")
def test_same_day_returns_zero(self, mock_datetime):
mock_datetime.now.return_value.date.return_value = datetime(2025, 3, 10).date()
mock_datetime.strptime = datetime.strptime
result = calculate_trading_days_to_event("2025-03-10")
assert result == 0
@patch("market_utils.datetime")
def test_weekend_excluded(self, mock_datetime):
# Monday Mar 10 to Monday Mar 17 = 5 trading days
mock_datetime.now.return_value.date.return_value = datetime(2025, 3, 10).date()
mock_datetime.strptime = datetime.strptime
result = calculate_trading_days_to_event("2025-03-17")
assert result == 5
@patch("market_utils.datetime")
def test_within_week(self, mock_datetime):
# Monday Mar 10 to Friday Mar 14 = 4 trading days
mock_datetime.now.return_value.date.return_value = datetime(2025, 3, 10).date()
mock_datetime.strptime = datetime.strptime
result = calculate_trading_days_to_event("2025-03-14")
assert result == 4
class TestFormatPercentageChange:
def test_positive_value(self):
result = format_percentage_change(1.5)
assert "+1.50%" in result
assert "📈" in result
def test_negative_value(self):
result = format_percentage_change(-2.3)
assert "-2.30%" in result
assert "📉" in result
def test_zero_value(self):
result = format_percentage_change(0)
assert "+0.00%" in result
assert "📈" in result
class TestCategorizeVolatility:
def test_low_volatility(self):
result = categorize_volatility(10)
assert "Low" in result
def test_normal_range(self):
result = categorize_volatility(15)
assert "Normal" in result
def test_elevated(self):
result = categorize_volatility(25)
assert "Elevated" in result
def test_high_volatility(self):
result = categorize_volatility(35)
assert "High" in result
def test_extreme_volatility(self):
result = categorize_volatility(45)
assert "Extreme" in result
def test_boundary_values(self):
assert "Low" in categorize_volatility(11.99)
assert "Normal" in categorize_volatility(12)
assert "Normal" in categorize_volatility(19.99)
assert "Elevated" in categorize_volatility(20)
assert "Elevated" in categorize_volatility(29.99)
assert "High" in categorize_volatility(30)
assert "High" in categorize_volatility(39.99)
assert "Extreme" in categorize_volatility(40)
class TestGetMarketStatus:
def test_returns_string(self):
result = get_market_status()
assert isinstance(result, str)
def test_contains_market_names(self):
result = get_market_status()
assert "Tokyo" in result
assert "US" in result
class TestGenerateChecklist:
def test_returns_string(self):
result = generate_checklist()
assert isinstance(result, str)
def test_contains_checklist_items(self):
result = generate_checklist()
assert "US market" in result
assert "Asian market" in result
assert "European market" in result
assert "VIX" in result
assert "Oil" in result
assert "Gold" in result
if __name__ == "__main__":
pytest.main([__file__, "-v"])
Related skills
Forks & variants (1)
Market Environment Analysis has 1 known copy in the catalog totaling 240 installs. They canonicalize to this original listing.
- wind-information-co-ltd - 240 installs
FAQ
What does market-environment-analysis focus on?
Macro and market regime context including volatility and environment factors for trading decisions.
When should I use market-environment-analysis?
Before strategy or signal skills when you need market backdrop and regime assessment.
Is market-environment-analysis safe to install?
Review the Security Audits panel on this page before installing in production.