PNL Toolkit

Eight free investment and trading calculators with PNG charts and editable result links.

我该使用它吗

质量与安全性

A
描述质量
100%
模式完整度
90%
命名质量
83%
投毒风险
100%
权限匹配度
100%
协议合规性
100%

基于对工具定义和协议合规性的自动分析。

上下文开销

~7,930token 数(工具定义)
~10.4 KB典型响应大小
对注意力有显著影响(占 128k 上下文窗口的 6.20%)

这是每次将服务器的工具加载到模型上下文窗口时所消耗的大致 token 数。数值越高,可用于其他任务的注意力就越少。

安装

一键安装

将以下内容添加到你的 `claude_desktop_config.json` 文件中:

{
  "mcpServers": {
    "calculators": {
      "url": "https://pnltoolkit.com/mcp"
    }
  }
}

远程端点

https://pnltoolkit.com/mcpstreamable-http

它能做什么

工具清单

工具(8)

🟢 只读🟡 写入🔴 删除⚪ 未知
🟢historical_return(asset, start, end, amount, unit, ...)

Historical investment return using installed monthly closes, not live quotes. Asset ticker, start/end months YYYY-MM, amount in USD (unit=cash) or historical shares/coins (unit=coins), buying fee in percent, optional benchmark and total/price return basis. Omitted dates use calculator defaults clamped to asset/benchmark coverage. Returns data coverage/source metadata and the free calc-return PNG. Returns results, conditions, assumptions, an editable link, share page and PNG. No account access or order execution.

输入模式

{
  "type": "object",
  "properties": {
    "asset": {
      "type": "string",
      "description": "Asset ticker. Available historical start dates vary by asset.",
      "default": "BTC",
      "enum": [
        "BTC",
        "ETH",
        "SOL",
        "SPY",
        "QQQ",
        "VTI",
        "VXUS",
        "GLD",
        "TLT",
        "AAPL",
        "MSFT",
        "NVDA",
        "TSLA"
      ]
    },
    "start": {
      "type": "string",
      "description": "Start month, YYYY-MM.",
      "default": "2016-10",
      "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
    },
    "end": {
      "type": "string",
      "description": "End month, YYYY-MM. Must be within the installed data snapshot.",
      "default": "2026-09",
      "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
    },
    "amount": {
      "type": "number",
      "description": "Dollar budget including fees, or coin/share quantity when unit is coins.",
      "default": 1000,
      "minimum": 0.000001,
      "maximum": 1000000000
    },
    "unit": {
      "type": "string",
      "description": "cash for a dollar budget; coins for a coin or share quantity.",
      "default": "cash",
      "enum": [
        "cash",
        "coins"
      ]
    },
    "returnBasis": {
      "type": "string",
      "description": "total reinvests distributions; price excludes distributions.",
      "default": "total",
      "enum": [
        "total",
        "price"
      ]
    },
    "buyFee": {
      "type": "number",
      "description": "Buying fee as a percentage, e.g. 0.1 means 0.1%.",
      "default": 0,
      "minimum": 0,
      "maximum": 20
    },
    "benchmark": {
      "type": "string",
      "description": "Optional benchmark asset.",
      "default": "none",
      "enum": [
        "none",
        "SPY",
        "QQQ",
        "BTC"
      ]
    },
    "include_image": {
      "type": "boolean",
      "default": false,
      "description": "Also inline a PNG no wider than 1000 pixels. Image URL is always returned."
    }
  },
  "additionalProperties": false
}

输出模式

{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "frequency",
        "is_live",
        "period_start",
        "period_end",
        "available_from",
        "as_of",
        "sources"
      ],
      "properties": {
        "frequency": {
          "type": "string",
          "const": "monthly"
        },
        "is_live": {
          "type": "boolean",
          "const": false
        },
        "period_start": {
          "type": "string",
          "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
        },
        "period_end": {
          "type": "string",
          "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
        },
        "available_from": {
          "type": "string",
          "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
        },
        "as_of": {
          "type": "string",
          "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
          "description": "Last installed month available for both the selected asset and any benchmark. Not a live quote timestamp."
        },
        "sources": {
          "type": "array",
          "minItems": 1,
          "maxItems": 2,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "asset",
              "name",
              "url",
              "from",
              "through"
            ],
            "properties": {
              "asset": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "from": {
                "type": "string",
                "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
              },
              "through": {
                "type": "string",
                "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
              }
            }
          }
        }
      }
    },
    "calculator": {
      "type": "string"
    },
    "metrics": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "sub": {
            "type": "string"
          },
          "negative": {
            "type": "boolean"
          }
        },
        "required": [
          "label",
          "value",
          "sub"
        ],
        "additionalProperties": false
      }
    },
    "results": {
      "type": "object",
      "additionalProperties": {
        "type": [
          "number",
          "string",
          "boolean",
          "null"
        ]
      }
    },
    "conditions": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "asset": {
          "type": "string",
          "description": "Asset ticker. Available historical start dates vary by asset.",
          "default": "BTC",
          "enum": [
            "BTC",
            "ETH",
            "SOL",
            "SPY",
            "QQQ",
            "VTI",
            "VXUS",
            "GLD",
            "TLT",
            "AAPL",
            "MSFT",
            "NVDA",
            "TSLA"
          ]
        },
        "start": {
          "type": "string",
          "description": "Start month, YYYY-MM.",
          "default": "2016-10",
          "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
        },
        "end": {
          "type": "string",
          "description": "End month, YYYY-MM. Must be within the installed data snapshot.",
          "default": "2026-09",
          "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
        },
        "amount": {
          "type": "number",
          "description": "Dollar budget including fees, or coin/share quantity when unit is coins.",
          "default": 1000,
          "minimum": 0.000001,
          "maximum": 1000000000
        },
        "unit": {
          "type": "string",
          "description": "cash for a dollar budget; coins for a coin or share quantity.",
          "default": "cash",
          "enum": [
            "cash",
            "coins"
          ]
        },
        "returnBasis": {
          "type": "string",
          "description": "total reinvests distributions; price excludes distributions.",
          "default": "total",
          "enum": [
            "total",
            "price"
          ]
        },
        "buyFee": {
          "type": "number",
          "description": "Buying fee as a percentage, e.g. 0.1 means 0.1%.",
          "default": 0,
          "minimum": 0,
          "maximum": 20
        },
        "benchmark": {
          "type": "string",
          "description": "Optional benchmark asset.",
          "default": "none",
          "enum": [
            "none",
            "SPY",
            "QQQ",
            "BTC"
          ]
        }
      },
      "required": [
        "asset",
        "start",
        "end",
        "amount",
        "unit",
        "returnBasis",
        "buyFee",
        "benchmark"
      ]
    },
    "assumptions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "edit_url": {
      "type": "string",
      "format": "uri"
    },
    "share_url": {
      "type": "string",
      "format": "uri"
    },
    "image_url": {
      "type": "string",
      "format": "uri"
    },
    "disclaimer": {
      "type": "string"
    }
  },
  "required": [
    "calculator",
    "metrics",
    "results",
    "conditions",
    "assumptions",
    "edit_url",
    "share_url",
    "image_url",
    "disclaimer",
    "data"
  ],
  "additionalProperties": false
}
🟢dca_backtest(asset, start, end, monthly, initial, ...)

Dollar-cost-averaging backtest using installed monthly closes, not live quotes. Asset ticker, start/end months YYYY-MM, initial deposit in USD, monthly in USD per purchase, frequency in months (1, 3 or 12), buying fee in percent, optional benchmark and total/price return basis. Initial deposit and first recurring purchase occur at the selected start month-end. Omitted dates use calculator defaults clamped to coverage. Returns data metadata and the free calc-dca PNG. Returns results, conditions, assumptions, an editable link, share page and PNG. No account access or order execution.

输入模式

{
  "type": "object",
  "properties": {
    "asset": {
      "type": "string",
      "description": "Asset ticker. Available historical start dates vary by asset.",
      "default": "QQQ",
      "enum": [
        "BTC",
        "ETH",
        "SOL",
        "SPY",
        "QQQ",
        "VTI",
        "VXUS",
        "GLD",
        "TLT",
        "AAPL",
        "MSFT",
        "NVDA",
        "TSLA"
      ]
    },
    "start": {
      "type": "string",
      "description": "Start month, YYYY-MM.",
      "default": "2016-10",
      "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
    },
    "end": {
      "type": "string",
      "description": "End month, YYYY-MM. Must be within the installed data snapshot.",
      "default": "2026-09",
      "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
    },
    "monthly": {
      "type": "number",
      "description": "Contribution in dollars per chosen frequency (DCA), or per month (compound interest).",
      "default": 200,
      "minimum": 1,
      "maximum": 10000000
    },
    "initial": {
      "type": "number",
      "description": "Initial deposit in dollars.",
      "default": 0,
      "minimum": 0,
      "maximum": 1000000000
    },
    "frequency": {
      "type": "number",
      "description": "Contribution interval in months: 1, 3 or 12.",
      "default": 1,
      "enum": [
        1,
        3,
        12
      ]
    },
    "buyFee": {
      "type": "number",
      "description": "Buying fee as a percentage, e.g. 0.1 means 0.1%.",
      "default": 0,
      "minimum": 0,
      "maximum": 20
    },
    "returnBasis": {
      "type": "string",
      "description": "total reinvests distributions; price excludes distributions.",
      "default": "total",
      "enum": [
        "total",
        "price"
      ]
    },
    "benchmark": {
      "type": "string",
      "description": "Optional benchmark asset.",
      "default": "none",
      "enum": [
        "none",
        "SPY",
        "QQQ",
        "BTC"
      ]
    },
    "include_image": {
      "type": "boolean",
      "default": false,
      "description": "Also inline a PNG no wider than 1000 pixels. Image URL is always returned."
    }
  },
  "additionalProperties": false
}

输出模式

{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "frequency",
        "is_live",
        "period_start",
        "period_end",
        "available_from",
        "as_of",
        "sources"
      ],
      "properties": {
        "frequency": {
          "type": "string",
          "const": "monthly"
        },
        "is_live": {
          "type": "boolean",
          "const": false
        },
        "period_start": {
          "type": "string",
          "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
        },
        "period_end": {
          "type": "string",
          "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
        },
        "available_from": {
          "type": "string",
          "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
        },
        "as_of": {
          "type": "string",
          "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
          "description": "Last installed month available for both the selected asset and any benchmark. Not a live quote timestamp."
        },
        "sources": {
          "type": "array",
          "minItems": 1,
          "maxItems": 2,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "asset",
              "name",
              "url",
              "from",
              "through"
            ],
            "properties": {
              "asset": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "from": {
                "type": "string",
                "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
              },
              "through": {
                "type": "string",
                "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
              }
            }
          }
        }
      }
    },
    "calculator": {
      "type": "string"
    },
    "metrics": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "sub": {
            "type": "string"
          },
          "negative": {
            "type": "boolean"
          }
        },
        "required": [
          "label",
          "value",
          "sub"
        ],
        "additionalProperties": false
      }
    },
    "results": {
      "type": "object",
      "additionalProperties": {
        "type": [
          "number",
          "string",
          "boolean",
          "null"
        ]
      }
    },
    "conditions": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "asset": {
          "type": "string",
          "description": "Asset ticker. Available historical start dates vary by asset.",
          "default": "QQQ",
          "enum": [
            "BTC",
            "ETH",
            "SOL",
            "SPY",
            "QQQ",
            "VTI",
            "VXUS",
            "GLD",
            "TLT",
            "AAPL",
            "MSFT",
            "NVDA",
            "TSLA"
          ]
        },
        "start": {
          "type": "string",
          "description": "Start month, YYYY-MM.",
          "default": "2016-10",
          "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
        },
        "end": {
          "type": "string",
          "description": "End month, YYYY-MM. Must be within the installed data snapshot.",
          "default": "2026-09",
          "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
        },
        "monthly": {
          "type": "number",
          "description": "Contribution in dollars per chosen frequency (DCA), or per month (compound interest).",
          "default": 200,
          "minimum": 1,
          "maximum": 10000000
        },
        "initial": {
          "type": "number",
          "description": "Initial deposit in dollars.",
          "default": 0,
          "minimum": 0,
          "maximum": 1000000000
        },
        "frequency": {
          "type": "number",
          "description": "Contribution interval in months: 1, 3 or 12.",
          "default": 1,
          "enum": [
            1,
            3,
            12
          ]
        },
        "buyFee": {
          "type": "number",
          "description": "Buying fee as a percentage, e.g. 0.1 means 0.1%.",
          "default": 0,
          "minimum": 0,
          "maximum": 20
        },
        "returnBasis": {
          "type": "string",
          "description": "total reinvests distributions; price excludes distributions.",
          "default": "total",
          "enum": [
            "total",
            "price"
          ]
        },
        "benchmark": {
          "type": "string",
          "description": "Optional benchmark asset.",
          "default": "none",
          "enum": [
            "none",
            "SPY",
            "QQQ",
            "BTC"
          ]
        }
      },
      "required": [
        "asset",
        "start",
        "end",
        "monthly",
        "initial",
        "frequency",
        "buyFee",
        "returnBasis",
        "benchmark"
      ]
    },
    "assumptions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "edit_url": {
      "type": "string",
      "format": "uri"
    },
    "share_url": {
      "type": "string",
      "format": "uri"
    },
    "image_url": {
      "type": "string",
      "format": "uri"
    },
    "disclaimer": {
      "type": "string"
    }
  },
  "required": [
    "calculator",
    "metrics",
    "results",
    "conditions",
    "assumptions",
    "edit_url",
    "share_url",
    "image_url",
    "disclaimer",
    "data"
  ],
  "additionalProperties": false
}
🟢compound_interest(principal, monthly, rate, years, timing, ...)

Compound interest in USD: initial dollars, monthly dollars, annual return/fees/inflation in percent, and whole years. Creates a free calc-compound PNG. Returns results, conditions, assumptions, an editable link, share page and PNG. No account access or order execution.

输入模式

{
  "type": "object",
  "properties": {
    "principal": {
      "type": "number",
      "description": "Initial investment, or peak account balance for recovery, in dollars.",
      "default": 10000,
      "minimum": 0,
      "maximum": 1000000000
    },
    "monthly": {
      "type": "number",
      "description": "Contribution in dollars per chosen frequency (DCA), or per month (compound interest).",
      "default": 200,
      "minimum": 0,
      "maximum": 10000000
    },
    "rate": {
      "type": "number",
      "description": "Assumed gross annual percentage return.",
      "default": 8,
      "minimum": -50,
      "maximum": 50
    },
    "years": {
      "type": "integer",
      "description": "Number of years, 1 to 40.",
      "default": 10,
      "minimum": 1,
      "maximum": 40
    },
    "timing": {
      "type": "string",
      "description": "Deposit at the beginning or end of each month.",
      "default": "end",
      "enum": [
        "end",
        "beginning"
      ]
    },
    "annualFee": {
      "type": "number",
      "description": "Annual asset fee in percent.",
      "default": 0,
      "minimum": 0,
      "maximum": 20
    },
    "inflation": {
      "type": "number",
      "description": "Assumed annual inflation in percent.",
      "default": 0,
      "minimum": -5,
      "maximum": 30
    },
    "contributionGrowth": {
      "type": "number",
      "description": "Annual increase in contributions, in percent.",
      "default": 0,
      "minimum": 0,
      "maximum": 50
    },
    "include_image": {
      "type": "boolean",
      "default": false,
      "description": "Also inline a PNG no wider than 1000 pixels. Image URL is always returned."
    }
  },
  "additionalProperties": false
}

