Repository navigation
Model PortfolioOptimComparisons2Demo
Wiki home · Tutorials · Execution records
These examples are tutorials that teach how to use AlgoQuant. Their numerical results are incidental and irrelevant to their teaching purpose. Use them to learn API calls, simulation setup, data flow and reporting. The technical examples use synthetic quick-mode data. Read a result here as an illustration of a library call, not as investment evidence.
Tutorials and quantitative model references · Pinned source · Javadoc
Harry Markowitz, Portfolio Selection (1952) explains diversification as a portfolio problem: an asset's risk cannot be judged independently of how its returns move with the other holdings. Expected portfolio return is a weighted mean; portfolio variance depends on the full covariance matrix.
The efficient set contains portfolios for which expected return cannot be improved without accepting more variance, or variance reduced without giving up expected return. An investor selects a tradeoff according to preferences and constraints. Holding many positively correlated assets need not provide much diversification.
The framework assumes the relevant return means and covariances are supplied. In practice, estimates can be unstable and constraints can materially change the answer. A solved optimization is therefore a set of weights under assumptions, not evidence of future outperformance. The original article was reviewed. Rolling calibration, rebalance schedules, costs and the dataset used here belong to the demo, not to the static 1952 formulation.
This comparison also includes Corvalán’s near-efficient diversification framework (2005) and Lai, Xing and Chen’s estimation-risk framework (2011). The first permits diversification within a tolerance of a risk–return target; the second accounts for uncertain estimated inputs through predictive/resampling methods. Equal-weight and simplified-input baselines help distinguish the effects of estimation, optimization and post-processing. A common historical interval does not make the algorithms’ objectives identical.
Compares allocation methods on selected historical/local data. A common estimation window and asset ordering are required for a fair comparison. Several alternative dataset branches are embedded in main; results depend on the branch and its data coverage.
Compares the different asset allocation algorithms. Prices are from historical data.
Using this example. Compares allocation algorithms on historical price data. Some branches reference local China datasets and an absolute Windows Compustat path; choose the intended branch and configure those inputs before running. Consistent asset ordering and common estimation periods are essential to the comparison.
Model and publication. Related theory and the scope of this example are distinguished below.
Implementation in this tutorial. Compares allocation methods on selected historical/local data. A common estimation window and asset ordering are required for a fair comparison. Several alternative dataset branches are embedded in main; results depend on the branch and its data coverage.
| Item | Value |
|---|---|
| Status | completed |
| Run | 39122217560 |
| UTC publication | 2026-10-18 11:43 UTC |
| Source commit | f497645628296f441e1e254127a7547d15106bbc |
| Data mode | original main defaults |
| Exit code | 0 |
| Elapsed seconds | 35.94 |
| Time limit seconds | 1800 |
| Maximum Java heap | 6g |
| AlgoQuant source commit | aba178deb0e78dc72184546a1e0934c3abce74a1 |
| NM Dev source commit | 04c12d1640fb700f52a2f7dc5cadf560040490e6 |
| Combined runtime SHA-256 | c1199a1c204cc4ffdf937b756bceacaf30bb64f35a844770490fea268742379b |
The original main returned successfully without a detected calculation error. Read its assumptions before interpreting it.
Follow the repository setup for JDK 8, Maven credentials and an external NM license. From the repository root:
mvn -U -Dmaven.test.skip=true clean package
mvn exec:java -Dexec.mainClass=tech.nmfin.algoquant.demo.model.portfoliooptimization.PortfolioOptimComparisons2DemoThe automated run uses scripts/ModelDemoRunner.java to initialize the external license before the unchanged main, save JFreeChart windows as PNGs, and exit after main returns. It uses an isolated working directory with the repository datasets/configuration linked in. Running directly may leave desktop windows open.
11:17:12.688 [main] INFO t.n.a.m.p.s.OptimizationAlgorithmComparisonSimulation - Running algorithm 'equal' (window=P6M, rebalance=P6M)...
11:17:12.733 [main] INFO tech.nmfin.algoquant.util.config.AQConfig - looking up configuration file: config.default.xml
11:17:12.734 [main] INFO tech.nmfin.algoquant.util.config.AQConfig - looking up configuration file: config/config.default.xml
11:17:12.734 [main] INFO tech.nmfin.algoquant.util.config.AQConfig - loading config file: file:/home/runner/work/algoquant/algoquant/target/model-results/PortfolioOptimComparisons2Demo/work/config/config.default.xml
11:17:13.004 [main] INFO tech.nmfin.algoquant.util.config.AQConfig - current directory: /home/runner/work/algoquant/algoquant/target/model-results/PortfolioOptimComparisons2Demo/work
11:17:13.004 [main] INFO tech.nmfin.algoquant.util.config.AQConfig - current config:
11:17:13.019 [main] INFO tech.nmfin.algoquant.util.config.AQConfig - logback.configurationFile: /home/runner/work/algoquant/algoquant/config/model-demo-logback.xml
11:17:13.022 [main] INFO tech.nmfin.algoquant.util.config.AQConfig - nm.license: /home/runner/work/algoquant/algoquant/license/nm.lic
11:17:13.023 [main] INFO tech.nmfin.algoquant.util.config.AQConfig - DATA_FOLDER: ./test-data
11:17:13.023 [main] INFO tech.nmfin.algoquant.util.config.AQConfig - DATA_GAINCAPITAL: ${DATA_FOLDER}/processed/gaincapital/extracted-from-raw-arrange-by-dates
11:17:13.024 [main] INFO tech.nmfin.algoquant.util.config.AQConfig - DATA_BLOOMBERG: ${DATA_FOLDER}/processed/bloomberg
11:17:13.024 [main] INFO tech.nmfin.algoquant.util.config.AQConfig - DATA_YAHOO: ${DATA_FOLDER}/yahoo
11:17:13.024 [main] INFO tech.nmfin.algoquant.util.config.AQConfig - DATA_SGX: ${DATA_FOLDER}/raw/sgx
11:17:13.024 [main] INFO tech.nmfin.algoquant.util.config.AQConfig - DATA_HOLIDAYS: ./log/holidays
11:17:13.025 [main] INFO tech.nmfin.algoquant.util.config.AQConfig - DATA_COMPUSTAT_HK: ${DATA_FOLDER}/compustat/hk
11:17:13.025 [main] INFO tech.nmfin.algoquant.util.config.AQConfig - PDF_OUTPUT_FOLDER: ./log/
11:17:13.025 [main] INFO tech.nmfin.algoquant.util.config.AQConfig - PDF_PLOT_WIDTH: 800
11:17:13.026 [main] INFO tech.nmfin.algoquant.util.config.AQConfig - PDF_PLOT_HEIGHT: 600
11:17:18.253 [main] INFO t.n.a.d.h.yahoo.YahooEODCacheFactory - reading Yahoo! data for ^IRX from the Internet from 2016-06-29T00:00 to 2018-08-04T16:00
11:17:18.661 [main] INFO t.n.a.d.h.yahoo.YahooEODCacheFactory - reading Yahoo! data for ^GSPC from the Internet from 2015-06-01T00:00 to 2019-01-15T16:00
11:17:19.096 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2016-07-29T00:00
11:17:19.100 [main] INFO t.n.a.m.s.rebalance.RebalancePortfolioTechnical - dropped products with no data (13): [low_risk_1(CNY), low_risk_2(CNY), low_risk_3(CNY), low_risk_4(CNY), low_risk_5(CNY), risk_1(CNY), risk_2(CNY), risk_3(CNY), risk_4(CNY), risk_5(CNY), risk_6(CNY), risk_7(CNY), risk_8(CNY)]
11:17:19.101 [main] INFO t.n.a.m.s.rebalance.RebalancePortfolioTechnical - Rebalance deferred: calibration data are not yet available at 2016-07-29T00:00
11:17:19.124 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2017-01-29T00:00
11:17:19.238 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2017-07-29T00:00
11:17:19.277 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2018-01-29T00:00
11:17:19.320 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2018-07-29T00:00
11:17:19.773 [main] INFO t.n.a.m.p.s.OptimizationAlgorithmComparisonSimulation - Finished algorithm 'equal' (window=P6M, rebalance=P6M)
... excerpt shortened; complete stdout is in the release archive ...
11:17:21.230 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2016-07-29T00:00
11:17:21.230 [main] INFO t.n.a.m.s.rebalance.RebalancePortfolioTechnical - dropped products with no data (13): [low_risk_1(CNY), low_risk_2(CNY), low_risk_3(CNY), low_risk_4(CNY), low_risk_5(CNY), risk_1(CNY), risk_2(CNY), risk_3(CNY), risk_4(CNY), risk_5(CNY), risk_6(CNY), risk_7(CNY), risk_8(CNY)]
11:17:21.230 [main] INFO t.n.a.m.s.rebalance.RebalancePortfolioTechnical - Rebalance deferred: calibration data are not yet available at 2016-07-29T00:00
11:17:21.232 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2017-01-29T00:00
11:17:21.263 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2017-07-29T00:00
11:17:21.287 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2018-01-29T00:00
11:17:21.309 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2018-07-29T00:00
11:17:21.395 [main] INFO t.n.a.m.p.s.OptimizationAlgorithmComparisonSimulation - Finished algorithm 'sample-mean-shrank-cov/markowitz' (window=P6M, rebalance=P6M)
11:17:21.395 [main] INFO t.n.a.m.p.s.OptimizationAlgorithmComparisonSimulation - Running algorithm 'markowitz-corvalan' (window=P6M, rebalance=P6M)...
11:17:21.396 [main] INFO t.n.a.d.h.yahoo.YahooEODCacheFactory - reading Yahoo! data for ^GSPC from the Internet from 2015-06-01T00:00 to 2019-01-15T16:00
11:17:21.568 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2016-07-29T00:00
11:17:21.568 [main] INFO t.n.a.m.s.rebalance.RebalancePortfolioTechnical - dropped products with no data (13): [low_risk_1(CNY), low_risk_2(CNY), low_risk_3(CNY), low_risk_4(CNY), low_risk_5(CNY), risk_1(CNY), risk_2(CNY), risk_3(CNY), risk_4(CNY), risk_5(CNY), risk_6(CNY), risk_7(CNY), risk_8(CNY)]
11:17:21.568 [main] INFO t.n.a.m.s.rebalance.RebalancePortfolioTechnical - Rebalance deferred: calibration data are not yet available at 2016-07-29T00:00
11:17:21.570 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2017-01-29T00:00
11:17:21.658 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2017-07-29T00:00
11:17:21.684 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2018-01-29T00:00
11:17:21.705 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2018-07-29T00:00
11:17:21.801 [main] INFO t.n.a.m.p.s.OptimizationAlgorithmComparisonSimulation - Finished algorithm 'markowitz-corvalan' (window=P6M, rebalance=P6M)
11:17:21.801 [main] INFO t.n.a.m.p.s.OptimizationAlgorithmComparisonSimulation - Running algorithm 'lai2010' (window=P6M, rebalance=P6M)...
11:17:21.801 [main] INFO t.n.a.d.h.yahoo.YahooEODCacheFactory - reading Yahoo! data for ^GSPC from the Internet from 2015-06-01T00:00 to 2019-01-15T16:00
11:17:21.974 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2016-07-29T00:00
11:17:21.974 [main] INFO t.n.a.m.s.rebalance.RebalancePortfolioTechnical - dropped products with no data (13): [low_risk_1(CNY), low_risk_2(CNY), low_risk_3(CNY), low_risk_4(CNY), low_risk_5(CNY), risk_1(CNY), risk_2(CNY), risk_3(CNY), risk_4(CNY), risk_5(CNY), risk_6(CNY), risk_7(CNY), risk_8(CNY)]
11:17:21.974 [main] INFO t.n.a.m.s.rebalance.RebalancePortfolioTechnical - Rebalance deferred: calibration data are not yet available at 2016-07-29T00:00
11:17:21.976 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2017-01-29T00:00
optimal eta = 40.000000
11:17:26.485 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2017-07-29T00:00
optimal eta = 6.000000
11:17:27.602 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2018-01-29T00:00
optimal eta = 5.000000
11:17:28.463 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2018-07-29T00:00
optimal eta = 40.000000
11:17:31.242 [main] INFO t.n.a.m.p.s.OptimizationAlgorithmComparisonSimulation - Finished algorithm 'lai2010' (window=P6M, rebalance=P6M)
11:17:31.242 [main] INFO t.n.a.m.p.s.OptimizationAlgorithmComparisonSimulation - Running algorithm 'NMSAAM' (window=P6M, rebalance=P6M)...
11:17:31.242 [main] INFO t.n.a.d.h.yahoo.YahooEODCacheFactory - reading Yahoo! data for ^GSPC from the Internet from 2015-06-01T00:00 to 2019-01-15T16:00
11:17:32.302 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2016-07-29T00:00
11:17:32.303 [main] INFO t.n.a.m.s.rebalance.RebalancePortfolioTechnical - dropped products with no data (13): [low_risk_1(CNY), low_risk_2(CNY), low_risk_3(CNY), low_risk_4(CNY), low_risk_5(CNY), risk_1(CNY), risk_2(CNY), risk_3(CNY), risk_4(CNY), risk_5(CNY), risk_6(CNY), risk_7(CNY), risk_8(CNY)]
11:17:32.303 [main] INFO t.n.a.m.s.rebalance.RebalancePortfolioTechnical - Rebalance deferred: calibration data are not yet available at 2016-07-29T00:00
11:17:32.304 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2017-01-29T00:00
optimal eta = 3.500000
11:17:32.895 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2017-07-29T00:00
optimal eta = 14.000000
11:17:33.307 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2018-01-29T00:00
optimal eta = 11.000000
11:17:33.737 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2018-07-29T00:00
optimal eta = 2.500000
11:17:34.117 [main] INFO t.n.a.m.p.s.OptimizationAlgorithmComparisonSimulation - Finished algorithm 'NMSAAM' (window=P6M, rebalance=P6M)
11:17:34.117 [main] INFO t.n.a.m.p.s.OptimizationAlgorithmComparisonSimulation - Running algorithm 'partial-NMSAAM' (window=P6M, rebalance=P6M)...
11:17:34.118 [main] INFO t.n.a.d.h.yahoo.YahooEODCacheFactory - reading Yahoo! data for ^GSPC from the Internet from 2015-06-01T00:00 to 2019-01-15T16:00
11:17:34.776 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2016-07-29T00:00
11:17:34.776 [main] INFO t.n.a.m.s.rebalance.RebalancePortfolioTechnical - dropped products with no data (13): [low_risk_1(CNY), low_risk_2(CNY), low_risk_3(CNY), low_risk_4(CNY), low_risk_5(CNY), risk_1(CNY), risk_2(CNY), risk_3(CNY), risk_4(CNY), risk_5(CNY), risk_6(CNY), risk_7(CNY), risk_8(CNY)]
11:17:34.776 [main] INFO t.n.a.m.s.rebalance.RebalancePortfolioTechnical - Rebalance deferred: calibration data are not yet available at 2016-07-29T00:00
11:17:34.777 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2017-01-29T00:00
optimal eta = 3.500000
11:17:35.081 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2017-07-29T00:00
optimal eta = 14.000000
11:17:35.381 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2018-01-29T00:00
optimal eta = 12.000000
11:17:35.675 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2018-07-29T00:00
optimal eta = 2.000000
11:17:36.011 [main] INFO t.n.a.m.p.s.OptimizationAlgorithmComparisonSimulation - Finished algorithm 'partial-NMSAAM' (window=P6M, rebalance=P6M)
11:17:36.011 [main] INFO t.n.a.m.p.s.OptimizationAlgorithmComparisonSimulation - Running algorithm 'lai2010-corvalan' (window=P6M, rebalance=P6M)...
11:17:36.012 [main] INFO t.n.a.d.h.yahoo.YahooEODCacheFactory - reading Yahoo! data for ^GSPC from the Internet from 2015-06-01T00:00 to 2019-01-15T16:00
11:17:36.668 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2016-07-29T00:00
11:17:36.668 [main] INFO t.n.a.m.s.rebalance.RebalancePortfolioTechnical - dropped products with no data (13): [low_risk_1(CNY), low_risk_2(CNY), low_risk_3(CNY), low_risk_4(CNY), low_risk_5(CNY), risk_1(CNY), risk_2(CNY), risk_3(CNY), risk_4(CNY), risk_5(CNY), risk_6(CNY), risk_7(CNY), risk_8(CNY)]
11:17:36.668 [main] INFO t.n.a.m.s.rebalance.RebalancePortfolioTechnical - Rebalance deferred: calibration data are not yet available at 2016-07-29T00:00
11:17:36.669 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2017-01-29T00:00
optimal eta = 40.000000
11:17:39.087 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2017-07-29T00:00
optimal eta = 6.000000
11:17:39.559 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2018-01-29T00:00
optimal eta = 5.000000
11:17:40.059 [main] INFO t.n.a.m.strategy.rebalance.RebalancePortfolio - Calculating weights for rebalancing point at 2018-07-29T00:00
optimal eta = 40.000000
11:17:42.259 [main] INFO t.n.a.m.p.s.OptimizationAlgorithmComparisonSimulation - Finished algorithm 'lai2010-corvalan' (window=P6M, rebalance=P6M)
11:17:44.804 [main] INFO t.n.a.execution.report.SimulationResultsExporter - Saving to /home/runner/work/algoquant/algoquant/target/model-results/PortfolioOptimComparisons2Demo/work/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.measures.csv...
11:17:44.823 [main] INFO t.n.a.execution.report.SimulationResultsExporter - Saving to /home/runner/work/algoquant/algoquant/target/model-results/PortfolioOptimComparisons2Demo/work/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.executions.csv...
11:17:44.830 [main] INFO t.n.a.execution.report.SimulationResultsExporter - Saving to /home/runner/work/algoquant/algoquant/target/model-results/PortfolioOptimComparisons2Demo/work/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.trades.csv...
11:17:44.838 [main] INFO t.n.a.execution.report.ValueHistoriesExporter - Saving to /home/runner/work/algoquant/algoquant/target/model-results/PortfolioOptimComparisons2Demo/work/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.computed.weights.csv...
11:17:44.845 [main] INFO t.n.a.execution.report.ValueHistoriesExporter - Saving to /home/runner/work/algoquant/algoquant/target/model-results/PortfolioOptimComparisons2Demo/work/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.actual.weights.csv...
11:17:44.847 [main] INFO t.n.a.execution.report.ValueHistoriesExporter - Saving to /home/runner/work/algoquant/algoquant/target/model-results/PortfolioOptimComparisons2Demo/work/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.profit.csv...




