Skip to main content
Glama

Korea Stock Analyzer MCP Server

by Mrbaeksang
base-analyzer.ts1.31 kB
/** * 기본 분석기 클래스 - 모든 투자 대가 분석의 베이스 */ import { FinancialData, GuruAnalysis } from '../types/index.js'; export abstract class BaseAnalyzer { protected name: string; protected method: string; constructor(name: string, method: string) { this.name = name; this.method = method; } /** * 분석 실행 (각 대가별로 구현) */ abstract analyze(data: any): Promise<GuruAnalysis>; /** * 투자 추천 등급 결정 */ protected getRecommendation(upside: number): 'Strong Buy' | 'Buy' | 'Hold' | 'Sell' | 'Strong Sell' { if (upside > 30) return 'Strong Buy'; if (upside > 15) return 'Buy'; if (upside > -10) return 'Hold'; if (upside > -20) return 'Sell'; return 'Strong Sell'; } /** * 상승 여력 계산 */ protected calculateUpside(fairValue: number, currentPrice: number): number { if (currentPrice <= 0) return 0; return ((fairValue - currentPrice) / currentPrice) * 100; } /** * 평균 계산 헬퍼 */ protected average(values: number[]): number { if (values.length === 0) return 0; const validValues = values.filter(v => v > 0); if (validValues.length === 0) return 0; return validValues.reduce((sum, val) => sum + val, 0) / validValues.length; } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Mrbaeksang/korea-stock-analyzer-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server