输出模式

{
  "type": "object",
  "properties": {
    "calculator": {
      "type": "string"
    },
    "metrics": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "sub": {
            "type": "string"
          },
          "negative": {
            "type": "boolean"
          }
        },
        "required": [
          "label",
          "value",
          "sub"
        ],
        "additionalProperties": false
      }
    },
    "results": {
      "type": "object",
      "additionalProperties": {
        "type": [
          "number",
          "string",
          "boolean",
          "null"
        ]
      }
    },
    "conditions": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "principal": {
          "type": "number",
          "description": "Initial investment, or peak account balance for recovery, in dollars.",
          "default": 10000,
          "minimum": 0,
          "maximum": 1000000000
        },
        "monthly": {
          "type": "number",
          "description": "Contribution in dollars per chosen frequency (DCA), or per month (compound interest).",
          "default": 200,
          "minimum": 0,
          "maximum": 10000000
        },
        "rate": {
          "type": "number",
          "description": "Assumed gross annual percentage return.",
          "default": 8,
          "minimum": -50,
          "maximum": 50
        },
        "years": {
          "type": "integer",
          "description": "Number of years, 1 to 40.",
          "default": 10,
          "minimum": 1,
          "maximum": 40
        },
        "timing": {
          "type": "string",
          "description": "Deposit at the beginning or end of each month.",
          "default": "end",
          "enum": [
            "end",
            "beginning"
          ]
        },
        "annualFee": {
          "type": "number",
          "description": "Annual asset fee in percent.",
          "default": 0,
          "minimum": 0,
          "maximum": 20
        },
        "inflation": {
          "type": "number",
          "description": "Assumed annual inflation in percent.",
          "default": 0,
          "minimum": -5,
          "maximum": 30
        },
        "contributionGrowth": {
          "type": "number",
          "description": "Annual increase in contributions, in percent.",
          "default": 0,
          "minimum": 0,
          "maximum": 50
        }
      },
      "required": [
        "principal",
        "monthly",
        "rate",
        "years",
        "timing",
        "annualFee",
        "inflation",
        "contributionGrowth"
      ]
    },
    "assumptions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "edit_url": {
      "type": "string",
      "format": "uri"
    },
    "share_url": {
      "type": "string",
      "format": "uri"
    },
    "image_url": {
      "type": "string",
      "format": "uri"
    },
    "disclaimer": {
      "type": "string"
    }
  },
  "required": [
    "calculator",
    "metrics",
    "results",
    "conditions",
    "assumptions",
    "edit_url",
    "share_url",
    "image_url",
    "disclaimer"
  ],
  "additionalProperties": false
}
🟢position_size(balance, risk, entry, stop, target, ...)

Position sizing for linear USD shares/coins: prices in USD, account risk in percent, fees/slippage in basis points, quantity increment in units. Returns results, conditions, assumptions, an editable link, share page and PNG. No account access or order execution.

输入模式

{
  "type": "object",
  "properties": {
    "balance": {
      "type": "number",
      "description": "Account balance in dollars.",
      "default": 10000,
      "minimum": 1,
      "maximum": 1000000000
    },
    "risk": {
      "type": "number",
      "description": "Loss budget as a percentage of the account.",
      "default": 1,
      "minimum": 0.01,
      "maximum": 100
    },
    "entry": {
      "type": "number",
      "description": "Trade entry price.",
      "default": 100,
      "minimum": 0.000001,
      "maximum": 1000000000
    },
    "stop": {
      "type": "number",
      "description": "Stop price.",
      "default": 95,
      "minimum": 0.000001,
      "maximum": 1000000000
    },
    "target": {
      "type": "number",
      "description": "Trade target price, or target inventory percentage for inventory quotes.",
      "default": 110,
      "minimum": 0.000001,
      "maximum": 1000000000
    },
    "direction": {
      "type": "string",
      "description": "long or short.",
      "default": "long",
      "enum": [
        "long",
        "short"
      ]
    },
    "fee": {
      "type": "number",
      "description": "Fee per fill in basis points; negative maker fees are rebates in the spread model.",
      "default": 5,
      "minimum": 0,
      "maximum": 500
    },
    "slippage": {
      "type": "number",
      "description": "Slippage per side in basis points.",
      "default": 0,
      "minimum": 0,
      "maximum": 500
    },
    "unitStep": {
      "type": "number",
      "description": "Quantity increment; 0 disables rounding.",
      "default": 0.0001,
      "minimum": 0,
      "maximum": 1000000000
    },
    "maxLeverage": {
      "type": "number",
      "description": "Maximum notional exposure divided by equity.",
      "default": 1,
      "minimum": 0.01,
      "maximum": 100
    },
    "include_image": {
      "type": "boolean",
      "default": false,
      "description": "Also inline a PNG no wider than 1000 pixels. Image URL is always returned."
    }
  },
  "additionalProperties": false
}