Asset order follows CSV columns; each panel is one rebalance observation.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.actual.weights.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

weights allocation — rebalance=P6M, window=P6M, riskAverse=10000.0, shrinkage=0.5, algorithm=plugin-markowitz
Asset order follows CSV columns; each panel is one rebalance observation.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.actual.weights.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

weights allocation — rebalance=P6M, window=P6M, riskAverse=10000.0, shrinkage=0.5, algorithm=sample-mean-equal-cor
Asset order follows CSV columns; each panel is one rebalance observation.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.actual.weights.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

weights allocation — rebalance=P6M, window=P6M, riskAverse=10000.0, shrinkage=0.5, algorithm=equal-mean-shrank-cov
Asset order follows CSV columns; each panel is one rebalance observation.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.actual.weights.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

weights allocation — rebalance=P6M, window=P6M, riskAverse=10000.0, shrinkage=0.5, algorithm=sample-mean-shrank-cov/markowitz
Asset order follows CSV columns; each panel is one rebalance observation.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.actual.weights.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

weights allocation — rebalance=P6M, window=P6M, riskAverse=10000.0, shrinkage=0.5, algorithm=markowitz-corvalan
Asset order follows CSV columns; each panel is one rebalance observation.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.actual.weights.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

weights allocation — rebalance=P6M, window=P6M, riskAverse=10000.0, shrinkage=0.5, algorithm=lai2010
Asset order follows CSV columns; each panel is one rebalance observation.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.actual.weights.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

