Allocation - Prediction Interval

by gschutz

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.bundle.min.js"></script>
<canvas id="myChart" width="200" height="100"></canvas>

JavaScript

var allocation = {
  "account": 186160,
  "allocations": [
    {
      "asset_class_id": 1,
      "products": {
        "fixed_incomes": [],
        "funds": [
          {
            "asset_class_id": 1,
            "expected_rate": 0.11536936858887092,
            "gross_value": 4800,
            "percentage": 0.6,
            "product_id": 2483,
            "variance": 1.3319204203667902e-9
          }
        ]
      }
    },
    {
      "asset_class_id": 2,
      "products": {
        "fixed_incomes": [],
        "funds": [
          {
            "asset_class_id": 2,
            "expected_rate": 0.14561610154414245,
            "gross_value": 3200,
            "percentage": 0.4,
            "product_id": 70821,
            "variance": 0.000004718346364316229
          }
        ]
      }
    },
    {
      "asset_class_id": 4,
      "products": {
        "fixed_incomes": [],
        "funds": []
      }
    },
    {
      "asset_class_id": 5,
      "products": {
        "fixed_incomes": [],
        "funds": []
      }
    }
  ],
  "amount": 8000,
  "balance": 0,
  "collateral": [
    {
      "ballast": 100000,
      "product": "LF_CDI_3"
    },
    {
      "ballast": 100000,
      "product": "LCA_CDI_3"
    },
    {
      "ballast": 100000,
      "product": "CDB_CDI_3"
    }
  ],
  "confidence_interval": [
    0.08972006990965536,
    0.16521605363230368
  ],
  "date_reference": "2016-02-01 00:00:00",
  "duration": 1800,
  "existing_allocation": null,
  "expected_rate": 0.12746806177097952,
  "liquidity_duration": 0,
  "liquidity_perc": 0.6,
  "logs": [
    "[2017-06-01 13:20:42.365045] Start Allocator for account 186160",
    "[2017-06-01 13:20:42.365310] Force allocating liquidity for 0 days at 0.6 of amount",
    "[2017-06-01 13:20:42.365576] Begin product selection for asset class 1",
    "[2017-06-01 13:20:42.366078] Rank of products (50369, 0.11603601952210287), (304658, 0.11565038915108518), (2483, 0.11536936858887092), (98370, 0.11176644016399241)",
...