输出模式

{
  "type": "object",
  "properties": {
    "calculator": {
      "type": "string"
    },
    "metrics": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "sub": {
            "type": "string"
          },
          "negative": {
            "type": "boolean"
          }
        },
        "required": [
          "label",
          "value",
          "sub"
        ],
        "additionalProperties": false
      }
    },
    "results": {
      "type": "object",
      "additionalProperties": {
        "type": [
          "number",
          "string",
          "boolean",
          "null"
        ]
      }
    },
    "conditions": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "balance": {
          "type": "number",
          "description": "Account balance in dollars.",
          "default": 10000,
          "minimum": 1,
          "maximum": 1000000000
        },
        "risk": {
          "type": "number",
          "description": "Loss budget as a percentage of the account.",
          "default": 1,
          "minimum": 0.01,
          "maximum": 100
        },
        "entry": {
          "type": "number",
          "description": "Trade entry price.",
          "default": 100,
          "minimum": 0.000001,
          "maximum": 1000000000
        },
        "stop": {
          "type": "number",
          "description": "Stop price.",
          "default": 95,
          "minimum": 0.000001,
          "maximum": 1000000000
        },
        "target": {
          "type": "number",
          "description": "Trade target price, or target inventory percentage for inventory quotes.",
          "default": 110,
          "minimum": 0.000001,
          "maximum": 1000000000
        },
        "direction": {
          "type": "string",
          "description": "long or short.",
          "default": "long",
          "enum": [
            "long",
            "short"
          ]
        },
        "fee": {
          "type": "number",
          "description": "Fee per fill in basis points; negative maker fees are rebates in the spread model.",
          "default": 5,
          "minimum": 0,
          "maximum": 500
        },
        "slippage": {
          "type": "number",
          "description": "Slippage per side in basis points.",
          "default": 0,
          "minimum": 0,
          "maximum": 500
        },
        "unitStep": {
          "type": "number",
          "description": "Quantity increment; 0 disables rounding.",
          "default": 0.0001,
          "minimum": 0,
          "maximum": 1000000000
        },
        "maxLeverage": {
          "type": "number",
          "description": "Maximum notional exposure divided by equity.",
          "default": 1,
          "minimum": 0.01,
          "maximum": 100
        }
      },
      "required": [
        "balance",
        "risk",
        "entry",
        "stop",
        "target",
        "direction",
        "fee",
        "slippage",
        "unitStep",
        "maxLeverage"
      ]
    },
    "assumptions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "edit_url": {
      "type": "string",
      "format": "uri"
    },
    "share_url": {
      "type": "string",
      "format": "uri"
    },
    "image_url": {
      "type": "string",
      "format": "uri"
    },
    "disclaimer": {
      "type": "string"
    }
  },
  "required": [
    "calculator",
    "metrics",
    "results",
    "conditions",
    "assumptions",
    "edit_url",
    "share_url",
    "image_url",
    "disclaimer"
  ],
  "additionalProperties": false
}
🟢trade_expectancy(balance, winRate, avgWin, avgLoss, cost, ...)

Trade expectancy and fractional Kelly: balance in USD, win rate/buffer/cap in percent, wins/losses/cost in R, fraction 0–1. Returns results, conditions, assumptions, an editable link, share page and PNG. No account access or order execution.

输入模式

{
  "type": "object",
  "properties": {
    "balance": {
      "type": "number",
      "description": "Account balance in dollars.",
      "default": 10000,
      "minimum": 1,
      "maximum": 1000000000
    },
    "winRate": {
      "type": "number",
      "description": "Estimated win rate in percent.",
      "default": 55,
      "minimum": 0,
      "maximum": 100
    },
    "avgWin": {
      "type": "number",
      "description": "Average winning trade in R units.",
      "default": 1.5,
      "minimum": 0.001,
      "maximum": 100
    },
    "avgLoss": {
      "type": "number",
      "description": "Average losing trade in R units.",
      "default": 1,
      "minimum": 0.001,
      "maximum": 100
    },
    "cost": {
      "type": "number",
      "description": "Cost per trade in R units.",
      "default": 0.05,
      "minimum": 0,
      "maximum": 100
    },
    "fraction": {
      "type": "number",
      "description": "Kelly multiplier, e.g. 0.25 for quarter Kelly.",
      "default": 0.25,
      "minimum": 0,
      "maximum": 1
    },
    "winBuffer": {
      "type": "number",
      "description": "Conservative reduction in win rate, in percentage points.",
      "default": 0,
      "minimum": 0,
      "maximum": 100
    },
    "riskCap": {
      "type": "number",
      "description": "Maximum account risk in percent.",
      "default": 5,
      "minimum": 0,
      "maximum": 100
    },
    "include_image": {
      "type": "boolean",
      "default": false,
      "description": "Also inline a PNG no wider than 1000 pixels. Image URL is always returned."
    }
  },
  "additionalProperties": false
}

