cse-stock-analysis

star 0

Deep analysis of individual stocks listed on the Colombo Stock Exchange (CSE). Use when user asks to "analyze a stock", "should I buy JKH", "what do you think about COMB", "analyze SAMP", "deep dive on DIAL", or requests technical/fundamental/sentiment analysis for any CSE-listed company. Covers technical indicators (RSI, MACD, Bollinger Bands, SMA), fundamental metrics (P/E, market cap, 52-week range), news sentiment, and AI-generated buy/sell/hold recommendations with price targets.

DevinHansa By DevinHansa schedule Updated 3/7/2026

name: cse-stock-analysis description: Deep analysis of individual stocks listed on the Colombo Stock Exchange (CSE). Use when user asks to "analyze a stock", "should I buy JKH", "what do you think about COMB", "analyze SAMP", "deep dive on DIAL", or requests technical/fundamental/sentiment analysis for any CSE-listed company. Covers technical indicators (RSI, MACD, Bollinger Bands, SMA), fundamental metrics (P/E, market cap, 52-week range), news sentiment, and AI-generated buy/sell/hold recommendations with price targets. metadata: author: CSE Advisor version: 1.0.0 category: stock-analysis tags: [cse, sri-lanka, stock-analysis, technical-analysis, fundamental-analysis]

CSE Stock Analysis

Instructions

Step 1: Identify the Stock Symbol

  • User may provide a symbol (e.g., JKH, COMB, SAMP) or company name
  • CSE symbols use .N0000 suffix internally (e.g., JKH.N0000)
  • If company name given, match to the correct CSE symbol
  • Common mappings: JKH = John Keells Holdings, COMB = Commercial Bank, SAMP = Sampath Bank, DIAL = Dialog Axiata, CTC = Ceylon Tobacco, HNB = Hatton National Bank

Step 2: Gather Data

Run the analysis pipeline by executing:

python main.py analyze {SYMBOL}

This fetches and analyzes:

  1. Current price data from CSE API (open, high, low, close, volume)
  2. Company fundamentals (market cap, P/E ratio, beta, 52-week high/low)
  3. Technical indicators via pandas-ta (RSI, MACD, Bollinger Bands, SMA 20/50/200, ADX, Stochastic, OBV)
  4. TradingView analysis (real-time recommendation from TradingView)
  5. News sentiment (recent articles mentioning the stock, VADER sentiment scores)
  6. Sector comparison (how the stock compares to sector peers)

Step 3: Interpret Results

Present the analysis in this structured format:

Price Action

  • Current price vs 52-week range (% from high and low)
  • Recent trend direction (up/down/sideways)
  • Volume analysis (above/below average)

Technical Signals

  • Trend: SMA crossovers (golden cross / death cross), ADX strength
  • Momentum: RSI overbought (>70) / oversold (<30), MACD signal
  • Volatility: Bollinger Band squeeze or expansion, ATR levels
  • Volume: OBV trend, volume confirmation of price moves
  • Composite score: Weighted -1.0 to +1.0 technical score

Fundamental Assessment

  • P/E ratio vs sector average
  • Market cap tier (large/mid/small cap)
  • Beta risk assessment
  • 52-week range position

News & Sentiment

  • Recent headlines and their sentiment
  • Overall sentiment score for the stock
  • Key catalysts or risks from news

Step 4: Generate Recommendation

Provide a clear recommendation:

  • Action: STRONG BUY / BUY / HOLD / SELL / STRONG SELL
  • Confidence: 1-10 scale with reasoning
  • Timeframe: Short-term (1-4 weeks), Medium-term (1-6 months), Long-term (6+ months)
  • Entry price range: Suggested buy zone
  • Target price: Based on technical and fundamental analysis
  • Stop-loss level: Risk management level
  • Key risks: What could go wrong
  • Key catalysts: What could drive the stock higher

Important Notes

  • CSE trades Mon-Fri, 9:30 AM - 2:30 PM Sri Lanka time
  • Always mention that this is AI-assisted analysis, not financial advice
  • Consider Sri Lanka's macro environment (inflation, interest rates, LKR exchange rate)
  • CSE is a frontier market with lower liquidity — always factor in liquidity risk
  • Some CSE stocks have very thin trading volumes; warn about this if applicable

Examples

Example 1: Quick Analysis

User says: "Analyze JKH" Actions:

  1. Run python main.py analyze JKH
  2. Present technical, fundamental, and sentiment analysis
  3. Provide buy/sell/hold recommendation with price targets

Example 2: Comparison

User says: "Compare COMB and SAMP" Actions:

  1. Run analysis on both stocks
  2. Compare key metrics side by side
  3. Recommend which is the better buy and why

Example 3: Sector Analysis

User says: "What's the best banking stock to buy?" Actions:

  1. Identify banking sector stocks (COMB, SAMP, HNB, NTB, etc.)
  2. Run analysis on the top candidates
  3. Rank by composite score and recommend

Troubleshooting

Error: No price data available Cause: CSE API may be down or market is closed Solution: Check if market hours are active, retry later, use cached data

Error: TradingView analysis unavailable Cause: Symbol mapping issue or TradingView rate limit Solution: Fall back to internal technical analysis only

Install via CLI
npx skills add https://github.com/DevinHansa/agentic_ai_stock_market_advisor --skill cse-stock-analysis
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator