{
  "version": "xarts.coordinate-marks/1",
  "family": "coordinate-marks",
  "provenance": {
    "legacyId": "efficientfrontier"
  },
  "document": {
    "textOverflow": "preserve",
    "header": {
      "title": "Portfolio Optimization",
      "subtitle": "Expected return against risk for 30 portfolios; the tangency portfolio returns 8.8% at 12.5% risk"
    },
    "footer": {
      "source": "xarts · demo data",
      "notes": "Illustrative data to explore the chart and replace with your own."
    },
    "spacing": {
      "horizontalPadding": 32,
      "topPadding": 24,
      "bottomPadding": 24,
      "minimumTextGap": 6
    }
  },
  "presentation": {
    "theme": "anlak",
    "dimensions": {
      "width": 1200,
      "height": 760
    },
    "locale": "en-US",
    "fonts": "reference",
    "surface": "theme",
    "framePadding": 24
  },
  "output": {
    "filename": "efficientfrontier",
    "embedSpec": true,
    "geometryDecimals": 2
  },
  "annotations": [],
  "encoding": {
    "units": {
      "x": {
        "label": "Risk (Std Dev %)",
        "unit": "percentage-points"
      },
      "y": {
        "label": "Expected Return (%)",
        "unit": "percentage-points"
      },
      "size": null
    },
    "groups": [
      {
        "id": "observations",
        "label": "observations",
        "fill": "blue"
      }
    ]
  },
  "profile": {
    "placement": {
      "mode": "measured",
      "maxWidth": 190,
      "maxLines": 5,
      "lineHeight": 1.35,
      "gap": 10,
      "edge": 10,
      "gridStep": 10,
      "guideWidth": 0.75,
      "guideColor": "textMuted"
    },
    "tooltip": {
      "showDelta": false
    },
    "margin": {
      "top": 120,
      "right": 56,
      "bottom": 96,
      "left": 100
    },
    "axis": {
      "inkPadding": 4,
      "measurementNumbers": "proportional-nums",
      "ticksX": 6,
      "ticksY": 5,
      "percent": true,
      "titleX": "",
      "titleY": "",
      "baseline": true,
      "reserveTitles": false
    },
    "path": {
      "interpolation": "monotone-x",
      "stroke": "blue",
      "width": 2.5,
      "opacity": 1
    },
    "dot": {
      "radius": 4,
      "fill": "cyan",
      "stroke": "none",
      "strokeWidth": 0,
      "opacity": 0.7,
      "hoverRadius": 2
    },
    "head": {
      "radius": 8,
      "fill": "amber",
      "stroke": "none",
      "strokeWidth": 0,
      "opacity": 0.9,
      "hoverRadius": 2
    },
    "tail": {
      "radius": 5,
      "fill": "blue",
      "stroke": "none",
      "strokeWidth": 0,
      "opacity": 0.9,
      "hoverRadius": 2
    },
    "labels": {
      "mode": "tangency",
      "fontSize": 11,
      "fontWeight": 600,
      "fill": "textPrimary",
      "gap": 6,
      "maxWidth": 190,
      "maximumWidthFraction": 0.32
    },
    "arrows": {
      "visible": false,
      "size": 4,
      "fill": "blue",
      "opacity": 0.6
    },
    "ribbon": {
      "tailHalfWidth": 1,
      "headHalfWidth": 5,
      "widthMeaning": "observation-index",
      "opacity": 0.8,
      "dimOpacity": 0.28,
      "rounding": 2
    },
    "guides": {
      "width": 1,
      "opacity": 0.5,
      "minGap": 14,
      "minDeviation": 2
    },
    "note": {
      "text": "",
      "fontSize": 10,
      "fill": "textMuted",
      "showOrder": false,
      "showCommonEndpoints": false
    },
    "reference": {
      "stroke": "red",
      "width": 1.5,
      "dash": "6,4",
      "label": "Tangency",
      "ratePrefix": "Rf=",
      "rateSuffix": "%",
      "rateLabelSize": 10,
      "rateLabelFill": "textMuted",
      "rateMark": {
        "radius": 4,
        "fill": "red",
        "stroke": "none",
        "strokeWidth": 0,
        "opacity": 0.8,
        "hoverRadius": 0
      },
      "endOffset": 1
    },
    "legend": {
      "measured": true,
      "rowGap": 12,
      "visible": true,
      "y": -74,
      "items": [
        {
          "label": "Portfolios",
          "color": "cyan"
        },
        {
          "label": "Efficient Frontier",
          "color": "blue"
        },
        {
          "label": "Capital Market Line",
          "color": "red"
        },
        {
          "label": "Tangency Portfolio",
          "color": "amber",
          "swatchRadius": 5
        }
      ],
      "fill": "textMuted"
    },
    "zoom": true
  },
  "operation": "provided-frontier",
  "data": {
    "rows": [
      {
        "id": "1",
        "label": "Cash Heavy",
        "x": 3.2,
        "y": 3.1,
        "frontier": false,
        "tangency": false
      },
      {
        "id": "2",
        "label": "Ultra Safe",
        "x": 4.1,
        "y": 3.5,
        "frontier": false,
        "tangency": false
      },
      {
        "id": "3",
        "label": "Bond Tilt A",
        "x": 5,
        "y": 3.8,
        "frontier": false,
        "tangency": false
      },
      {
        "id": "4",
        "label": "Bond Tilt B",
        "x": 5.5,
        "y": 4.4,
        "frontier": false,
        "tangency": false
      },
      {
        "id": "5",
        "label": "Income A",
        "x": 6.8,
        "y": 4.8,
        "frontier": false,
        "tangency": false
      },
      {
        "id": "6",
        "label": "Income B",
        "x": 7.5,
        "y": 5,
        "frontier": false,
        "tangency": false
      },
      {
        "id": "7",
        "label": "Balanced Lite",
        "x": 8.2,
        "y": 5.4,
        "frontier": false,
        "tangency": false
      },
      {
        "id": "8",
        "label": "Mixed A",
        "x": 9.5,
        "y": 5.8,
        "frontier": false,
        "tangency": false
      },
      {
        "id": "9",
        "label": "Mixed B",
        "x": 10.2,
        "y": 6.2,
        "frontier": false,
        "tangency": false
      },
      {
        "id": "10",
        "label": "Domestic Focus",
        "x": 11,
        "y": 6,
        "frontier": false,
        "tangency": false
      },
      {
        "id": "11",
        "label": "Equity Lite",
        "x": 12.5,
        "y": 6.8,
        "frontier": false,
        "tangency": false
      },
      {
        "id": "12",
        "label": "Global Mix",
        "x": 13,
        "y": 7,
        "frontier": false,
        "tangency": false
      },
      {
        "id": "13",
        "label": "Equity Tilt",
        "x": 14.5,
        "y": 7.5,
        "frontier": false,
        "tangency": false
      },
      {
        "id": "14",
        "label": "Growth Lite",
        "x": 16,
        "y": 7.8,
        "frontier": false,
        "tangency": false
      },
      {
        "id": "15",
        "label": "Intl Growth",
        "x": 17.5,
        "y": 8.2,
        "frontier": false,
        "tangency": false
      },
      {
        "id": "16",
        "label": "High Beta",
        "x": 19,
        "y": 8,
        "frontier": false,
        "tangency": false
      },
      {
        "id": "17",
        "label": "Spec A",
        "x": 20.5,
        "y": 8.5,
        "frontier": false,
        "tangency": false
      },
      {
        "id": "18",
        "label": "All Equity B",
        "x": 22,
        "y": 9,
        "frontier": false,
        "tangency": false
      },
      {
        "id": "19",
        "label": "Emerging Focus",
        "x": 23.5,
        "y": 8.8,
        "frontier": false,
        "tangency": false
      },
      {
        "id": "20",
        "label": "Min Variance",
        "x": 4,
        "y": 4.2,
        "frontier": true,
        "tangency": false
      },
      {
        "id": "21",
        "label": "Conservative",
        "x": 5.5,
        "y": 5.1,
        "frontier": true,
        "tangency": false
      },
      {
        "id": "22",
        "label": "Defensive",
        "x": 7,
        "y": 6,
        "frontier": true,
        "tangency": false
      },
      {
        "id": "23",
        "label": "Balanced",
        "x": 9,
        "y": 7,
        "frontier": true,
        "tangency": false
      },
      {
        "id": "24",
        "label": "Moderate Growth",
        "x": 11,
        "y": 8,
        "frontier": true,
        "tangency": false
      },
      {
        "id": "25",
        "label": "Tangency",
        "x": 12.5,
        "y": 8.8,
        "frontier": true,
        "tangency": true
      },
      {
        "id": "26",
        "label": "Growth",
        "x": 14.5,
        "y": 9.5,
        "frontier": true,
        "tangency": false
      },
      {
        "id": "27",
        "label": "Aggressive",
        "x": 17,
        "y": 10.5,
        "frontier": true,
        "tangency": false
      },
      {
        "id": "28",
        "label": "High Growth",
        "x": 20,
        "y": 11.5,
        "frontier": true,
        "tangency": false
      },
      {
        "id": "29",
        "label": "Max Return",
        "x": 23,
        "y": 12.5,
        "frontier": true,
        "tangency": false
      },
      {
        "id": "30",
        "label": "Speculative",
        "x": 25,
        "y": 13,
        "frontier": true,
        "tangency": false
      }
    ]
  },
  "calculation": {
    "membership": "provided",
    "frontierOrder": "x-ascending",
    "reference": {
      "operation": "line-through-provided-point",
      "riskFreeRate": 2.5,
      "tangencyId": "25"
    },
    "xDomain": {
      "source": "zero-maximum",
      "padding": 0.15
    },
    "yDomain": {
      "source": "zero-maximum",
      "padding": 0.15
    },
    "niceX": true,
    "niceY": true,
    "ceilDomains": true
  }
}
