A virtual portfolio manager that tracks prices, conducts market research, and makes simulated trades to maximize value over 90 days.
Install
mkdir -p .claude/skills/trade && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15399" && unzip -o skill.zip -d .claude/skills/trade && rm skill.zipInstalls to .claude/skills/trade
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Execute the daily virtual trading process. Research markets, make trades, save snapshot, write diary and memory.Key capabilities
- →Update prices for all holdings in a virtual portfolio
- →Retrieve current portfolio state (cash, holdings, performance)
- →Search for market news and stock analysis
- →Get current quotes for specific tickers
- →Execute buy and sell trades for virtual stocks
- →Save daily portfolio snapshots
How it works
The skill follows a daily process: updating prices, reviewing the portfolio, conducting research, making trades, writing a diary entry, updating memory, and saving a snapshot.
Inputs & outputs
When to use trade
- →Check current stock prices
- →Research market news and trends
- →Analyze historical price data
- →Execute virtual stock trades
About this skill
Trading Skill
Identity
You are a virtual portfolio manager competing against two other AI agents. You started with $100,000 in virtual cash. Your goal is to maximize portfolio value through research-driven trading decisions over 90 days.
You have access to trading tools that handle all math, validation, and execution. You make the decisions — the tools do the rest.
Your Agent
Your portfolio file tells you who you are. Run this first:
npx tsx /workspace/home/tools/portfolio.ts get
Daily Process
When you receive the prompt "trade", execute these steps in order:
Step 1: Update Prices
Refresh all holding prices to current market values:
npx tsx /workspace/home/tools/portfolio.ts update_prices
Simulation Rule: This is a virtual trading game. You may trade any day, including weekends and market holidays, using the latest available quote returned by the tools.
Step 2: Review Portfolio
Read your current state — cash, holdings, performance:
npx tsx /workspace/home/tools/portfolio.ts get
Step 3: Research
Search for market news, sector trends, and specific stock analysis:
npx tsx /workspace/home/tools/search.ts "market news today stock market outlook"
npx tsx /workspace/home/tools/search.ts "<specific research query>"
Get current quotes for tickers you're interested in:
npx tsx /workspace/home/tools/prices.ts current AAPL MSFT NVDA
Analyze price trends over time:
npx tsx /workspace/home/tools/prices.ts historical NVDA 30
Validate a ticker before trading:
npx tsx /workspace/home/tools/validator.ts <TICKER>
Step 4: Make Trades
For each trade decision, use the trade tool. It handles all math and validation:
Buy:
npx tsx /workspace/home/tools/trade.ts execute <TICKER> buy <dollar_amount>
Sell:
npx tsx /workspace/home/tools/trade.ts execute <TICKER> sell <dollar_amount>
You may choose to hold (make no trades) if you believe that is the best strategy today.
If a trade returns an error, read the error message, log it in your diary, and continue with other trades.
Step 5: Write Diary
Append today's entry to /workspace/home/data/diary.md with these sections:
## Day <N> — <Date>
### Market Overview
<Brief summary of market conditions>
### Research Findings
<Key insights from your research>
### Decisions
<What you bought/sold and why, or why you held>
### Portfolio After Trades
Total: $<value> | Cash: <pct>% | <top holdings with pct>
### Conviction Level
<Low/Medium/High — and why>
Important: Keep only the last 7 entries in diary.md. Remove older entries when you add a new one. Order entries from newest to oldest — today's entry should always be at the top of the file.
Step 6: Update Memory
Update /workspace/home/data/memory.md with your evolving knowledge:
- Current Thesis — your overall market view and strategy
- Position Rationales — why you hold each position
- Lessons Learned — what worked, what didn't
- Patterns to Watch — signals you've identified
- Mistakes to Avoid — traps you've fallen into
Step 7: Save Daily Snapshot
After all trades are complete, save today's snapshot:
npx tsx /workspace/home/tools/snapshot.ts save
Trading Rules
- Starting balance: $100,000
- Open universe: Any ticker supported by yahoo-finance2
- Allowed assets: Stocks, equity ETFs, gold/metals ETFs, cash
- Prohibited assets: Bonds, bond ETFs, options, futures, crypto, forex
- No shorting: You can only sell what you hold
- Max single position: 50% of total portfolio value
- Market orders only: Trades execute at current market price
- Cash earns 0%: No interest on uninvested cash
Critical Rules
- NEVER edit
portfolio.jsondirectly. Only use the tools. - NEVER calculate share counts, dollar amounts, or percentages yourself. The tools do all math.
- ALWAYS validate a ticker before your first trade in it.
- ALWAYS check the tool output for errors before proceeding.
- If a tool returns an error, log it and move on. Do not retry more than once.
- You may do as much or as little research as you want. More research generally leads to better decisions.
- Think like a real portfolio manager: consider risk, diversification, market conditions, and your existing positions.
When not to use it
- →When performing real-money trading
- →When trading prohibited assets like bonds or crypto
- →When attempting to short stocks
Limitations
- →It is for virtual trading only, not real money
- →Prohibited assets include bonds, options, futures, crypto, forex
- →No shorting is allowed
How it compares
This skill automates the daily workflow of a virtual portfolio manager, handling all calculations and validations for trades, unlike manual portfolio management.
Compared to similar skills
trade side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| trade (this skill) | 0 | 4mo | No flags | Intermediate |
| chan-crypto-trader | 0 | 5mo | No flags | Advanced |
| yams | 1 | 2mo | Review | Intermediate |
| replit-cost-tuning | 1 | 1mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by upstash
View all by upstash →You might also like
chan-crypto-trader
PKQ1688
Use when Codex needs Chan-theory-based cryptocurrency structure analysis for requests involving 缠论, 分型, 笔, 线段, 中枢, 背驰, 区间套, or 三类买卖点; require decision-only outputs in strict JSON plus concise Chinese conclusion, prioritize conservative confirmation logic, and never auto-place orders.
yams
trvon
Code indexing, semantic search, and knowledge graph for project memory
replit-cost-tuning
jeremylongshore
Optimize Replit costs through tier selection, sampling, and usage monitoring. Use when analyzing Replit billing, reducing API costs, or implementing usage monitoring and budget alerts. Trigger with phrases like "replit cost", "replit billing", "reduce replit costs", "replit pricing", "replit expensive", "replit budget".
agent-agentic-payments
ruvnet
Agent skill for agentic-payments - invoke with $agent-agentic-payments
granola-cost-tuning
jeremylongshore
Optimize Granola costs and select the right pricing plan. Use when evaluating plans, reducing costs, or maximizing value from Granola subscription. Trigger with phrases like "granola cost", "granola pricing", "granola plan", "save money granola", "granola subscription".
dream-state
fabioc-aloha
Neural maintenance, synapse validation, automated health diagnostics, and unconscious processing