Skip to content

Model PerformanceOptimizedYahooEODPortfolioDemo

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

PerformanceOptimizedYahooEODPortfolioDemo — execution tutorial

All model results · Pinned source · Javadoc

What this example teaches

Using this example. Weights several performance objectives in a PerformanceOptimizedYahooEODPortfolio template and runs the resulting strategy on Yahoo data. The coefficients normalize objectives with different units; their values are not portfolio allocation weights. Optimization and evaluation on shared history can overstate expected performance.

Model and publication. Related theory and the scope of this example are distinguished below.

Implementation in this tutorial. This is an application-level search over weighted performance objectives, not a named single- publication model. The template combines information ratio, profit and drawdown with normalization coefficients. Those objective coefficients are not asset allocation weights, and optimizing a backtest statistic can overfit its sample.

Verified execution record

Item Value
Status completed
Run 39114006111
UTC publication 2026-10-18 09:11 UTC
Source commit 0097e73c040bdaaddac570e2fe694d9836b676ee
Data mode original main defaults
Exit code 0
Elapsed seconds 6.57
Time limit seconds 180
Maximum Java heap 1200m

The original main returned successfully. Read the output and model 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.portfoliooptimization.PerformanceOptimizedYahooEODPortfolioDemo

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

09:07:52,644 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
09:07:52,644 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
09:07:52,645 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/home/runner/work/algoquant-examples/algoquant-examples/target/lib/algoquant-dist-3.3.0-SNAPSHOT.jar!/logback.xml]
09:07:52,670 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@33a10788 - URL [jar:file:/home/runner/work/algoquant-examples/algoquant-examples/target/lib/algoquant-dist-3.3.0-SNAPSHOT.jar!/logback.xml] is not of type file
09:07:52,711 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
09:07:52,712 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
09:07:52,720 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
09:07:52,727 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:07:52,769 |-INFO in ch.qos.logback.core.joran.action.TimestampAction - Using current interpretation time, i.e. now, as time reference.
09:07:52,770 |-INFO in ch.qos.logback.core.joran.action.TimestampAction - Adding property to the context with key="bySecond" and value="2026.10.18,09.07.52" to the LOCAL scope
09:07:52,771 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
09:07:52,774 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE1]
09:07:52,780 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@7006c658 - Will use zip compression
09:07:52,781 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@7006c658 - Large window sizes are not allowed.
09:07:52,781 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@7006c658 - MaxIndex reduced to 21
09:07:52,784 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:07:52,785 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE1] - Active log file name: log/algoquant.2026.10.18,09.07.52.log
09:07:52,785 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE1] - File property is set to [log/algoquant.2026.10.18,09.07.52.log]
09:07:52,785 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG
09:07:52,785 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
09:07:52,786 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE1] to Logger[ROOT]
09:07:52,786 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
09:07:52,787 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@34033bd0 - Registering current configuration as safe fallback point

09:07:52.879 [main] INFO  t.n.algoquant.util.config.AQConfig,194 - looking up configuration file: config.default.xml
09:07:52.882 [main] INFO  t.n.algoquant.util.config.AQConfig,194 - looking up configuration file: config/config.default.xml
09:07:52.883 [main] INFO  t.n.algoquant.util.config.AQConfig,209 - loading config file: file:/home/runner/work/algoquant-examples/algoquant-examples/target/model-results/PerformanceOptimizedYahooEODPortfolioDemo/work/config/config.default.xml
09:07:53.024 [main] INFO  t.n.algoquant.util.config.AQConfig,148 - 09:07:52,644 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
09:07:52,644 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
09:07:52,645 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/home/runner/work/algoquant-examples/algoquant-examples/target/lib/algoquant-dist-3.3.0-SNAPSHOT.jar!/logback.xml]
09:07:52,670 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@33a10788 - URL [jar:file:/home/runner/work/algoquant-examples/algoquant-examples/target/lib/algoquant-dist-3.3.0-SNAPSHOT.jar!/logback.xml] is not of type file
09:07:52,711 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
09:07:52,712 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
09:07:52,720 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
09:07:52,727 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:07:52,769 |-INFO in ch.qos.logback.core.joran.action.TimestampAction - Using current interpretation time, i.e. now, as time reference.
09:07:52,770 |-INFO in ch.qos.logback.core.joran.action.TimestampAction - Adding property to the context with key="bySecond" and value="2026.10.18,09.07.52" to the LOCAL scope
09:07:52,771 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
09:07:52,774 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE1]
09:07:52,780 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@7006c658 - Will use zip compression
09:07:52,781 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@7006c658 - Large window sizes are not allowed.
09:07:52,781 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@7006c658 - MaxIndex reduced to 21
09:07:52,784 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:07:52,785 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE1] - Active log file name: log/algoquant.2026.10.18,09.07.52.log
09:07:52,785 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE1] - File property is set to [log/algoquant.2026.10.18,09.07.52.log]
09:07:52,785 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG
09:07:52,785 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
09:07:52,786 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE1] to Logger[ROOT]
09:07:52,786 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
09:07:52,787 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@34033bd0 - Registering current configuration as safe fallback point