Asset order follows CSV columns; each panel is one rebalance observation.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.actual.weights.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

weights allocation — rebalance=P6M, window=P6M, riskAverse=10000.0, shrinkage=0.5, algorithm=partial-NMSAAM
Asset order follows CSV columns; each panel is one rebalance observation.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.actual.weights.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

weights allocation — rebalance=P6M, window=P6M, riskAverse=10000.0, shrinkage=0.5, algorithm=lai2010-corvalan
Asset order follows CSV columns; each panel is one rebalance observation.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.actual.weights.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

Asset order follows CSV columns; each panel is one rebalance observation.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.computed.weights.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

weights allocation — rebalance=P6M, window=P6M, riskAverse=10000.0, shrinkage=0.5, algorithm=plugin-markowitz
Asset order follows CSV columns; each panel is one rebalance observation.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.computed.weights.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

weights allocation — rebalance=P6M, window=P6M, riskAverse=10000.0, shrinkage=0.5, algorithm=sample-mean-equal-cor
Asset order follows CSV columns; each panel is one rebalance observation.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.computed.weights.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

weights allocation — rebalance=P6M, window=P6M, riskAverse=10000.0, shrinkage=0.5, algorithm=equal-mean-shrank-cov
Asset order follows CSV columns; each panel is one rebalance observation.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.computed.weights.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

