live-strategy
Operate AlphaGPT live strategy, risk, portfolio state, STOP control, and guarded Solana/Jupiter execution.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- live-strategy
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Operate AlphaGPT live strategy, risk, portfolio state, STOP control, and guarded Solana/Jupiter execution.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/execution-safety.md6.0 KB
- 参考文档references/live-strategy-reference.md10.1 KB
- 参考文档references/troubleshooting.md5.8 KB
- 脚本scripts/alpha_gpt_trading_config_check.py15.6 KB
03 SKILL.md 正文
Live Strategy
Use this sub-skill when the task is about AlphaGPT's live strategy runner, risk checks, portfolio state, STOP signal, or Solana/Jupiter execution preflight. This is the safety-critical route: live commands can use private keys, wallet funds, RPC endpoints, Jupiter quotes/swaps, and a database-backed signal loop.
Do not route here for
- Creating or validating formula tokens before live use; use factor-mining.
- Populating or repairing the market database; use data-pipeline.
- Streamlit visuals, dashboard fixture files, or STOP button display; use dashboard-ops.
Read or run
- Read references/live-strategy-reference.md for prerequisites, loop lifecycle, thresholds, portfolio state, STOP semantics, and guarded run checklist.
- Read references/execution-safety.md for Solana/Jupiter credentials, signing, slippage, wallet funds, and transaction-safety gates.
- Read references/troubleshooting.md for missing strategy JSON, missing private key, RPC/Jupiter failures, dependency pins, STOP-signal problems, and empty data.
- Run scripts/alpha_gpt_trading_config_check.py before any live run. It is offline and never contacts RPC, Jupiter, Postgres, or the network.
- Use the root environment checker with
--scope livefor broader import/env checks.
Non-negotiable guardrail
Never start the live runner, call SolanaTrader.buy, call SolanaTrader.sell,
or run transaction-capable native scripts unless the user has explicitly
authorized live trading for the current wallet, funds, network, token universe,
and slippage policy. Offline validation is not live-trading approval.
Safe default workflow
- Validate
best_meme_strategy.jsonwith the checker; it may be a bare token list or an object with aformulakey. - Confirm formula tokens are in range
0..17and route malformed formulas to factor-mining. - Check whether
STOP_SIGNALor a customSTOP_SIGNAL_PATHis already active. - Review thresholds before authorizing live operation: max positions, entry amount, stop loss, take profit, trailing stop, buy threshold, and sell threshold.
- Confirm DB rows exist and are fresh enough for
CryptoDataLoader.load_data(); route empty DB issues to data-pipeline. - Confirm Solana/Jupiter credentials and wallet risk only after the offline checks pass.
- Treat native live commands as last-mile operations, not verification defaults.
Core runtime facts
StrategyRunner.run_loop(self)periodically syncs data, loads tensors, monitors positions, scans entries, and sleeps between cycles.RiskEngine.check_safety(self, token_address, liquidity_usd)rejects low liquidity and checks a Jupiter sell quote.PortfolioManager.add_position(self, token, symbol, price, amount, cost_sol)persists position state toportfolio_state.json.SolanaTrader.buy(self, token_address: str, amount_sol: float, slippage_bps=500)andsell(self, token_address: str, percentage=1.0, slippage_bps=500)are live transaction-capable methods.JupiterAggregator.get_quote(self, input_mint, output_mint, amount_integer, slippage_bps=None)contacts Jupiter's quote API.execution/trader.pycontains an inline native test that can attempt a sell; do not use it as a smoke test.
Quick route map
| User intent | Read/run | Notes |
|---|---|---|
| "Can I safely start the bot?" | scripts/alpha_gpt_trading_config_check.py then references/live-strategy-reference.md | Offline preflight first, explicit live approval second. |
| "How do buy/sell and quotes work?" | references/execution-safety.md | Explains quote, swap transaction, signing, and confirmation flow. |
| "Why did the runner exit at startup?" | references/troubleshooting.md | Usually missing strategy file or STOP signal. |
| "Why did no trade happen?" | references/troubleshooting.md | Check thresholds, DB tensors, risk quote, balance, and position limits. |
| "Where did positions go?" | references/live-strategy-reference.md | Covers portfolio_state.json shape and persistence. |
Verification stance
Native live strategy and execution candidates are skipped by default because they need credentials, network, database state, wallet funds, and explicit trading authorization. Use the bundled checker and static route review for ordinary verification.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).