09:07:53.024 [main] INFO  t.n.algoquant.util.config.AQConfig,95 - current directory: /home/runner/work/algoquant-examples/algoquant-examples/target/model-results/PerformanceOptimizedYahooEODPortfolioDemo/work
09:07:53.024 [main] INFO  t.n.algoquant.util.config.AQConfig,169 - current config:
09:07:53.034 [main] INFO  t.n.algoquant.util.config.AQConfig,11 - nm.license: /home/runner/work/algoquant-examples/algoquant-examples/license/nm.lic
09:07:53.037 [main] INFO  t.n.algoquant.util.config.AQConfig,11 - DATA_FOLDER: ./test-data
09:07:53.037 [main] INFO  t.n.algoquant.util.config.AQConfig,11 - DATA_GAINCAPITAL: ${DATA_FOLDER}/processed/gaincapital/extracted-from-raw-arrange-by-dates
09:07:53.037 [main] INFO  t.n.algoquant.util.config.AQConfig,11 - DATA_BLOOMBERG: ${DATA_FOLDER}/processed/bloomberg
09:07:53.037 [main] INFO  t.n.algoquant.util.config.AQConfig,11 - DATA_YAHOO: ${DATA_FOLDER}/yahoo
09:07:53.038 [main] INFO  t.n.algoquant.util.config.AQConfig,11 - DATA_SGX: ${DATA_FOLDER}/raw/sgx
09:07:53.038 [main] INFO  t.n.algoquant.util.config.AQConfig,11 - DATA_HOLIDAYS: ./log/holidays
09:07:53.038 [main] INFO  t.n.algoquant.util.config.AQConfig,11 - DATA_COMPUSTAT_HK: ${DATA_FOLDER}/[database configuration redacted]/hk
09:07:53.038 [main] INFO  t.n.algoquant.util.config.AQConfig,11 - PDF_OUTPUT_FOLDER: ./log/
09:07:53.039 [main] INFO  t.n.algoquant.util.config.AQConfig,11 - PDF_PLOT_WIDTH: 800
09:07:53.039 [main] INFO  t.n.algoquant.util.config.AQConfig,11 - PDF_PLOT_HEIGHT: 600
09:07:53.657 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory,237 - failed to load from file, reason: no data read from file; load from web
09:07:53.657 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory,196 - reading Yahoo! data for 0019.HK from the Internet from 2008-01-01T00:00 to 2015-01-01T16:00
09:07:53.798 [main] INFO  t.n.a.d.h.y.YahooEODCsvZipFileWriter,30 - writing csv.zip file ./log/Yahoo/0019.HK.csv.zip
09:07:53.831 [main] INFO  t.n.a.d.h.y.YahooEODCsvZipFileWriter,81 - finished writing ./log/Yahoo/0019.HK.csv.zip
09:07:53.835 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory,237 - failed to load from file, reason: no data read from file; load from web
09:07:53.835 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory,196 - reading Yahoo! data for 0483.HK from the Internet from 2008-01-01T00:00 to 2015-01-01T16:00
09:07:53.994 [main] INFO  t.n.a.d.h.y.YahooEODCsvZipFileWriter,30 - writing csv.zip file ./log/Yahoo/0483.HK.csv.zip
09:07:54.022 [main] INFO  t.n.a.d.h.y.YahooEODCsvZipFileWriter,81 - finished writing ./log/Yahoo/0483.HK.csv.zip
09:07:54.023 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory,237 - failed to load from file, reason: no data read from file; load from web
09:07:54.023 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory,196 - reading Yahoo! data for 0321.HK from the Internet from 2008-01-01T00:00 to 2015-01-01T16:00
09:07:54.130 [main] INFO  t.n.a.d.h.y.YahooEODCsvZipFileWriter,30 - writing csv.zip file ./log/Yahoo/0321.HK.csv.zip
09:07:54.155 [main] INFO  t.n.a.d.h.y.YahooEODCsvZipFileWriter,81 - finished writing ./log/Yahoo/0321.HK.csv.zip
09:07:54.156 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory,237 - failed to load from file, reason: no data read from file; load from web
09:07:54.156 [main] INFO  t.n.a.d.h.yahoo.YahooEODCacheFactory,196 - reading Yahoo! data for 0005.HK from the Internet from 2008-01-01T00:00 to 2015-01-01T16:00
09:07:54.287 [main] INFO  t.n.a.d.h.y.YahooEODCsvZipFileWriter,30 - writing csv.zip file ./log/Yahoo/0005.HK.csv.zip
09:07:54.304 [main] INFO  t.n.a.d.h.y.YahooEODCsvZipFileWriter,81 - finished writing ./log/Yahoo/0005.HK.csv.zip
09:07:58.576 [main] INFO  t.n.a.d.m.p.PerformanceOptimizedYahooEODPortfolioDemo,130 - weights = {0019.HK @ HKEX=0.0, 0483.HK @ HKEX=0.9999999999999999, 0321.HK @ HKEX=0.0, 0005.HK @ HKEX=0.0}
09:07:58.742 [main] INFO  t.n.a.d.m.p.PerformanceOptimizedYahooEODPortfolioDemo,135 - f(x) = 1.7734614084762281
09:07:58.830 [main] INFO  t.n.a.d.m.p.PerformanceOptimizedYahooEODPortfolioDemo,153 - Performance Report:
Product	Max Drawdown	Information Ratio For Periods	Profit Loss
0005.HK	0.0	NaN	0.0
0019.HK	0.0	NaN	0.0
0321.HK	0.0	NaN	0.0
0483.HK	194.42152266774792	0.21516926650865864	139.2896534234751
Total	194.42152266774792	0.18291739675499855	139.2896534234751

Downloadable evidence

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

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