weights allocation — rebalance=P6M, window=P6M, riskAverse=10000.0, shrinkage=0.5, algorithm=sample-mean-shrank-cov/markowitz
Asset order follows CSV columns; each panel is one rebalance observation.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.computed.weights.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

weights allocation — rebalance=P6M, window=P6M, riskAverse=10000.0, shrinkage=0.5, algorithm=markowitz-corvalan
Asset order follows CSV columns; each panel is one rebalance observation.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.computed.weights.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

weights allocation — rebalance=P6M, window=P6M, riskAverse=10000.0, shrinkage=0.5, algorithm=lai2010
Asset order follows CSV columns; each panel is one rebalance observation.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.computed.weights.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

Asset order follows CSV columns; each panel is one rebalance observation.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.computed.weights.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

weights allocation — rebalance=P6M, window=P6M, riskAverse=10000.0, shrinkage=0.5, algorithm=partial-NMSAAM
Asset order follows CSV columns; each panel is one rebalance observation.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.computed.weights.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

weights allocation — rebalance=P6M, window=P6M, riskAverse=10000.0, shrinkage=0.5, algorithm=lai2010-corvalan
Asset order follows CSV columns; each panel is one rebalance observation.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.computed.weights.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

Observations are recorded events in file order, not a continuous market-price series; quantities are not signed exposure.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.executions.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