输出模式

{
  "type": "object",
  "properties": {
    "calculator": {
      "type": "string"
    },
    "metrics": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "sub": {
            "type": "string"
          },
          "negative": {
            "type": "boolean"
          }
        },
        "required": [
          "label",
          "value",
          "sub"
        ],
        "additionalProperties": false
      }
    },
    "results": {
      "type": "object",
      "additionalProperties": {
        "type": [
          "number",
          "string",
          "boolean",
          "null"
        ]
      }
    },
    "conditions": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "balance": {
          "type": "number",
          "description": "Account balance in dollars.",
          "default": 10000,
          "minimum": 1,
          "maximum": 1000000000
        },
        "winRate": {
          "type": "number",
          "description": "Estimated win rate in percent.",
          "default": 55,
          "minimum": 0,
          "maximum": 100
        },
        "avgWin": {
          "type": "number",
          "description": "Average winning trade in R units.",
          "default": 1.5,
          "minimum": 0.001,
          "maximum": 100
        },
        "avgLoss": {
          "type": "number",
          "description": "Average losing trade in R units.",
          "default": 1,
          "minimum": 0.001,
          "maximum": 100
        },
        "cost": {
          "type": "number",
          "description": "Cost per trade in R units.",
          "default": 0.05,
          "minimum": 0,
          "maximum": 100
        },
        "fraction": {
          "type": "number",
          "description": "Kelly multiplier, e.g. 0.25 for quarter Kelly.",
          "default": 0.25,
          "minimum": 0,
          "maximum": 1
        },
        "winBuffer": {
          "type": "number",
          "description": "Conservative reduction in win rate, in percentage points.",
          "default": 0,
          "minimum": 0,
          "maximum": 100
        },
        "riskCap": {
          "type": "number",
          "description": "Maximum account risk in percent.",
          "default": 5,
          "minimum": 0,
          "maximum": 100
        }
      },
      "required": [
        "balance",
        "winRate",
        "avgWin",
        "avgLoss",
        "cost",
        "fraction",
        "winBuffer",
        "riskCap"
      ]
    },
    "assumptions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "edit_url": {
      "type": "string",
      "format": "uri"
    },
    "share_url": {
      "type": "string",
      "format": "uri"
    },
    "image_url": {
      "type": "string",
      "format": "uri"
    },
    "disclaimer": {
      "type": "string"
    }
  },
  "required": [
    "calculator",
    "metrics",
    "results",
    "conditions",
    "assumptions",
    "edit_url",
    "share_url",
    "image_url",
    "disclaimer"
  ],
  "additionalProperties": false
}
🟢drawdown_recovery(principal, scenario, loss, current, riskPerTrade, ...)

Drawdown recovery: balances/deposits in USD, drawdown and monthly return in percent, target horizon in whole months. Returns results, conditions, assumptions, an editable link, share page and PNG. No account access or order execution.

输入模式

{
  "type": "object",
  "properties": {
    "principal": {
      "type": "number",
      "description": "Initial investment, or peak account balance for recovery, in dollars.",
      "default": 10000,
      "minimum": 1,
      "maximum": 1000000000000
    },
    "scenario": {
      "type": "string",
      "description": "drawdown, balance or streak.",
      "default": "drawdown",
      "enum": [
        "drawdown",
        "balance",
        "streak"
      ]
    },
    "loss": {
      "type": "number",
      "description": "Drawdown in percent, from 0 to 100.",
      "default": 30,
      "minimum": 0,
      "maximum": 100
    },
    "current": {
      "type": "number",
      "description": "Current base inventory percentage, or current balance in dollars in recovery.",
      "default": 7000,
      "minimum": 0,
      "maximum": 1000000000000
    },
    "riskPerTrade": {
      "type": "number",
      "description": "Loss per trade as a percentage of remaining equity.",
      "default": 2,
      "minimum": 0,
      "maximum": 100
    },
    "losses": {
      "type": "integer",
      "description": "Number of consecutive losing trades.",
      "default": 10,
      "minimum": 1,
      "maximum": 500
    },
    "monthlyReturn": {
      "type": "number",
      "description": "Assumed net monthly return in percent; not a forecast.",
      "default": 2,
      "minimum": -20,
      "maximum": 30
    },
    "monthlyDeposit": {
      "type": "number",
      "description": "New monthly deposit in dollars.",
      "default": 0,
      "minimum": 0,
      "maximum": 1000000000
    },
    "targetMonths": {
      "type": "integer",
      "description": "Recovery target horizon in months.",
      "default": 12,
      "minimum": 1,
      "maximum": 120
    },
    "include_image": {
      "type": "boolean",
      "default": false,
      "description": "Also inline a PNG no wider than 1000 pixels. Image URL is always returned."
    }
  },
  "additionalProperties": false
}

输出模式

