Skip to content

Model KagiMRBasketSimulationDemo

github-actions[bot] edited this page Oct 18, 2026 · 8 revisions

KagiMRBasketSimulationDemo — quantitative model reference

Wiki home · Quantitative model references · Execution records

This quantitative model reference is provided for study, further research and application within the AlgoQuant framework. Read the research idea and implementation choices separately from the execution record.

Tutorials and quantitative model references · Pinned source · Javadoc

Paper introduction

Alexandre d’Aspremont, Identifying Small Mean Reverting Portfolios (2008 author preprint; published 2011) asks how to build a mean-reverting basket using only a few assets. A dense basket may look attractive statistically but be expensive and difficult to trade.

The paper uses a vector autoregressive representation and a Box–Tiao predictability ratio as a proxy for mean reversion. Minimizing this ratio seeks combinations whose current variation is less explained by lagged variation. A cardinality restriction limits the number of nonzero holdings. Greedy search and semidefinite relaxations address the resulting sparse optimization problem; regularized estimation can help stabilize its inputs.

Its central tradeoff is between sparsity and the strength of the mean-reversion proxy. Finding a basket does not specify a complete trading strategy or guarantee a profit. Kagi signals, entry and exit policies, sizing and the S&P 500 universe in these demos are separate choices. Sections 2–3 of the author preprint were reviewed.

How this demo connects to the idea

SimpleMRBasketProvider uses the configured price matrix, covariance penalty, clustering and basket-selection windows. The demo selects the first basket and passes it to KagiMRBasketSimulation for a trading interval. The Kagi simulation and S&P 500 settings are implementation choices; the example does not demonstrate every greedy/semidefinite method in the paper.

What this example teaches

Using this example. Creates mean-reverting baskets with SimpleMRBasketProvider and evaluates a basket through KagiMRBasketSimulation. MRSimParamSP500 supplies the data and interval conventions; the plotted P/L belongs to the selected basket and trading period.

Model and publication. The paper searches for sparse portfolios with low autoregressive predictability, using generalized eigenvalue formulations and sparse approximations. Basket selection and profitable execution are separate questions.

Implementation in this tutorial. SimpleMRBasketProvider uses the configured price matrix, covariance penalty, clustering and basket-selection windows. The demo selects the first basket and passes it to KagiMRBasketSimulation for a trading interval. The Kagi simulation and S&P 500 settings are implementation choices; the example does not demonstrate every greedy/semidefinite method in the paper.

Verified execution record

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 162.04
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.

Reproduce the calculation

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.daspremont2008.KagiMRBasketSimulationDemo

The 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.

Observed output

11:14:33.854 [main] INFO  t.n.a.m.m.d.strategy.SimpleMRBasketProvider - computing baskets at time 2013-01-01T00:00 (covPenalty=1.5E-4; inSamplePeriodForClustering=P10Y; inSamplePeriodForBasketSelection=P5Y; nBaskets=1; basketSize=5)
11:14:33.877 [main] INFO  tech.nmfin.algoquant.util.config.AQConfig - looking up configuration file: config.default.xml
11:14:33.878 [main] INFO  tech.nmfin.algoquant.util.config.AQConfig - looking up configuration file: config/config.default.xml
11:14:33.878 [main] INFO  tech.nmfin.algoquant.util.config.AQConfig - loading config file: file:/home/runner/work/algoquant/algoquant/target/model-results/KagiMRBasketSimulationDemo/work/config/config.default.xml