Observations are recorded events in file order, not a continuous market-price series; quantities are not signed exposure.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.executions.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

Observations are recorded events in file order, not a continuous market-price series; quantities are not signed exposure.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.executions.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

Observations are recorded events in file order, not a continuous market-price series; quantities are not signed exposure.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.executions.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

Observations are recorded events in file order, not a continuous market-price series; quantities are not signed exposure.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.executions.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

One axis per measure; raw units and report definitions retained. Empty Product selects aggregate account rows.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.measures.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

One axis per measure; raw units and report definitions retained. Empty Product selects aggregate account rows.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.measures.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

One axis per measure; raw units and report definitions retained. Empty Product selects aggregate account rows.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.measures.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

One axis per measure; raw units and report definitions retained. Empty Product selects aggregate account rows.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.measures.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

One axis per measure; raw units and report definitions retained. Empty Product selects aggregate account rows.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.measures.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

One axis per measure; raw units and report definitions retained. Empty Product selects aggregate account rows.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.measures.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

Source dates and raw P/L values are preserved; this is not reconstructed NAV or percentage return.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.profit.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

Source dates and raw P/L values are preserved; this is not reconstructed NAV or percentage return.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.profit.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

Observations are recorded events in file order, not a continuous market-price series; quantities are not signed exposure.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.trades.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