{
  "type": "object",
  "properties": {
    "calculator": {
      "type": "string"
    },
    "metrics": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "sub": {
            "type": "string"
          },
          "negative": {
            "type": "boolean"
          }
        },
        "required": [
          "label",
          "value",
          "sub"
        ],
        "additionalProperties": false
      }
    },
    "results": {
      "type": "object",
      "additionalProperties": {
        "type": [
          "number",
          "string",
          "boolean",
          "null"
        ]
      }
    },
    "conditions": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "principal": {
          "type": "number",
          "description": "Initial investment, or peak account balance for recovery, in dollars.",
          "default": 10000,
          "minimum": 1,
          "maximum": 1000000000000
        },
        "scenario": {
          "type": "string",
          "description": "drawdown, balance or streak.",
          "default": "drawdown",
          "enum": [
            "drawdown",
            "balance",
            "streak"
          ]
        },
        "loss": {
          "type": "number",
          "description": "Drawdown in percent, from 0 to 100.",
          "default": 30,
          "minimum": 0,
          "maximum": 100
        },
        "current": {
          "type": "number",
          "description": "Current base inventory percentage, or current balance in dollars in recovery.",
          "default": 7000,
          "minimum": 0,
          "maximum": 1000000000000
        },
        "riskPerTrade": {
          "type": "number",
          "description": "Loss per trade as a percentage of remaining equity.",
          "default": 2,
          "minimum": 0,
          "maximum": 100
        },
        "losses": {
          "type": "integer",
          "description": "Number of consecutive losing trades.",
          "default": 10,
          "minimum": 1,
          "maximum": 500
        },
        "monthlyReturn": {
          "type": "number",
          "description": "Assumed net monthly return in percent; not a forecast.",
          "default": 2,
          "minimum": -20,
          "maximum": 30
        },
        "monthlyDeposit": {
          "type": "number",
          "description": "New monthly deposit in dollars.",
          "default": 0,
          "minimum": 0,
          "maximum": 1000000000
        },
        "targetMonths": {
          "type": "integer",
          "description": "Recovery target horizon in months.",
          "default": 12,
          "minimum": 1,
          "maximum": 120
        }
      },
      "required": [
        "principal",
        "scenario",
        "loss",
        "current",
        "riskPerTrade",
        "losses",
        "monthlyReturn",
        "monthlyDeposit",
        "targetMonths"
      ]
    },
    "assumptions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "edit_url": {
      "type": "string",
      "format": "uri"
    },
    "share_url": {
      "type": "string",
      "format": "uri"
    },
    "image_url": {
      "type": "string",
      "format": "uri"
    },
    "disclaimer": {
      "type": "string"
    }
  },
  "required": [
    "calculator",
    "metrics",
    "results",
    "conditions",
    "assumptions",
    "edit_url",
    "share_url",
    "image_url",
    "disclaimer"
  ],
  "additionalProperties": false
}
🟢spread_and_fees(notional, spread, fee, adverse, include_image)

Round-trip spread economics: one-side notional in USD; full spread, fee per fill and adverse cost in basis points (1 bp = 0.01%). Negative fees are rebates. Returns results, conditions, assumptions, an editable link, share page and PNG. No account access or order execution.

输入模式

{
  "type": "object",
  "properties": {
    "notional": {
      "type": "number",
      "description": "One-side trade notional in dollars.",
      "default": 10000,
      "minimum": 1,
      "maximum": 1000000000000
    },
    "spread": {
      "type": "number",
      "description": "Full quoted spread in basis points.",
      "default": 12,
      "minimum": 0,
      "maximum": 2000
    },
    "fee": {
      "type": "number",
      "description": "Fee per fill in basis points; negative maker fees are rebates in the spread model.",
      "default": 2,
      "minimum": -100,
      "maximum": 500
    },
    "adverse": {
      "type": "number",
      "description": "Adverse-selection cost in basis points.",
      "default": 3,
      "minimum": 0,
      "maximum": 2000
    },
    "include_image": {
      "type": "boolean",
      "default": false,
      "description": "Also inline a PNG no wider than 1000 pixels. Image URL is always returned."
    }
  },
  "additionalProperties": false
}

输出模式

{
  "type": "object",
  "properties": {
    "calculator": {
      "type": "string"
    },
    "metrics": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "sub": {
            "type": "string"
          },
          "negative": {
            "type": "boolean"
          }
        },
        "required": [
          "label",
          "value",
          "sub"
        ],
        "additionalProperties": false
      }
    },
    "results": {
      "type": "object",
      "additionalProperties": {
        "type": [
          "number",
          "string",
          "boolean",
          "null"
        ]
      }
    },
    "conditions": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "notional": {
          "type": "number",
          "description": "One-side trade notional in dollars.",
          "default": 10000,
          "minimum": 1,
          "maximum": 1000000000000
        },
        "spread": {
          "type": "number",
          "description": "Full quoted spread in basis points.",
          "default": 12,
          "minimum": 0,
          "maximum": 2000
        },
        "fee": {
          "type": "number",
          "description": "Fee per fill in basis points; negative maker fees are rebates in the spread model.",
          "default": 2,
          "minimum": -100,
          "maximum": 500
        },
        "adverse": {
          "type": "number",
          "description": "Adverse-selection cost in basis points.",
          "default": 3,
          "minimum": 0,
          "maximum": 2000
        }
      },
      "required": [
        "notional",
        "spread",
        "fee",
        "adverse"
      ]
    },
    "assumptions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "edit_url": {
      "type": "string",
      "format": "uri"
    },
    "share_url": {
      "type": "string",
      "format": "uri"
    },
    "image_url": {
      "type": "string",
      "format": "uri"
    },
    "disclaimer": {
      "type": "string"
    }
  },
  "required": [
    "calculator",
    "metrics",
    "results",
    "conditions",
    "assumptions",
    "edit_url",
    "share_url",
    "image_url",
    "disclaimer"
  ],
  "additionalProperties": false
}
🟢inventory_quotes(mid, current, target, spread, skew, ...)

