Table7Reconciler.java

  1. package org.drip.sample.helitterman;

  2. import org.drip.measure.bayesian.R1MultivariateConvolutionMetrics;
  3. import org.drip.measure.continuous.MultivariateMeta;
  4. import org.drip.measure.gaussian.*;
  5. import org.drip.measure.statistics.MultivariateMoments;
  6. import org.drip.numerical.common.FormatUtil;
  7. import org.drip.portfolioconstruction.allocator.*;
  8. import org.drip.portfolioconstruction.asset.*;
  9. import org.drip.portfolioconstruction.bayesian.*;
  10. import org.drip.portfolioconstruction.params.AssetUniverseStatisticalProperties;
  11. import org.drip.service.env.EnvManager;

  12. /*
  13.  * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  14.  */

  15. /*!
  16.  * Copyright (C) 2019 Lakshmi Krishnamurthy
  17.  * Copyright (C) 2018 Lakshmi Krishnamurthy
  18.  * Copyright (C) 2017 Lakshmi Krishnamurthy
  19.  * Copyright (C) 2016 Lakshmi Krishnamurthy
  20.  *
  21.  *  This file is part of DROP, an open-source library targeting risk, transaction costs, exposure, margin
  22.  *      calculations, valuation adjustment, and portfolio construction within and across fixed income,
  23.  *      credit, commodity, equity, FX, and structured products.
  24.  *  
  25.  *      https://lakshmidrip.github.io/DROP/
  26.  *  
  27.  *  DROP is composed of three modules:
  28.  *  
  29.  *  - DROP Analytics Core - https://lakshmidrip.github.io/DROP-Analytics-Core/
  30.  *  - DROP Portfolio Core - https://lakshmidrip.github.io/DROP-Portfolio-Core/
  31.  *  - DROP Numerical Core - https://lakshmidrip.github.io/DROP-Numerical-Core/
  32.  *
  33.  *  DROP Analytics Core implements libraries for the following:
  34.  *  - Fixed Income Analytics
  35.  *  - Asset Backed Analytics
  36.  *  - XVA Analytics
  37.  *  - Exposure and Margin Analytics
  38.  *
  39.  *  DROP Portfolio Core implements libraries for the following:
  40.  *  - Asset Allocation Analytics
  41.  *  - Transaction Cost Analytics
  42.  *
  43.  *  DROP Numerical Core implements libraries for the following:
  44.  *  - Statistical Learning
  45.  *  - Numerical Optimizer
  46.  *  - Spline Builder
  47.  *  - Algorithm Support
  48.  *
  49.  *  Documentation for DROP is Spread Over:
  50.  *
  51.  *  - Main                     => https://lakshmidrip.github.io/DROP/
  52.  *  - Wiki                     => https://github.com/lakshmiDRIP/DROP/wiki
  53.  *  - GitHub                   => https://github.com/lakshmiDRIP/DROP
  54.  *  - Repo Layout Taxonomy     => https://github.com/lakshmiDRIP/DROP/blob/master/Taxonomy.md
  55.  *  - Javadoc                  => https://lakshmidrip.github.io/DROP/Javadoc/index.html
  56.  *  - Technical Specifications => https://github.com/lakshmiDRIP/DROP/tree/master/Docs/Internal
  57.  *  - Release Versions         => https://lakshmidrip.github.io/DROP/version.html
  58.  *  - Community Credits        => https://lakshmidrip.github.io/DROP/credits.html
  59.  *  - Issues Catalog           => https://github.com/lakshmiDRIP/DROP/issues
  60.  *  - JUnit                    => https://lakshmidrip.github.io/DROP/junit/index.html
  61.  *  - Jacoco                   => https://lakshmidrip.github.io/DROP/jacoco/index.html
  62.  *
  63.  *  Licensed under the Apache License, Version 2.0 (the "License");
  64.  *      you may not use this file except in compliance with the License.
  65.  *  
  66.  *  You may obtain a copy of the License at
  67.  *      http://www.apache.org/licenses/LICENSE-2.0
  68.  *  
  69.  *  Unless required by applicable law or agreed to in writing, software
  70.  *      distributed under the License is distributed on an "AS IS" BASIS,
  71.  *      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  72.  *  
  73.  *  See the License for the specific language governing permissions and
  74.  *      limitations under the License.
  75.  */

  76. /**
  77.  * <i>Table7Reconciler</i> reconciles the First Set of Outputs (Table #7) of the Black-Litterman Model
  78.  * Process as illustrated in the Following Paper:
  79.  *  
  80.  * <br><br>
  81.  *  <ul>
  82.  *      <li>
  83.  *          He. G., and R. Litterman (1999): The Intuition behind the Black-Litterman Model Portfolios,
  84.  *              Goldman Sachs Asset Management
  85.  *      </li>
  86.  *  </ul>
  87.  *  
  88.  * <br><br>
  89.  *  <ul>
  90.  *      <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/PortfolioCore.md">Portfolio Core Module</a></li>
  91.  *      <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/AssetAllocationAnalyticsLibrary.md">Asset Allocation Analytics Library</a></li>
  92.  *      <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/sample/README.md">Sample</a></li>
  93.  *      <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/sample/helitterman/README.md">He and Litterman (1999) Reconcilers</a></li>
  94.  *  </ul>
  95.  * <br><br>
  96.  *
  97.  * @author Lakshmi Krishnamurthy
  98.  */

  99. public class Table7Reconciler
  100. {

  101.     public static final void main (
  102.         final String[] argumentArray)
  103.         throws Exception
  104.     {
  105.         EnvManager.InitEnv ("");

  106.         String[] assetIDArray = new String[]
  107.         {
  108.             "AUS",
  109.             "CAD",
  110.             "FRA",
  111.             "GER",
  112.             "JPN",
  113.             "UK ",
  114.             "USA"
  115.         };
  116.         double[] assetEquilibriumWeightArray = new double[]
  117.         {
  118.             0.016,
  119.             0.022,
  120.             0.052,
  121.             0.055,
  122.             0.116,
  123.             0.124,
  124.             0.615
  125.         };
  126.         double[][] assetExcessReturnsCorrelationMatrix = new double[][]
  127.         {
  128.             {1.000, 0.488, 0.478, 0.515, 0.439, 0.512, 0.491},
  129.             {0.488, 1.000, 0.664, 0.655, 0.310, 0.608, 0.779},
  130.             {0.478, 0.664, 1.000, 0.861, 0.355, 0.783, 0.668},
  131.             {0.515, 0.655, 0.861, 1.000, 0.354, 0.777, 0.653},
  132.             {0.439, 0.310, 0.355, 0.354, 1.000, 0.405, 0.306},
  133.             {0.512, 0.608, 0.783, 0.777, 0.405, 1.000, 0.652},
  134.             {0.491, 0.779, 0.668, 0.653, 0.306, 0.652, 1.000}
  135.         };
  136.         double[] assetExcessReturnsVolatilityArray = new double[]
  137.         {
  138.             0.160,
  139.             0.203,
  140.             0.248,
  141.             0.271,
  142.             0.210,
  143.             0.200,
  144.             0.187
  145.         };
  146.         double[][] assetSpaceViewProjectionMatrix = new double[][]
  147.         {
  148.             {0.000,  0.000, -0.295,  1.000,  0.000, -0.705,  0.000},
  149.             {0.000,  1.000,  0.000,  0.000,  0.000,  0.000, -1.000}
  150.         };
  151.         double tau = 0.05;
  152.         double dblRiskAversion = 2.5;
  153.         double dblRiskFreeRate = 0.0;
  154.         double[] projectionExpectedExcessReturnsArray = new double[]
  155.         {
  156.             0.05,
  157.             0.04
  158.         };
  159.         double[] assetSpaceJointReturnsReconcilerArray = new double[]
  160.         {
  161.             0.043,
  162.             0.089,
  163.             0.093,
  164.             0.106,
  165.             0.046,
  166.             0.069,
  167.             0.072
  168.         };
  169.         double[] posteriorOptimalWeightsReconcilerArray = new double[]
  170.         {
  171.              0.015,
  172.              0.539,
  173.             -0.005,
  174.              0.236,
  175.              0.110,
  176.             -0.011,
  177.              0.068
  178.         };
  179.         double[] posteriorOptimalDeviationReconcilerArray = new double[]
  180.         {
  181.              0.000,
  182.              0.518,
  183.             -0.054,
  184.              0.184,
  185.              0.000,
  186.             -0.130,
  187.             -0.518
  188.         };
  189.         double[] peLoadingsReconcilerArray = new double[]
  190.         {
  191.             0.193,
  192.             0.544
  193.         };

  194.         double[][] projectionExcessReturnsCovarianceMatrix = new double[][]
  195.         {
  196.             {0.043 * tau, 0.000 * tau},
  197.             {0.000 * tau, 0.017 * tau}
  198.         };

  199.         R1MultivariateNormal viewDistribution = R1MultivariateNormal.Standard (
  200.             new MultivariateMeta (
  201.                 new String[]
  202.                 {
  203.                     "PROJECTION #1",
  204.                     "PROJECTION #2"
  205.                 }
  206.             ),
  207.             projectionExpectedExcessReturnsArray,
  208.             projectionExcessReturnsCovarianceMatrix
  209.         );

  210.         double[][] assetExcessReturnsCovarianceMatrix = new double[assetIDArray.length][assetIDArray.length];

  211.         for (int assetIDI = 0;
  212.             assetIDI < assetIDArray.length;
  213.             ++assetIDI)
  214.         {
  215.             for (int assetIDJ = 0;
  216.                 assetIDJ < assetIDArray.length;
  217.                 ++assetIDJ)
  218.             {
  219.                 assetExcessReturnsCovarianceMatrix[assetIDI][assetIDJ] =
  220.                     assetExcessReturnsCorrelationMatrix[assetIDI][assetIDJ] *
  221.                     assetExcessReturnsVolatilityArray[assetIDI] *
  222.                     assetExcessReturnsVolatilityArray[assetIDJ];
  223.             }
  224.         }

  225.         BlackLittermanCombinationEngine blackLittermanCombinationEngine =
  226.             new BlackLittermanCombinationEngine (
  227.                 ForwardReverseHoldingsAllocation.Reverse (
  228.                     Portfolio.Standard (
  229.                         assetIDArray,
  230.                         assetEquilibriumWeightArray
  231.                     ),
  232.                     assetExcessReturnsCovarianceMatrix,
  233.                     dblRiskAversion
  234.                 ),
  235.                 new PriorControlSpecification (
  236.                     false,
  237.                     dblRiskFreeRate,
  238.                     tau
  239.                 ),
  240.                 new ProjectionSpecification (
  241.                     viewDistribution,
  242.                     assetSpaceViewProjectionMatrix
  243.                 )
  244.             );

  245.         R1MultivariateConvolutionMetrics jointPosteriorMetrics =
  246.             blackLittermanCombinationEngine.customConfidenceRun().jointPosteriorMetrics();

  247.         R1MultivariateNormal jointDistribution = (R1MultivariateNormal) jointPosteriorMetrics.joint();

  248.         R1MultivariateNormal posteriorDistribution =
  249.             (R1MultivariateNormal) jointPosteriorMetrics.posterior();

  250.         double[] assetSpaceJointReturnsArray = jointDistribution.mean();

  251.         double[][] assetSpaceJointCovarianceMatrix = jointDistribution.covariance().covarianceMatrix();

  252.         double[][] assetSpacePosteriorCovarianceMatrix =
  253.             posteriorDistribution.covariance().covarianceMatrix();

  254.         AssetComponent[] assetComponentArray = new QuadraticMeanVarianceOptimizer().allocate (
  255.             new HoldingsAllocationControl (
  256.                 assetIDArray,
  257.                 CustomRiskUtilitySettings.RiskAversion (dblRiskAversion),
  258.                 EqualityConstraintSettings.Unconstrained()
  259.             ),
  260.             AssetUniverseStatisticalProperties.FromMultivariateMetrics (
  261.                 MultivariateMoments.Standard (
  262.                     assetIDArray,
  263.                     posteriorDistribution.mean(),
  264.                     assetSpacePosteriorCovarianceMatrix
  265.                 )
  266.             )
  267.         ).optimalPortfolio().assetComponentArray();

  268.         ProjectionExposure projectionExposure =
  269.             blackLittermanCombinationEngine.projectionExposureAttribution();

  270.         double[] interViewComponentArray = projectionExposure.interViewComponentArray();

  271.         double[] intraViewComponentArray = projectionExposure.intraViewComponentArray();

  272.         double[] priorViewComponentArray = projectionExposure.priorViewComponentArray();

  273.         double[] cumulativeViewComponentLoadingArray =
  274.             projectionExposure.cumulativeViewComponentLoadingArray();

  275.         System.out.println ("\n\t|------------------------||");

  276.         System.out.println ("\t| TAU   => " + FormatUtil.FormatDouble (tau, 1, 8, 1.) + "   ||");

  277.         System.out.println ("\t| DELTA => " + FormatUtil.FormatDouble (dblRiskAversion, 1, 8, 1.) + "   ||");

  278.         System.out.println ("\t|------------------------||");

  279.         System.out.println ("\n\t|------------------------||");

  280.         System.out.println ("\t|  ASSET EXCESS RETURNS  ||");

  281.         System.out.println ("\t|------------------------||");

  282.         System.out.println ("\t|   ID  => EQ WT |  VOL  ||");

  283.         System.out.println ("\t|------------------------||");

  284.         for (int assetID = 0;
  285.             assetID < assetSpaceJointReturnsReconcilerArray.length;
  286.             ++assetID)
  287.         {
  288.             System.out.println (
  289.                 "\t| [" + assetIDArray[assetID] + "] =>" +
  290.                 FormatUtil.FormatDouble (assetEquilibriumWeightArray[assetID], 2, 1, 100.) + "% |" +
  291.                 FormatUtil.FormatDouble (assetExcessReturnsVolatilityArray[assetID], 2, 1, 100.) + "% ||"
  292.             );
  293.         }

  294.         System.out.println ("\t|------------------------||");

  295.         System.out.println ("\n\t|------------------------------------------------------------------------------------------------||");

  296.         System.out.println ("\t|                           PRIOR CROSS ASSET CORRELATION MATRIX                                 ||");

  297.         System.out.println ("\t|------------------------------------------------------------------------------------------------||");

  298.         String header = "\t|     |";

  299.         for (int assetID = 0;
  300.             assetID < assetIDArray.length;
  301.             ++assetID)
  302.         {
  303.             header += "    " + assetIDArray[assetID] + "     |";
  304.         }

  305.         System.out.println (header + "|");

  306.         System.out.println ("\t|------------------------------------------------------------------------------------------------||");

  307.         for (int assetIDI = 0;
  308.             assetIDI < assetIDArray.length;
  309.             ++assetIDI)
  310.         {
  311.             String dump = "\t| " + assetIDArray[assetIDI] + " ";

  312.             for (int assetIDJ = 0;
  313.                 assetIDJ < assetIDArray.length;
  314.                 ++assetIDJ)
  315.             {
  316.                 dump += "|" + FormatUtil.FormatDouble (
  317.                     assetExcessReturnsCorrelationMatrix[assetIDI][assetIDJ], 1, 8, 1.
  318.                 ) + " ";
  319.             }

  320.             System.out.println (dump + "||");
  321.         }

  322.         System.out.println ("\t|------------------------------------------------------------------------------------------------||");

  323.         System.out.println ("\n\t|------------------------------------------------------------------------------------------------||");

  324.         System.out.println ("\t|                           PRIOR CROSS ASSET COVARIANCE MATRIX                                  ||");

  325.         System.out.println ("\t|------------------------------------------------------------------------------------------------||");

  326.         header = "\t|     |";

  327.         for (int assetID = 0;
  328.             assetID < assetIDArray.length;
  329.             ++assetID)
  330.         {
  331.             header += "    " + assetIDArray[assetID] + "     |";
  332.         }

  333.         System.out.println (header + "|");

  334.         System.out.println ("\t|------------------------------------------------------------------------------------------------||");

  335.         for (int assetIDI = 0; assetIDI < assetIDArray.length; ++assetIDI)
  336.         {
  337.             String dump = "\t| " + assetIDArray[assetIDI] + " ";

  338.             for (int assetIDJ = 0;
  339.                 assetIDJ < assetIDArray.length;
  340.                 ++assetIDJ)
  341.             {
  342.                 dump += "|" + FormatUtil.FormatDouble (
  343.                     assetExcessReturnsCovarianceMatrix[assetIDI][assetIDJ], 1, 8, 1.
  344.                 ) + " ";
  345.             }

  346.             System.out.println (dump + "||");
  347.         }

  348.         System.out.println ("\t|------------------------------------------------------------------------------------------------||");

  349.         System.out.println ("\n\t|------------------------------------------------------------------------------------------------||");

  350.         System.out.println ("\t|                          VIEW SCOPING ASSET PROJECTION LOADING                                 ||");

  351.         System.out.println ("\t|------------------------------------------------------------------------------------------------||");

  352.         header = "\t|     |";

  353.         for (int assetID = 0;
  354.             assetID < assetIDArray.length;
  355.             ++assetID)
  356.         {
  357.             header += "    " + assetIDArray[assetID] + "     |";
  358.         }

  359.         System.out.println (header + "|");

  360.         System.out.println ("\t|------------------------------------------------------------------------------------------------||");

  361.         for (int viewIndex = 0;
  362.             viewIndex < assetSpaceViewProjectionMatrix.length;
  363.             ++viewIndex)
  364.         {
  365.             String dump = "\t|  #" + viewIndex + " ";

  366.             for (int assetID = 0;
  367.                 assetID < assetIDArray.length;
  368.                 ++assetID)
  369.             {
  370.                 dump += "|" + FormatUtil.FormatDouble (
  371.                     assetSpaceViewProjectionMatrix[viewIndex][assetID], 1, 8, 1.
  372.                 ) + " ";
  373.             }

  374.             System.out.println (dump + "||");
  375.         }

  376.         System.out.println ("\t|------------------------------------------------------------------------------------------------||");

  377.         System.out.println ("\n\t|------------------------------------------------------------------------------------------------||");

  378.         System.out.println ("\t|------------------------------------------------------------------------------------------------||");

  379.         for (int viewIndexI = 0;
  380.             viewIndexI < assetSpaceViewProjectionMatrix.length;
  381.             ++viewIndexI)
  382.         {
  383.             String dump = "\t|  #" + viewIndexI + " ";

  384.             for (int viewIndexJ = 0; viewIndexJ < assetSpaceViewProjectionMatrix.length; ++viewIndexJ)
  385.             {
  386.                 dump += "|" + FormatUtil.FormatDouble (
  387.                     projectionExcessReturnsCovarianceMatrix[viewIndexI][viewIndexJ], 1, 8, 1.
  388.                 ) + " ";
  389.             }

  390.             System.out.println (
  391.                 dump + "|" + FormatUtil.FormatDouble (
  392.                     projectionExpectedExcessReturnsArray[viewIndexI], 1, 2, 100.
  393.                 ) + "%"
  394.             );
  395.         }

  396.         System.out.println ("\t|------------------------------------------------------------------------------------------------||");

  397.         System.out.println ("\t|------------------------------------------------------------------------------------------------||");

  398.         System.out.println ("\n\t|------------------------------------------------------------------------------------------------||");

  399.         System.out.println ("\t|                           JOINT CROSS ASSET COVARIANCE MATRIX                                  ||");

  400.         System.out.println ("\t|------------------------------------------------------------------------------------------------||");

  401.         header = "\t|     |";

  402.         for (int assetID = 0;
  403.             assetID < assetIDArray.length;
  404.             ++assetID)
  405.         {
  406.             header += "    " + assetIDArray[assetID] + "     |";
  407.         }

  408.         System.out.println (header + "|");

  409.         System.out.println ("\t|------------------------------------------------------------------------------------------------||");

  410.         for (int assetIDI = 0;
  411.             assetIDI < assetIDArray.length;
  412.             ++assetIDI)
  413.         {
  414.             String dump = "\t| " + assetIDArray[assetIDI] + " ";

  415.             for (int assetIDJ = 0;
  416.                 assetIDJ < assetIDArray.length;
  417.                 ++assetIDJ)
  418.             {
  419.                 dump += "|" + FormatUtil.FormatDouble (
  420.                     assetSpaceJointCovarianceMatrix[assetIDI][assetIDJ], 1, 8, 1.
  421.                 ) + " ";
  422.             }

  423.             System.out.println (dump + "||");
  424.         }

  425.         System.out.println ("\t|------------------------------------------------------------------------------------------------||");

  426.         System.out.println ("\n\t|------------------------------------------------------------------------------------------------||");

  427.         System.out.println ("\t|                         POSTERIOR CROSS ASSET COVARIANCE MATRIX                                ||");

  428.         System.out.println ("\t|------------------------------------------------------------------------------------------------||");

  429.         header = "\t|     |";

  430.         for (int assetID = 0;
  431.             assetID < assetIDArray.length;
  432.             ++assetID)
  433.         {
  434.             header += "    " + assetIDArray[assetID] + "     |";
  435.         }

  436.         System.out.println (header + "|");

  437.         System.out.println ("\t|------------------------------------------------------------------------------------------------||");

  438.         for (int assetIDI = 0;
  439.             assetIDI < assetIDArray.length;
  440.             ++assetIDI)
  441.         {
  442.             String dump = "\t| " + assetIDArray[assetIDI] + " ";

  443.             for (int assetIDJ = 0;
  444.                 assetIDJ < assetIDArray.length;
  445.                 ++assetIDJ)
  446.             {
  447.                 dump += "|" + FormatUtil.FormatDouble (
  448.                     assetSpacePosteriorCovarianceMatrix[assetIDI][assetIDJ], 1, 8, 1.
  449.                 ) + " ";
  450.             }

  451.             System.out.println (dump + "||");
  452.         }

  453.         System.out.println ("\t|------------------------------------------------------------------------------------------------||\n");

  454.         System.out.println ("\t|------------------------||");

  455.         System.out.println ("\t| JOINT/POSTERIOR RETURN ||");

  456.         System.out.println ("\t|------------------------||");

  457.         System.out.println ("\t|   ID  => RIOC  | HL99  ||");

  458.         System.out.println ("\t|------------------------||");

  459.         for (int assetID = 0;
  460.             assetID < assetSpaceJointReturnsReconcilerArray.length;
  461.             ++assetID)
  462.         {
  463.             System.out.println (
  464.                 "\t| [" + assetIDArray[assetID] + "] =>" +
  465.                 FormatUtil.FormatDouble (assetSpaceJointReturnsArray[assetID], 2, 1, 100.) + "% |" +
  466.                 FormatUtil.FormatDouble (assetSpaceJointReturnsReconcilerArray[assetID], 2, 1, 100.) + "% ||"
  467.             );
  468.         }

  469.         System.out.println ("\t|------------------------||");

  470.         System.out.println ("\n\t|------------------------||");

  471.         System.out.println ("\t| OPTIMAL POSTERIOR WTS. ||");

  472.         System.out.println ("\t|------------------------||");

  473.         System.out.println ("\t|   ID  => RIOC  | HL99  ||");

  474.         System.out.println ("\t|------------------------||");

  475.         for (int assetID = 0;
  476.             assetID < assetComponentArray.length;
  477.             ++assetID)
  478.         {
  479.             System.out.println (
  480.                 "\t| [" + assetIDArray[assetID] + "] =>" +
  481.                 FormatUtil.FormatDouble (assetComponentArray[assetID].amount(), 2, 1, 100.) + "% |" +
  482.                 FormatUtil.FormatDouble (posteriorOptimalWeightsReconcilerArray[assetID], 2, 1, 100.) +
  483.                     "% ||"
  484.             );
  485.         }

  486.         System.out.println ("\t|------------------------||");

  487.         System.out.println ("\n\t|------------------------||");

  488.         System.out.println ("\t|   POSTERIOR DEVIATION  ||");

  489.         System.out.println ("\t|------------------------||");

  490.         System.out.println ("\t|   ID  => RIOC  | HL99  ||");

  491.         System.out.println ("\t|------------------------||");

  492.         for (int assetID = 0;
  493.             assetID < assetComponentArray.length;
  494.             ++assetID)
  495.         {
  496.             System.out.println (
  497.                 "\t| [" + assetIDArray[assetID] + "] =>" +
  498.                 FormatUtil.FormatDouble (
  499.                     assetComponentArray[assetID].amount() - (assetEquilibriumWeightArray[assetID]) /
  500.                         (1. + tau),
  501.                     2, 1, 100.
  502.                 ) + "% |" +
  503.                 FormatUtil.FormatDouble (posteriorOptimalDeviationReconcilerArray[assetID], 2, 1, 100.) +
  504.                     "% ||"
  505.             );
  506.         }

  507.         System.out.println ("\t|------------------------||\n");

  508.         System.out.println ("\t|-----------------------------------------------------------------||");

  509.         System.out.println ("\t|              POSTERIOR DEVIATION WEIGHTS ATTRIBUTION            ||");

  510.         System.out.println ("\t|-----------------------------------------------------------------||");

  511.         System.out.println ("\t| VIEW NUM =>  INTRA |  INTER |  PRIOR |  CUMUL |  RECON |  BAYES ||");

  512.         System.out.println ("\t|-----------------------------------------------------------------||");

  513.         for (int viewIndex = 0;
  514.             viewIndex < interViewComponentArray.length;
  515.             ++viewIndex)
  516.         {
  517.             System.out.println (
  518.                 "\t| VIEW  #" + (viewIndex + 1) + " => " +
  519.                 FormatUtil.FormatDouble (interViewComponentArray[viewIndex], 1, 3, 1.) + " | " +
  520.                 FormatUtil.FormatDouble (intraViewComponentArray[viewIndex], 1, 3, 1.) + " | " +
  521.                 FormatUtil.FormatDouble (priorViewComponentArray[viewIndex], 1, 3, 1.) + " | " +
  522.                 FormatUtil.FormatDouble (cumulativeViewComponentLoadingArray[viewIndex], 1, 3, 1.) + " | " +
  523.                 FormatUtil.FormatDouble (peLoadingsReconcilerArray[viewIndex], 1, 3, 1.) + " | " +
  524.                 FormatUtil.FormatDouble (
  525.                     cumulativeViewComponentLoadingArray[viewIndex] / (1. + tau), 1, 3, 1.
  526.                 ) + " ||"
  527.             );
  528.         }

  529.         System.out.println ("\t|-----------------------------------------------------------------||");

  530.         EnvManager.TerminateEnv();
  531.     }
  532. }