[
  {
    "name": "neutral view and matched risk penalty",
    "function": "black_litterman_allocate",
    "args": [
      [
        0.5,
        0.5
      ],
      [
        [
          0.04,
          0
        ],
        [
          0,
          0.01
        ]
      ],
      2,
      0.5,
      [
        [
          1,
          -1
        ]
      ],
      [
        0.03
      ],
      [
        [
          0.0025
        ]
      ],
      1
    ],
    "expected": {
      "weights": [
        0.5,
        0.5
      ]
    },
    "error": false
  },
  {
    "name": "three assets two correlated neutral views",
    "function": "black_litterman_allocate",
    "args": [
      [
        0.2,
        0.3,
        0.5
      ],
      [
        [
          0.04,
          0,
          0
        ],
        [
          0,
          0.02,
          0
        ],
        [
          0,
          0,
          0.01
        ]
      ],
      2,
      0.5,
      [
        [
          1,
          -1,
          0
        ],
        [
          0,
          1,
          -1
        ]
      ],
      [
        0.004,
        0.002
      ],
      [
        [
          0.002,
          0.0003
        ],
        [
          0.0003,
          0.003
        ]
      ],
      1
    ],
    "expected": {
      "weights": [
        0.2,
        0.3,
        0.5
      ],
      "view_surprise": [
        0,
        0
      ]
    },
    "error": false
  },
  {
    "name": "infinite risk aversion rejected",
    "function": "black_litterman_allocate",
    "args": [
      [
        0.5,
        0.5
      ],
      [
        [
          0.04,
          0
        ],
        [
          0,
          0.01
        ]
      ],
      "Infinity",
      0.5,
      [
        [
          1,
          -1
        ]
      ],
      [
        0.03
      ],
      [
        [
          0.0025
        ]
      ],
      1
    ],
    "expected": null,
    "error": true
  },
  {
    "error": false,
    "name": "three asset nonneutral absolute views",
    "function": "black_litterman_allocate",
    "args": [
      [
        0.2,
        0.3,
        0.5
      ],
      [
        [
          0.04,
          0,
          0
        ],
        [
          0,
          0.02,
          0
        ],
        [
          0,
          0,
          0.01
        ]
      ],
      2,
      0.5,
      [
        [
          1,
          0,
          0
        ],
        [
          0,
          1,
          0
        ]
      ],
      [
        0.03,
        0.02
      ],
      [
        [
          0.02,
          0
        ],
        [
          0,
          0.01
        ]
      ],
      1
    ],
    "expected": {
      "posterior_returns": [
        0.023,
        0.016,
        0.01
      ],
      "weights": [
        0.26071428571428573,
        0.3464285714285714,
        0.39285714285714285
      ]
    }
  }
]
