360 Secure SkillHub
360 安全技能中心

Monte Carlo Crypto Core

该 Skill 通过 Python 脚本对资产价格做几何布朗运动蒙特卡洛模拟,输入现价、日波动率、漂移、天数、路径数、仓位方向及止损/止盈价位,输出预期价格、5%/95% 分位情景和包含止损触发概率、胜率的风险指标 JSON。每次调用需传入用户 ID 并经 SkillPay 计费。

totoxu
totoxu
热度 54.32
最近更新 2026-05-11 17:28:54
分类:数据依赖:代码执行 / 第三方 API应用场景:市场分析 / 财务 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add totoxu-montecarlo
Metadata
name
totoxu-montecarlo
description
Monte Carlo Crypto Trading Core. Simulates thousands of future price paths (Geometric Brownian Motion) to evaluate win probabilities, risk of ruin, and stop-loss impact for trading strategies.
version
1.0.0
author
totoxu
requires
{"binaries":["python3"],"env":["SKILL_BILLING_API_KEY","SKILL_ID"]}
metadata
{"clawdbot":{"requires":{"env":["SKILL_BILLING_API_KEY","SKILL_ID"]},"files":["scripts/*"]}}

Monte Carlo Crypto Core

This skill enables you to run sophisticated Monte Carlo simulations for trading strategies. It helps answer questions like: "If I buy BTC at $70,000 with 5% daily volatility and put a stop loss at $65,000, what is the probability I get stopped out within 30 days?"

Setup

  1. Install requests: pip install requests
  2. Set the SKILLPAY_API_KEY environment variable with the skill owner's SkillPay API key.

Billing (0.001 USDT per call via SkillPay)

This is a paid skill. Every simulation call requires the --user USER_ID parameter. If a call fails with a payment_url, you must show this link to the user.


Tool: Run Monte Carlo Simulation

Command:

python scripts/montecarlo.py --user USER_ID --price 70000 --vol 0.04 --drift 0.001 --days 30 --paths 5000 --stop-loss 65000 --position long

Required Parameters:

  • --user: The user's ID for billing.
  • --price: The current price of the asset.
  • --vol: The estimated daily volatility as a decimal (e.g., 0.04 for 4%). You can derive this from historical data standard deviation.

Optional Parameters:

  • --drift: The expected daily return. Default is 0.0. Positive drift favours longs, negative favours shorts.
  • --days: Number of days to simulate into the future. Default: 30.
  • --paths: Number of simulation paths to run. Higher is more accurate but slower. Max is 20000, Default 10000.
  • --position: long or short. Default is long.
  • --stop-loss: The exact price level where the position gets liquidated or closed for a loss.
  • --take-profit: The exact price level where the position closes in profit.

Output: Returns a JSON object containing expected prices, 5th/95th percentile worst/best case scenarios, and risk_metrics including the exact probability of hitting the stop loss (hit_stop_loss_pct) and overall win probability.

Use these probabilities to justify your trading advice to the user. Do not recommend trades with a win_probability_pct lower than 50% unless the user explicitly accepts high risk.