{
  "portfolios": [
    {
      "name": "BTC NVT Signal策略",
      "code": "crypto_btc_nvt",
      "description": "使用NVT Signal指标：基于百分位排名，低位买入（<25%分位），高位卖出（>75%分位），适合捕捉波段高点",
      "strategy_definition": {
        "market_indicators": {
          "indicators": [
            {
              "code": "BTC_NVT"
            }
          ],
          "transformers": [
            {
              "name": "nvt_raw",
              "type": "IdentityTransformer",
              "params": {
                "indicator": "BTC_NVT",
                "field": "Close"
              }
            },
            {
              "name": "nvt_percentile",
              "type": "PercentileRankTransformer",
              "params": {
                "indicator": "BTC_NVT",
                "lookback": 252,
                "field": "Close"
              }
            }
          ]
        },
        "trade_strategy": {
          "indicators": [
            {
              "id": "nvt_low_percentile",
              "type": "Constant",
              "params": {
                "value": 25
              }
            },
            {
              "id": "nvt_high_percentile",
              "type": "Constant",
              "params": {
                "value": 75
              }
            }
          ],
          "signals": [
            {
              "id": "nvt_low",
              "type": "LessThan",
              "inputs": [
                { "market": "BTC_NVT", "transformer": "nvt_percentile" },
                { "ref": "nvt_low_percentile" }
              ]
            },
            {
              "id": "nvt_high",
              "type": "GreaterThan",
              "inputs": [
                { "market": "BTC_NVT", "transformer": "nvt_percentile" },
                { "ref": "nvt_high_percentile" }
              ]
            }
          ],
          "outputs": {
            "buy_signal": "nvt_low",
            "sell_signal": "nvt_high",
            "indicators": [
              { "id": "nvt_low", "output_name": "nvt_buy" },
              { "id": "nvt_high", "output_name": "nvt_sell" }
            ],
            "market_indicators": [
              {
                "market": "BTC_NVT",
                "transformer": "nvt_raw",
                "output_name": "nvt_signal"
              },
              {
                "market": "BTC_NVT",
                "transformer": "nvt_percentile",
                "output_name": "nvt_percentile"
              }
            ]
          }
        },
        "capital_strategy": {
          "name": "PercentCapitalStrategy",
          "params": {
            "initial_capital": 100000,
            "percents": 95
          }
        }
      },

      "symbols": [{ "symbol": "BTC", "name": "Bitcoin" }],
      "start_date": "2018-01-01",
      "currency": "USD",
      "market": "Crypto",
      "commission": 0.001,
      "update_time": "04:00"
    }
  ]
}
