# Investment Agent

> Use when the user invokes /investment-skill, $investment-skill, /investment-agent, or $investment-agent, or asks for daily investment reports, position reviews, entry timing checks, or Korean/US market analysis through Codex or another agent runtime.

- **Type:** Skill
- **Install:** `agentstack add skill-jungducknam-investment-agent-skill-investment-agent-skill`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [jungducknam](https://agentstack.voostack.com/s/jungducknam)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [jungducknam](https://github.com/jungducknam)
- **Source:** https://github.com/jungducknam/investment-agent-skill

## Install

```sh
agentstack add skill-jungducknam-investment-agent-skill-investment-agent-skill
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Investment Agent Skill

This skill supports two deployment styles. Pick one based on the user's intent.

## Command Invocation

Treat `/investment-skill` as the primary explicit invocation alias. The text after the command is the user request. Also support `$investment-skill`, `/investment-agent`, and `$investment-agent` as aliases.

Default to Mode B for command-style invocations unless the user explicitly asks to run a Telegram bot, background service, scheduler, server, or deployment.

Command routing:

- `/investment-skill 금일 리포트 작성`, `/investment-skill 오늘 리포트`, `/investment-skill daily report`: run `scripts/build_agent_request.py report`.
- `/investment-skill 오늘 반도체 섹터 어때?`, stock/sector/macro questions, or general investment questions: run `scripts/build_agent_request.py chat ""`.
- `/investment-skill 포지션 점검 ...`: if the user provides complete position JSON or enough fields to build it, run `scripts/build_agent_request.py position --position-json ''`; otherwise ask for the missing ticker, market, entry price, quantity, direction, and current price if needed.

When using Mode B, read the returned JSON payload and use its `system_prompt`, `user_prompt`, and `data` as context for the final answer. The payload is an internal handoff format, not the user-facing result. Do not expose the raw payload unless the user asks for it. Report prompts contain a `REPORT_INPUT_JSON` object with a deterministic execution layer; use its `action_status`, `risk_gate_status`, `is_executable`, and price/risk fields as authoritative.

For report requests, produce a human-readable Korean Markdown report. Do not answer with raw JSON. Include a one-line conclusion, market overview, sector/theme summary, an action plan based only on deterministic execution statuses, wait/do-not-chase candidates, portfolio strategy, key risks, data-quality notes, and an investment disclaimer. Do not invent prices, targets, stops, position sizes, or execution permissions that are absent from `price_engine_output`, `risk_gate_results`, or the returned report data.

## Mode A: Standalone Telegram System

Use this when the user wants a 24/7 bot server.

- Requires `TELEGRAM_BOT_TOKEN`, `TELEGRAM_CHAT_ID`, and an OpenAI-compatible `OPENAI_API_KEY`.
- Runs `python run.py` or the systemd service template.
- Telegram is the UI. The bot collects data, calls the configured AI API, stores reports/positions locally, and sends replies or alerts.
- Entry point: `src/bot.py`.
- AI API entry point: `src/ai_client.py`.

Setup:

```bash
cp templates/config/.env.example .env
pip install -r requirements.txt
python run.py
```

## Mode B: On-Demand Agent Command

Use this when Codex, OpenAI Agents SDK, Manus, or another agent runtime should act as the AI.

- Does not require Telegram credentials.
- Does not start a long-running scheduler or background automation.
- Builds market context, enriched news context, data-quality checks, and deterministic execution prompts only when the user asks.
- The outer agent should read the returned `system_prompt` and `user_prompt`, then answer with its own model.
- Entry point: `src/agent_adapter.py`.
- CLI helper: `scripts/build_agent_request.py`.

Examples:

```bash
scripts/build_agent_request.py report
scripts/build_agent_request.py chat "오늘 반도체 섹터 어때?"
scripts/build_agent_request.py position --position-json '{"id":1,"name":"NVIDIA","ticker":"NVDA","market":"US","entry_price":100,"quantity":2,"currency":"USD","direction":"long"}' --current-price 112
```

Python:

```python
from src.agent_adapter import build_report_request

request = build_report_request()
# Send request["system_prompt"] and request["user_prompt"] to the outer agent model.
```

## Core Analysis Modules

- `src/report_engine.py`: collects on-demand market data and builds `REPORT_INPUT_JSON` prompts.
- `src/price_engine.py`: calculates entry, stop, target, risk/reward, and position size.
- `src/risk_gate.py`: blocks unsafe or unsupported execution candidates.
- `src/recommendation_safety.py`: applies deterministic safety controls to LLM candidates.
- `src/data_quality_engine.py`: scores stale, missing, or conflicting market data.
- `src/news_classifier.py` / `src/news_impact_engine.py`: classify report news and score market impact.
- `src/momentum_inflection.py`: detects momentum phase and inflection quality.
- `src/market_regime_engine.py`: classifies Korean and US market regimes and risk budgets.
- `src/entry_filter.py`: checks RSI, Bollinger Bands, volume, and ADX for entry timing.
- `src/position_tracker.py`: parses and evaluates positions.

This skill can use local market memory and snapshot/news outcome stores when present, but Mode B remains on-demand: it does not start Telegram, a scheduler, or a background service unless the user explicitly asks for standalone bot mode.

Read `references/module-guide.md` for module details and `references/prompt-engineering.md` for prompt rules.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [jungducknam](https://github.com/jungducknam)
- **Source:** [jungducknam/investment-agent-skill](https://github.com/jungducknam/investment-agent-skill)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-jungducknam-investment-agent-skill-investment-agent-skill
- Seller: https://agentstack.voostack.com/s/jungducknam
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
