Vega

MAE در برابر MFE: کیفیت اجرای معاملات

هر نقطه بیشینهٔ حرکت نامطلوب (MAE) رو با بیشینهٔ حرکت مطلوب (MFE) یک معامله مقایسه می‌کنه، رنگ‌شده بر اساس نتیجه — MFE بالا پیش بازنده‌ها لو میده که خروج‌ها بدجا گذاشته شدن.

کاربرد

تنظیم استاپ‌ها و حد سودها از روی ژورنال معاملات: بازار قبل از خروج تا کجا رفته؟

پیش‌نیازها

Vega-Lite v5

Vega-Lite
{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "data": {
    "values": [
      { "mae": 4, "mfe": 18, "res": "Gagnant", "pnl": 160 },
      { "mae": 6, "mfe": 22, "res": "Gagnant", "pnl": 210 },
      { "mae": 3, "mfe": 15, "res": "Gagnant", "pnl": 140 },
      { "mae": 9, "mfe": 28, "res": "Gagnant", "pnl": 260 },
      { "mae": 5, "mfe": 12, "res": "Gagnant", "pnl": 95 },
      { "mae": 11, "mfe": 35, "res": "Gagnant", "pnl": 330 },
      { "mae": 2, "mfe": 9, "res": "Gagnant", "pnl": 80 },
      { "mae": 7, "mfe": 26, "res": "Gagnant", "pnl": 240 },
      { "mae": 4, "mfe": 20, "res": "Gagnant", "pnl": 185 },
      { "mae": 8, "mfe": 16, "res": "Gagnant", "pnl": 120 },
      { "mae": 6, "mfe": 31, "res": "Gagnant", "pnl": 290 },
      { "mae": 10, "mfe": 24, "res": "Gagnant", "pnl": 205 },
      { "mae": 3, "mfe": 13, "res": "Gagnant", "pnl": 110 },
      { "mae": 14, "mfe": 5, "res": "Perdant", "pnl": -130 },
      { "mae": 18, "mfe": 3, "res": "Perdant", "pnl": -170 },
      { "mae": 12, "mfe": 8, "res": "Perdant", "pnl": -110 },
      { "mae": 16, "mfe": 2, "res": "Perdant", "pnl": -150 },
      { "mae": 9, "mfe": 6, "res": "Perdant", "pnl": -85 },
      { "mae": 21, "mfe": 4, "res": "Perdant", "pnl": -200 },
      { "mae": 13, "mfe": 10, "res": "Perdant", "pnl": -120 },
      { "mae": 17, "mfe": 7, "res": "Perdant", "pnl": -160 },
      { "mae": 11, "mfe": 3, "res": "Perdant", "pnl": -100 },
      { "mae": 15, "mfe": 9, "res": "Perdant", "pnl": -140 },
      { "mae": 19, "mfe": 5, "res": "Perdant", "pnl": -180 }
    ]
  },
  "height": 280,
  "mark": { "type": "circle", "size": 90, "opacity": 0.85, "tooltip": true },
  "encoding": {
    "x": { "field": "mae", "type": "quantitative", "title": "MAE — excursion adverse max (pips)" },
    "y": { "field": "mfe", "type": "quantitative", "title": "MFE — excursion favorable max (pips)" },
    "color": {
      "field": "res", "type": "nominal", "title": null,
      "scale": { "domain": ["Gagnant", "Perdant"], "range": ["#27c93f", "#ff5f56"] },
      "legend": { "orient": "top" }
    },
    "tooltip": [
      { "field": "res", "title": "Résultat" },
      { "field": "mae", "title": "MAE (pips)" },
      { "field": "mfe", "title": "MFE (pips)" },
      { "field": "pnl", "format": "+.0f", "title": "P&L ($)" }
    ]
  }
}
TradingMAE/MFEScatterExécution

اسنیپت‌های مرتبط

بازگشت به آزمایشگاه داده