Inventory quotes: mid and tick in USD, inventory weights in percent, spread/skew/cap in basis points. Skew is bps per 10 percentage points of inventory deviation. Returns results, conditions, assumptions, an editable link, share page and PNG. No account access or order execution.

输入模式

{
  "type": "object",
  "properties": {
    "mid": {
      "type": "number",
      "description": "Market mid price.",
      "default": 100,
      "minimum": 0.000001,
      "maximum": 1000000000
    },
    "current": {
      "type": "number",
      "description": "Current base inventory percentage, or current balance in dollars in recovery.",
      "default": 70,
      "minimum": 0,
      "maximum": 100
    },
    "target": {
      "type": "number",
      "description": "Trade target price, or target inventory percentage for inventory quotes.",
      "default": 50,
      "minimum": 0,
      "maximum": 100
    },
    "spread": {
      "type": "number",
      "description": "Full quoted spread in basis points.",
      "default": 12,
      "minimum": 0.01,
      "maximum": 2000
    },
    "skew": {
      "type": "number",
      "description": "Quote shift in basis points per 10 percentage points of inventory deviation.",
      "default": 2,
      "minimum": 0,
      "maximum": 100
    },
    "tickSize": {
      "type": "number",
      "description": "Price tick size; 0 disables rounding.",
      "default": 0.01,
      "minimum": 0,
      "maximum": 100000000
    },
    "skewCap": {
      "type": "number",
      "description": "Maximum quote-center shift in basis points.",
      "default": 20,
      "minimum": 0,
      "maximum": 1000
    },
    "include_image": {
      "type": "boolean",
      "default": false,
      "description": "Also inline a PNG no wider than 1000 pixels. Image URL is always returned."
    }
  },
  "additionalProperties": false
}

输出模式

{
  "type": "object",
  "properties": {
    "calculator": {
      "type": "string"
    },
    "metrics": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "sub": {
            "type": "string"
          },
          "negative": {
            "type": "boolean"
          }
        },
        "required": [
          "label",
          "value",
          "sub"
        ],
        "additionalProperties": false
      }
    },
    "results": {
      "type": "object",
      "additionalProperties": {
        "type": [
          "number",
          "string",
          "boolean",
          "null"
        ]
      }
    },
    "conditions": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "mid": {
          "type": "number",
          "description": "Market mid price.",
          "default": 100,
          "minimum": 0.000001,
          "maximum": 1000000000
        },
        "current": {
          "type": "number",
          "description": "Current base inventory percentage, or current balance in dollars in recovery.",
          "default": 70,
          "minimum": 0,
          "maximum": 100
        },
        "target": {
          "type": "number",
          "description": "Trade target price, or target inventory percentage for inventory quotes.",
          "default": 50,
          "minimum": 0,
          "maximum": 100
        },
        "spread": {
          "type": "number",
          "description": "Full quoted spread in basis points.",
          "default": 12,
          "minimum": 0.01,
          "maximum": 2000
        },
        "skew": {
          "type": "number",
          "description": "Quote shift in basis points per 10 percentage points of inventory deviation.",
          "default": 2,
          "minimum": 0,
          "maximum": 100
        },
        "tickSize": {
          "type": "number",
          "description": "Price tick size; 0 disables rounding.",
          "default": 0.01,
          "minimum": 0,
          "maximum": 100000000
        },
        "skewCap": {
          "type": "number",
          "description": "Maximum quote-center shift in basis points.",
          "default": 20,
          "minimum": 0,
          "maximum": 1000
        }
      },
      "required": [
        "mid",
        "current",
        "target",
        "spread",
        "skew",
        "tickSize",
        "skewCap"
      ]
    },
    "assumptions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "edit_url": {
      "type": "string",
      "format": "uri"
    },
    "share_url": {
      "type": "string",
      "format": "uri"
    },
    "image_url": {
      "type": "string",
      "format": "uri"
    },
    "disclaimer": {
      "type": "string"
    }
  },
  "required": [
    "calculator",
    "metrics",
    "results",
    "conditions",
    "assumptions",
    "edit_url",
    "share_url",
    "image_url",
    "disclaimer"
  ],
  "additionalProperties": false
}

社区

评价此服务器

证据

最近观测

已验证未记录版本8 个工具