Stock Simulation Portfolio
Paste the following prompt into your AI chat to install this skill:
Please install @user_49d73d01/stocksimulate according to https://skillhub.cn/install/skillhub.md.
About this skill
A Local Simulation Workflow
Many individual traders want to test discipline, sizing, or historical decision making without exposing real capital. This skill provides a local stock simulation portfolio: it uses akshare for real-time or historical prices and pandas to maintain account, holdings, and transaction records in CSV files, making repeated trade reviews practical.
Core Capabilities and How It Works
It keeps RMB and HKD balances separate, which avoids mixing A-share and HK stock funds:
- --init creates simulated balances, with optional rmb and hkd amounts.
- --buy buys by ticker, quantity, and market, with optional --date for past trading days.
- --sell reduces a held position; short selling is not allowed.
- --show displays current holdings and cost, while --price queries one ticker.
- --reset clears account data for a fresh start.
Data persists in the user config directory, usually %APPDATA%\stock-simulate or ~/.config/stock-simulate, in account.csv, holdings.csv, and transactions.csv. Repeated buys for the same ticker accumulate average cost, and historical-date trades resolve to that date or the nearest available trading day.
Boundaries and Caveats
This is suitable for strategy rehearsal, position planning, and workflow familiarity, not for replacing broker systems or production trading. Price quality depends on akshare; if the data source is unavailable, fields change, or a ticker cannot be resolved, results may be affected. Because state is stored as local CSV files, deleting the config directory can remove account and holding data, so backups are recommended.
Use Cases
- While reviewing HK stock trades, buy Tencent in a simulated account and check position cost.
- While testing A-share positions, initialize an RMB account and buy a specified ticker.
- While running historical what-if analysis, buy a stock on 2026-01-01 using --date.
- While clearing test data, reset the account and remove current holdings and transaction records.
Best For
- Individual investors who want to practice HK stock buying and position sizing without real capital.
- Quant enthusiasts who need to track trading discipline and review average cost and holding structure.
- Data analysts who want to test stock strategy assumptions with local CSV data.
- Finance students learning how RMB and HKD stock account funds should be managed separately.
Related Skills
Lady's Man provides relationship-aware conversation suggestions for openers, invitations, care, replies, and confessions, with risk levels and boundary reminders.
A Dianping merchant decision assistant that weighs ratings, review risks, deal limits, and use-case fit for practical recommendations.
Configure a Baidu Youjia key and query car models, dealer prices, discounts, landed costs, and owner prices in natural language, returning Markdown-ready results.
A pet medical reference assistant for cats and dogs that provides triage-based guidance on diagnosis, medication, treatment, and prevention, with disclaimers and no replacement for veterinary care.