Observations are recorded events in file order, not a continuous market-price series; quantities are not signed exposure.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.trades.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

Observations are recorded events in file order, not a continuous market-price series; quantities are not signed exposure.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.trades.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

Observations are recorded events in file order, not a continuous market-price series; quantities are not signed exposure.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.trades.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

Observations are recorded events in file order, not a continuous market-price series; quantities are not signed exposure.
Derived from files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.trades.csv using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

Download PortfolioOptimComparisons2Demo.zip contains stdout, stderr, the execution record, checksums and any exported CSV/chart files.
| Export | Bytes |
|---|---|
files/charts/chart-01.png |
164924 |
files/charts/chart-02.png |
189560 |
files/log/20261018111712/Portfolio Optimization Algorithms (P6M,P6M,10000.00,0.50) monthly returns.png |
183497 |
files/log/20261018111712/Portfolio Optimization Algorithms (P6M,P6M,10000.00,0.50).png |
160218 |
files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.actual.weights.csv |
8943 |
files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.computed.weights.csv |
8942 |
files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.executions.csv |
30354 |
files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.measures.csv |
77182 |
files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.profit.csv |
73597 |
files/log/PortfolioOptimComparisons2Demo.2026.10.18,11.17.44.trades.csv |
29546 |
files/derived-charts/charts.json |
22985 |
files/derived-charts/derived-01.csv |
2600 |
files/derived-charts/derived-01.png |
102983 |
files/derived-charts/derived-02.csv |
2366 |
files/derived-charts/derived-02.png |
109923 |
files/derived-charts/derived-03.csv |
1832 |
files/derived-charts/derived-03.png |
106889 |
files/derived-charts/derived-04.csv |
995 |
files/derived-charts/derived-04.png |
75613 |
files/derived-charts/derived-05.csv |
1225 |
files/derived-charts/derived-05.png |
74653 |
files/derived-charts/derived-06.csv |
2191 |
files/derived-charts/derived-06.png |
108309 |
files/derived-charts/derived-07.csv |
1222 |
files/derived-charts/derived-07.png |
73325 |
files/derived-charts/derived-08.csv |
2641 |
files/derived-charts/derived-08.png |
108763 |
files/derived-charts/derived-09.csv |
2225 |
files/derived-charts/derived-09.png |
109845 |
files/derived-charts/derived-10.csv |
2191 |
files/derived-charts/derived-10.png |
108100 |
files/derived-charts/derived-11.csv |
2602 |
files/derived-charts/derived-11.png |
102983 |
files/derived-charts/derived-12.csv |
2360 |
files/derived-charts/derived-12.png |
109923 |
files/derived-charts/derived-13.csv |
1848 |
files/derived-charts/derived-13.png |
106889 |
files/derived-charts/derived-14.csv |
1855 |
files/derived-charts/derived-14.png |
113127 |
files/derived-charts/derived-15.csv |
2095 |
files/derived-charts/derived-15.png |
113994 |
files/derived-charts/derived-16.csv |
2193 |
files/derived-charts/derived-16.png |
108309 |
files/derived-charts/derived-17.csv |
2098 |
files/derived-charts/derived-17.png |
112765 |
files/derived-charts/derived-18.csv |
2636 |
files/derived-charts/derived-18.png |
108763 |
files/derived-charts/derived-19.csv |
2226 |
files/derived-charts/derived-19.png |
109845 |
files/derived-charts/derived-20.csv |
2190 |
files/derived-charts/derived-20.png |
108100 |
files/derived-charts/derived-21.csv |
9487 |
files/derived-charts/derived-21.png |
253890 |
files/derived-charts/derived-22.csv |
7671 |
files/derived-charts/derived-22.png |
249571 |
files/derived-charts/derived-23.csv |
6541 |
files/derived-charts/derived-23.png |
239920 |
files/derived-charts/derived-24.csv |
7727 |
files/derived-charts/derived-24.png |
240526 |
files/derived-charts/derived-25.csv |
2468 |
files/derived-charts/derived-25.png |
103491 |
files/derived-charts/derived-26.csv |
4602 |
files/derived-charts/derived-26.png |
126238 |
files/derived-charts/derived-27.csv |
5159 |
files/derived-charts/derived-27.png |
140526 |
files/derived-charts/derived-28.csv |
5115 |
files/derived-charts/derived-28.png |
139181 |
files/derived-charts/derived-29.csv |
5112 |
files/derived-charts/derived-29.png |
132935 |
files/derived-charts/derived-30.csv |
4847 |
files/derived-charts/derived-30.png |
132771 |
files/derived-charts/derived-31.csv |
2306 |
files/derived-charts/derived-31.png |
90691 |
files/derived-charts/derived-32.csv |
56587 |
files/derived-charts/derived-32.png |
217407 |
files/derived-charts/derived-33.csv |
34508 |
files/derived-charts/derived-33.png |
142723 |
files/derived-charts/derived-34.csv |
6691 |
files/derived-charts/derived-34.png |
223742 |
files/derived-charts/derived-35.csv |
5388 |
files/derived-charts/derived-35.png |
220853 |
files/derived-charts/derived-36.csv |
4570 |
files/derived-charts/derived-36.png |
227323 |
files/derived-charts/derived-37.csv |
5471 |
files/derived-charts/derived-37.png |
218265 |
files/derived-charts/derived-38.csv |
1798 |
files/derived-charts/derived-38.png |
101624 |
Read the reported units: optimizer weights, model-fit coefficients, forecast correlations and simulated P/L are different outputs. Synthetic runs demonstrate the API rather than historical market returns. Inspect undefined values and open positions instead of replacing them with zero. Chart exports visualize exactly this run.
For model assumptions, original publications and adaptation limits, use the literature guide.