11:14:34.272 [main] INFO  tech.nmfin.algoquant.util.config.AQConfig - current directory: /home/runner/work/algoquant/algoquant/target/model-results/KagiMRBasketSimulationDemo/work
11:14:34.272 [main] INFO  tech.nmfin.algoquant.util.config.AQConfig - current config:
11:14:34.284 [main] INFO  tech.nmfin.algoquant.util.config.AQConfig - nm.license: /home/runner/work/algoquant/algoquant/license/nm.lic
11:14:34.284 [main] INFO  tech.nmfin.algoquant.util.config.AQConfig - logback.configurationFile: /home/runner/work/algoquant/algoquant/config/model-demo-logback.xml
11:14:34.284 [main] INFO  tech.nmfin.algoquant.util.config.AQConfig - DATA_FOLDER: ./test-data
11:14:34.284 [main] INFO  tech.nmfin.algoquant.util.config.AQConfig - DATA_GAINCAPITAL: ${DATA_FOLDER}/processed/gaincapital/extracted-from-raw-arrange-by-dates
11:14:34.284 [main] INFO  tech.nmfin.algoquant.util.config.AQConfig - DATA_BLOOMBERG: ${DATA_FOLDER}/processed/bloomberg
11:14:34.285 [main] INFO  tech.nmfin.algoquant.util.config.AQConfig - DATA_YAHOO: ${DATA_FOLDER}/yahoo
11:14:34.287 [main] INFO  tech.nmfin.algoquant.util.config.AQConfig - DATA_SGX: ${DATA_FOLDER}/raw/sgx
11:14:34.287 [main] INFO  tech.nmfin.algoquant.util.config.AQConfig - DATA_HOLIDAYS: ./log/holidays
11:14:34.287 [main] INFO  tech.nmfin.algoquant.util.config.AQConfig - DATA_COMPUSTAT_HK: ${DATA_FOLDER}/compustat/hk
11:14:34.287 [main] INFO  tech.nmfin.algoquant.util.config.AQConfig - PDF_OUTPUT_FOLDER: ./log/
11:14:34.287 [main] INFO  tech.nmfin.algoquant.util.config.AQConfig - PDF_PLOT_WIDTH: 800
11:14:34.287 [main] INFO  tech.nmfin.algoquant.util.config.AQConfig - PDF_PLOT_HEIGHT: 600
11:14:35.472 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory - failed to load from file, reason: no data read from file; load from web
11:14:35.472 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory - reading Yahoo! data for MMM from the Internet from 2003-01-01T00:00 to 2015-01-01T16:00
11:14:35.729 [main] INFO  t.n.a.d.h.yahoo.YahooEODCsvZipFileWriter - writing csv.zip file ./log/yahoo/pricematrix/MMM.csv.zip
11:14:35.784 [main] INFO  t.n.a.d.h.yahoo.YahooEODCsvZipFileWriter - finished writing ./log/yahoo/pricematrix/MMM.csv.zip
11:14:35.796 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory - failed to load from file, reason: no data read from file; load from web
11:14:35.797 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory - reading Yahoo! data for AOS from the Internet from 2003-01-01T00:00 to 2015-01-01T16:00
11:14:35.951 [main] INFO  t.n.a.d.h.yahoo.YahooEODCsvZipFileWriter - writing csv.zip file ./log/yahoo/pricematrix/AOS.csv.zip
11:14:35.983 [main] INFO  t.n.a.d.h.yahoo.YahooEODCsvZipFileWriter - finished writing ./log/yahoo/pricematrix/AOS.csv.zip
11:14:35.983 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory - failed to load from file, reason: no data read from file; load from web
11:14:35.983 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory - reading Yahoo! data for ABT from the Internet from 2003-01-01T00:00 to 2015-01-01T16:00
... excerpt shortened; complete stdout is in the release archive ...
11:16:07.407 [main] INFO  t.n.a.d.h.yahoo.YahooEODCsvZipFileWriter - finished writing ./log/yahoo/pricematrix/WTW.csv.zip
11:16:07.407 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory - failed to load from file, reason: no data read from file; load from web
11:16:07.407 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory - reading Yahoo! data for WDAY from the Internet from 2003-01-01T00:00 to 2015-01-01T16:00
11:16:07.514 [main] INFO  t.n.a.d.h.yahoo.YahooEODCsvZipFileWriter - writing csv.zip file ./log/yahoo/pricematrix/WDAY.csv.zip
11:16:07.517 [main] INFO  t.n.a.d.h.yahoo.YahooEODCsvZipFileWriter - finished writing ./log/yahoo/pricematrix/WDAY.csv.zip
11:16:07.518 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory - failed to load from file, reason: no data read from file; load from web
11:16:07.518 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory - reading Yahoo! data for WYNN from the Internet from 2003-01-01T00:00 to 2015-01-01T16:00
11:16:07.745 [main] INFO  t.n.a.d.h.yahoo.YahooEODCsvZipFileWriter - writing csv.zip file ./log/yahoo/pricematrix/WYNN.csv.zip
11:16:07.762 [main] INFO  t.n.a.d.h.yahoo.YahooEODCsvZipFileWriter - finished writing ./log/yahoo/pricematrix/WYNN.csv.zip
11:16:07.762 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory - failed to load from file, reason: no data read from file; load from web
11:16:07.762 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory - reading Yahoo! data for XEL from the Internet from 2003-01-01T00:00 to 2015-01-01T16:00
11:16:07.897 [main] INFO  t.n.a.d.h.yahoo.YahooEODCsvZipFileWriter - writing csv.zip file ./log/yahoo/pricematrix/XEL.csv.zip
11:16:07.912 [main] INFO  t.n.a.d.h.yahoo.YahooEODCsvZipFileWriter - finished writing ./log/yahoo/pricematrix/XEL.csv.zip
11:16:07.912 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory - failed to load from file, reason: no data read from file; load from web
11:16:07.912 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory - reading Yahoo! data for XYL from the Internet from 2003-01-01T00:00 to 2015-01-01T16:00
11:16:08.028 [main] INFO  t.n.a.d.h.yahoo.YahooEODCsvZipFileWriter - writing csv.zip file ./log/yahoo/pricematrix/XYL.csv.zip
11:16:08.032 [main] INFO  t.n.a.d.h.yahoo.YahooEODCsvZipFileWriter - finished writing ./log/yahoo/pricematrix/XYL.csv.zip
11:16:08.032 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory - failed to load from file, reason: no data read from file; load from web
11:16:08.032 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory - reading Yahoo! data for YUM from the Internet from 2003-01-01T00:00 to 2015-01-01T16:00
11:16:08.168 [main] INFO  t.n.a.d.h.yahoo.YahooEODCsvZipFileWriter - writing csv.zip file ./log/yahoo/pricematrix/YUM.csv.zip
11:16:08.190 [main] INFO  t.n.a.d.h.yahoo.YahooEODCsvZipFileWriter - finished writing ./log/yahoo/pricematrix/YUM.csv.zip
11:16:08.190 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory - failed to load from file, reason: no data read from file; load from web
11:16:08.190 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory - reading Yahoo! data for ZBRA from the Internet from 2003-01-01T00:00 to 2015-01-01T16:00
11:16:08.310 [main] INFO  t.n.a.d.h.yahoo.YahooEODCsvZipFileWriter - writing csv.zip file ./log/yahoo/pricematrix/ZBRA.csv.zip
11:16:08.325 [main] INFO  t.n.a.d.h.yahoo.YahooEODCsvZipFileWriter - finished writing ./log/yahoo/pricematrix/ZBRA.csv.zip
11:16:08.326 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory - failed to load from file, reason: no data read from file; load from web
11:16:08.326 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory - reading Yahoo! data for ZBH from the Internet from 2003-01-01T00:00 to 2015-01-01T16:00
11:16:08.432 [main] INFO  t.n.a.d.h.yahoo.YahooEODCsvZipFileWriter - writing csv.zip file ./log/yahoo/pricematrix/ZBH.csv.zip
11:16:08.454 [main] INFO  t.n.a.d.h.yahoo.YahooEODCsvZipFileWriter - finished writing ./log/yahoo/pricematrix/ZBH.csv.zip
11:16:08.454 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory - failed to load from file, reason: no data read from file; load from web
11:16:08.454 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory - reading Yahoo! data for ZTS from the Internet from 2003-01-01T00:00 to 2015-01-01T16:00
11:16:08.572 [main] INFO  t.n.a.d.h.yaho
... excerpt shortened ...
2.246 [main] INFO  t.n.a.m.m.daspremont2008.strategy.KagiMRStrategy - trading basket (inSampleInterval = [2008-01-01T00:00,2013-01-01T00:00)) (size = 5) (mu = -2.431347) (sample stdev = 0.676884) (theta = 0.091037) (sigma = 0.286152) (ou ratio = 0.318143) (predictability = 0.840409) (obj. func. value = 0.014706) (components = portfolio = { AES @ NEW_YORK=0.758522, BG @ NEW_YORK=-0.163497, XOM @ NEW_YORK=-0.159291, MGM @ NEW_YORK=-0.145123, VLO @ NEW_YORK=0.592857,  }): initialCapital=1000000.0, scale=43935.235104225016, H=2.095057894510777
11:17:02.329 [main] INFO  t.n.a.m.m.daspremont2008.strategy.KagiMRStrategy - trading basket (inSampleInterval = [2008-01-01T00:00,2013-01-01T00:00)) (size = 5) (mu = -2.431347) (sample stdev = 0.676884) (theta = 0.091037) (sigma = 0.286152) (ou ratio = 0.318143) (predictability = 0.840409) (obj. func. value = 0.014706) (components = portfolio = { AES @ NEW_YORK=0.758522, BG @ NEW_YORK=-0.163497, XOM @ NEW_YORK=-0.159291, MGM @ NEW_YORK=-0.145123, VLO @ NEW_YORK=0.592857,  }): initialCapital=1000000.0, scale=43935.235104225016, H=2.304563683961855
11:17:02.403 [main] INFO  t.n.a.m.m.daspremont2008.strategy.KagiMRStrategy - trading basket (inSampleInterval = [2008-01-01T00:00,2013-01-01T00:00)) (size = 5) (mu = -2.431347) (sample stdev = 0.676884) (theta = 0.091037) (sigma = 0.286152) (ou ratio = 0.318143) (predictability = 0.840409) (obj. func. value = 0.014706) (components = portfolio = { AES @ NEW_YORK=0.758522, BG @ NEW_YORK=-0.163497, XOM @ NEW_YORK=-0.159291, MGM @ NEW_YORK=-0.145123, VLO @ NEW_YORK=0.592857,  }): initialCapital=1000000.0, scale=43935.235104225016, H=2.5140694734129325
11:17:02.483 [main] INFO  t.n.a.m.m.daspremont2008.strategy.KagiMRStrategy - trading basket (inSampleInterval = [2008-01-01T00:00,2013-01-01T00:00)) (size = 5) (mu = -2.431347) (sample stdev = 0.676884) (theta = 0.091037) (sigma = 0.286152) (ou ratio = 0.318143) (predictability = 0.840409) (obj. func. value = 0.014706) (components = portfolio = { AES @ NEW_YORK=0.758522, BG @ NEW_YORK=-0.163497, XOM @ NEW_YORK=-0.159291, MGM @ NEW_YORK=-0.145123, VLO @ NEW_YORK=0.592857,  }): initialCapital=1000000.0, scale=43935.235104225016, H=2.7235752628640104
11:17:02.540 [main] INFO  t.n.a.m.m.daspremont2008.strategy.KagiMRStrategy - trading basket (inSampleInterval = [2008-01-01T00:00,2013-01-01T00:00)) (size = 5) (mu = -2.431347) (sample stdev = 0.676884) (theta = 0.091037) (sigma = 0.286152) (ou ratio = 0.318143) (predictability = 0.840409) (obj. func. value = 0.014706) (components = portfolio = { AES @ NEW_YORK=0.758522, BG @ NEW_YORK=-0.163497, XOM @ NEW_YORK=-0.159291, MGM @ NEW_YORK=-0.145123, VLO @ NEW_YORK=0.592857,  }): initialCapital=1000000.0, scale=43935.235104225016, H=2.933081052315088
11:17:02.595 [main] INFO  t.n.a.m.m.daspremont2008.strategy.KagiMRStrategy - trading basket (inSampleInterval = [2008-01-01T00:00,2013-01-01T00:00)) (size = 5) (mu = -2.431347) (sample stdev = 0.676884) (theta = 0.091037) (sigma = 0.286152) (ou ratio = 0.318143) (predictability = 0.840409) (obj. func. value = 0.014706) (components = portfolio = { AES @ NEW_YORK=0.758522, BG @ NEW_YORK=-0.163497, XOM @ NEW_YORK=-0.159291, MGM @ NEW_YORK=-0.145123, VLO @ NEW_YORK=0.592857,  }): initialCapital=1000000.0, scale=43935.235104225016, H=3.1425868417661658
11:17:02.649 [main] INFO  t.n.a.m.m.daspremont2008.strategy.KagiMRStrategy - trading basket (inSampleInterval = [2008-01-01T00:00,2013-01-01T00:00)) (size = 5) (mu = -2.431347) (sample stdev = 0.676884) (theta = 0.091037) (sigma = 0.286152) (ou ratio = 0.318143) (predictability = 0.840409) (obj. func. value = 0.014706) (components = portfolio = { AES @ NEW_YORK=0.758522, BG @ NEW_YORK=-0.163497, XOM @ NEW_YORK=-0.159291, MGM @ NEW_YORK=-0.145123, VLO @ NEW_YORK=0.592857,  }): initialCapital=1000000.0, scale=43935.235104225016, H=3.3520926312172437
11:17:02.699 [main] INFO  t.n.a.m.m.daspremont2008.strategy.KagiMRStrategy - trading basket (inSampleInterval = [2008-01-01T00:00,2013-01-01T00:00)) (size = 5) (mu = -2.431347) (sample stdev = 0.676884) (theta = 0.091037) (sigma = 0.286152) (ou ratio = 0.318143) (predictability = 0.840409) (obj. func. value = 0.014706) (components = portfolio = { AES @ NEW_YORK=0.758522, BG @ NEW_YORK=-0.163497, XOM @ NEW_YORK=-0.159291, MGM @ NEW_YORK=-0.145123, VLO @ NEW_YORK=0.592857,  }): initialCapital=1000000.0, scale=43935.235104225016, H=3.5615984206683207
11:17:02.747 [main] INFO  t.n.a.m.m.daspremont2008.strategy.KagiMRStrategy - trading basket (inSampleInterval = [2008-01-01T00:00,2013-01-01T00:00)) (size = 5) (mu = -2.431347) (sample stdev = 0.676884) (theta = 0.091037) (sigma = 0.286152) (ou ratio = 0.318143) (predictability = 0.840409) (obj. func. value = 0.014706) (components = portfolio = { AES @ NEW_YORK=0.758522, BG @ NEW_YORK=-0.163497, XOM @ NEW_YORK=-0.159291, MGM @ NEW_YORK=-0.145123, VLO @ NEW_YORK=0.592857,  }): initialCapital=1000000.0, scale=43935.235104225016, H=3.771104210119399
11:17:02.796 [main] INFO  t.n.a.m.m.daspremont2008.strategy.KagiMRStrategy - trading basket (inSampleInterval = [2008-01-01T00:00,2013-01-01T00:00)) (size = 5) (mu = -2.431347) (sample stdev = 0.676884) (theta = 0.091037) (sigma = 0.286152) (ou ratio = 0.318143) (predictability = 0.840409) (obj. func. value = 0.014706) (components = portfolio = { AES @ NEW_YORK=0.758522, BG @ NEW_YORK=-0.163497, XOM @ NEW_YORK=-0.159291, MGM @ NEW_YORK=-0.145123, VLO @ NEW_YORK=0.592857,  }): initialCapital=1000000.0, scale=43935.235104225016, H=3.980609999570477
11:17:02.845 [main] INFO  t.n.a.m.m.daspremont2008.strategy.KagiMRStrategy - trading basket (inSampleInterval = [2008-01-01T00:00,2013-01-01T00:00)) (size = 5) (mu = -2.431347) (sample stdev = 0.676884) (theta = 0.091037) (sigma = 0.286152) (ou ratio = 0.318143) (predictability = 0.840409) (obj. func. value = 0.014706) (components = portfolio = { AES @ NEW_YORK=0.758522, BG @ NEW_YORK=-0.163497, XOM @ NEW_YORK=-0.159291, MGM @ NEW_YORK=-0.145123, VLO @ NEW_YORK=0.592857,  }): initialCapital=1000000.0, scale=43935.235104225016, H=4.190115789021554
11:17:02.865 [main] INFO  t.n.a.m.m.d.strategy.MRModelKagiFactory - sorted simulated kagi results: [H=2.514069->performance=0.105783, H=2.304564->performance=0.102711, H=2.095058->performance=0.094449, H=1.885552->performance=0.078597, H=0.838023->performance=0.074872, H=1.676046->performance=0.062855, H=2.933081->performance=0.060499, H=1.466541->performance=0.056198, H=2.723575->performance=0.055807, H=1.257035->performance=0.053412, H=1.047529->performance=0.052526, H=3.352093->performance=0.040372, H=3.142587->performance=0.039404, H=0.628517->performance=0.037559, H=3.980610->performance=0.021106, H=3.771104->performance=0.019092, H=3.561598->performance=0.017422, H=4.190116->performance=0.015421, H=0.419012->performance=-0.011607, H=0.209506->performance=-0.080328]
11:17:02.865 [main] INFO  t.n.a.m.m.daspremont2008.strategy.KagiMRStrategy - trading basket (inSampleInterval = [2008-01-01T00:00,2013-01-01T00:00)) (size = 5) (mu = -2.431347) (sample stdev = 0.676884) (theta = 0.091037) (sigma = 0.286152) (ou ratio = 0.318143) (predictability = 0.840409) (obj. func. value = 0.014706) (components = portfolio = { AES @ NEW_YORK=0.758522, BG @ NEW_YORK=-0.163497, XOM @ NEW_YORK=-0.159291, MGM @ NEW_YORK=-0.145123, VLO @ NEW_YORK=0.592857,  }): initialCapital=1000000.0, scale=43935.235104225016, H=2.5140694734129325
11:17:02.868 [main] INFO  t.n.a.d.m.d.KagiMRBasketSimulationDemo - pnl series = [-3105.847186079025, -15313.89449309349, -7473.091302862167, -23734.83353518486, -21290.749947538374, -25364.156049718855, -17284.61836241722, -23253.480422964094, -18143.809679021833, -16371.33331202507, -4954.70236205101, -8497.724979391098, -9030.3772859478, -6219.122140874862, 6156.0126276111605, -2753.4507808589933, -1718.2723426723478, 2741.87837887764, 65910.65986439705, 54935.73628136635, 59930.94042107582, 41516.48876473427, 36453.31038090706, 29432.882120103837, 29411.84644505501, -10402.578248052596, -7168.0971632289875, -19049.297417669295, -11662.634103803633, -19765.57584097862, -29653.023266820906, -28209.149517087935, -36262.771163015364, -1304.9713926601398, -9452.748859434127, -18436.779898672103, 4049.2353744220745, -3503.3362970638264, -21619.258523015975, -14055.906971006392, -41546.24571803093, -72836.70062735557, -64565.51416781425, -54705.634137182235, -41181.49963191032, -24199.72997191429, -2860.6715002346027, -29436.90797141075, 2271.359191865922, 7280.502224893571, 2315.1434030246746, -6023.4439182567585, -7552.534333257674, -18376.303694753646, -13821.40069582939, -10403.365885763167, -11367.504345922469, -18807.71754649162, -19088.57141783714, -27600.863753347396, -19576.276995687484, 10547.298062295915, 24095.369445772172, 9588.700653047563, -6535.798933057784, -10990.216747312545, -22837.473943738936, -33181.9415588665, -9256.711378126143, 619.8985595417034, 13152.51079937935, -3094.746027021407, 20516.569011659623, 17861.81794354439, 13992.476070375444, 5939.238590211869, 1121.2469939899456, -20924.27286341667, 6126.4868392658245, 5969.830709428788, -2300.123323469161, 13958.13026043892, 23400.88565823555, 4875.172481508256, 4982.27288052559, -3836.308252363204, -15668.948104887008, 6954.859916658403, 22386.95916554451, 11479.868356676103, 24511.401332826616, 15951.792709321977, 3951.757665605546, 4668.475410432817, -16013.701633481978, -30610.697048215865, -15362.294988660811, -6907.656589536666, -9181.34091761589, -4207.011853246688, -4447.797784833907, 1309.3569173526776, 1034.8373975467694, -12191.096815137862, -2373.8730392742145, 13056.558122606279, 11468.745696992875, 322.36397358894465, 637.3236598682415, 18310.16452214241, 20953.820942850114, 31090.711007089616, 29308.037301988603, 31603.416104288102, 34068.554101419446, 28224.62140507698, 18707.245089006425, 241.2542976856239, -3677.4432073116295, -18108.871685552596, 221.66988034248425, 819.8388647556312, -10695.308835554122, -15362.927164602279, -32368.98707537651]

Charts from this run

Chart 1

Fitted distribution parameters

Parameter axes are separate. Record order is preserved; estimated parameters are not investment performance.

Derived from stdout.log using the precision available in that file. Download plotted data. Undefined or malformed cells are omitted, never replaced by zero.

Chart 2

Downloadable evidence

Download KagiMRBasketSimulationDemo.zip contains stdout, stderr, the execution record, checksums and any exported CSV/chart files.

Export Bytes
files/charts/chart-01.png 99213
files/derived-charts/charts.json 508
files/derived-charts/derived-01.csv 458
files/derived-charts/derived-01.png 52341

Interpreting the result

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.

Clone this wiki locally