Repository navigation
Model FundamentalModelStrategyDemo
All model results · Pinned source · Javadoc
A demo on running a fundamental factor model trading strategy.
Using this example. Builds a fundamental-factor portfolio using configured accounting, return and benchmark datasets. Relative and configured paths must resolve to compatible Compustat data; these inputs are distinct from public price downloads. Rebalance frequency and trailing estimation windows control when the model can trade.
Model and publication. Factor models separate asset characteristics/exposures from returns attributable to common drivers. Fama–French is related factor literature, not the source of every characteristic or estimation choice used here.
Implementation in this tutorial. The active FundamentalFactorModel uses FactorSize and FactorGrowth with SIMPLE returns. This differs from EconomicModelStrategyDemo’s market/SMB/HML factor-return specification. FactorStrategyParam supplies rebalance, risk and data-window settings, while the configured accounting dataset supplies characteristics; avoid treating a publication date or revised statement as information available earlier.
| Item | Value |
|---|---|
| Status | resource-limit |
| Run | 39114006111 |
| UTC publication | 2026-10-18 09:11 UTC |
| Source commit | 0097e73c040bdaaddac570e2fe694d9836b676ee |
| Data mode | original main defaults |
| Exit code | 1 |
| Elapsed seconds | 57.56 |
| Time limit seconds | 180 |
| Maximum Java heap | 1200m |
The original calculation exceeded the per-demo memory allocation.
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.factormodel.FundamentalModelStrategyDemoThe 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.
This is an incomplete or blocked run. Output below is diagnostic or partial, not a verified strategy result.
09:06:56,754 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
09:06:56,754 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
09:06:56,754 |-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:06:56,798 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@2eee9593 - 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:06:57,159 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
09:06:57,160 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
09:06:57,173 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
09:06:57,184 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:06:57,239 |-INFO in ch.qos.logback.core.joran.action.TimestampAction - Using current interpretation time, i.e. now, as time reference.
09:06:57,240 |-INFO in ch.qos.logback.core.joran.action.TimestampAction - Adding property to the context with key="bySecond" and value="2026.10.18,09.06.57" to the LOCAL scope
09:06:57,241 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
09:06:57,245 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE1]
09:06:57,254 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@7907ec20 - Will use zip compression
09:06:57,254 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@7907ec20 - Large window sizes are not allowed.
09:06:57,254 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@7907ec20 - MaxIndex reduced to 21
09:06:57,258 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:06:57,260 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE1] - Active log file name: log/algoquant.2026.10.18,09.06.57.log
09:06:57,260 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE1] - File property is set to [log/algoquant.2026.10.18,09.06.57.log]
09:06:57,261 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG
09:06:57,261 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
09:06:57,262 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE1] to Logger[ROOT]
09:06:57,262 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
09:06:57,263 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@546a03af - Registering current configuration as safe fallback point
09:06:57.276 [main] INFO t.n.algoquant.util.config.AQConfig,194 - looking up configuration file: config.default.xml
09:06:57.280 [main] INFO t.n.algoquant.util.config.AQConfig,194 - looking up configuration file: config/config.default.xml
09:06:57.281 [main] INFO t.n.algoquant.util.config.AQConfig,209 - loading config file: file:/home/runner/work/algoquant-examples/algoquant-examples/target/model-results/FundamentalModelStrategyDemo/work/config/config.default.xml
09:06:57.632 [main] INFO t.n.algoquant.util.config.AQConfig,148 - 09:06:56,754 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
09:06:56,754 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
09:06:56,754 |-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:06:56,798 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@2eee9593 - 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:06:57,159 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
09:06:57,160 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
09:06:57,173 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
09:06:57,184 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:06:57,239 |-INFO in ch.qos.logback.core.joran.action.TimestampAction - Using current interpretation time, i.e. now, as time reference.
09:06:57,240 |-INFO in ch.qos.logback.core.joran.action.TimestampAction - Adding property to the context with key="bySecond" and value="2026.10.18,09.06.57" to the LOCAL scope
09:06:57,241 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
09:06:57,245 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE1]
09:06:57,254 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@7907ec20 - Will use zip compression
09:06:57,254 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@7907ec20 - Large window sizes are not allowed.
09:06:57,254 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@7907ec20 - MaxIndex reduced to 21
09:06:57,258 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:06:57,260 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE1] - Active log file name: log/algoquant.2026.10.18,09.06.57.log
09:06:57,260 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE1] - File property is set to [log/algoquant.2026.10.18,09.06.57.log]
09:06:57,261 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG
09:06:57,261 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
09:06:57,262 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE1] to Logger[ROOT]
09:06:57,262 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
09:06:57,263 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@546a03af - Registering current configuration as safe fallback point
09:06:57.632 [main] INFO t.n.algoquant.util.config.AQConfig,95 - current directory: /home/runner/work/algoquant-examples/algoquant-examples/target/model-results/FundamentalModelStrategyDemo/work
09:06:57.632 [main] INFO t.n.algoquant.util.config.AQConfig,169 - current config:
09:06:57.644 [main] INFO t.n.algoquant.util.config.AQConfig,11 - nm.license: /home/runner/work/algoquant-examples/algoquant-examples/license/nm.lic
09:06:57.644 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_FOLDER: ./test-data
09:06:57.645 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_GAINCAPITAL: ${DATA_FOLDER}/processed/gaincapital/extracted-from-raw-arrange-by-dates
09:06:57.645 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_BLOOMBERG: ${DATA_FOLDER}/processed/bloomberg
09:06:57.645 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_YAHOO: ${DATA_FOLDER}/yahoo
09:06:57.646 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_SGX: ${DATA_FOLDER}/raw/sgx
09:06:57.646 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_HOLIDAYS: ./log/holidays
09:06:57.646 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_COMPUSTAT_HK: ${DATA_FOLDER}/[database configuration redacted]/hk
09:06:57.646 [main] INFO t.n.algoquant.util.config.AQConfig,11 - PDF_OUTPUT_FOLDER: ./log/
09:06:57.647 [main] INFO t.n.algoquant.util.config.AQConfig,11 - PDF_PLOT_WIDTH: 800
09:06:57.647 [main] INFO t.n.algoquant.util.config.AQConfig,11 - PDF_PLOT_HEIGHT: 600
09:06:57.737 [main] INFO t.n.a.d.h.c.z.CompustatZipCompanyData,232 - reading the company file: /home/runner/work/algoquant-examples/algoquant-examples/target/model-results/FundamentalModelStrategyDemo/work/./test-data/[database configuration redacted]/hk/company.csv.zip
09:06:57.968 [main] INFO t.n.a.d.h.c.z.CompustatZipAccountingData,196 - reading the company accounting file: /home/runner/work/algoquant-examples/algoquant-examples/target/model-results/FundamentalModelStrategyDemo/work/./test-data/[database configuration redacted]/hk/monthlyAccounting.1995.2010.csv.zip
09:07:00.176 [main] INFO t.n.a.d.h.c.z.CompustatZipTradingData,173 - reading the daily return file: /home/runner/work/algoquant-examples/algoquant-examples/target/model-results/FundamentalModelStrategyDemo/work/./test-data/[database configuration redacted]/hk/dailyReturn.1995.2011.csv.zip
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.Arrays.copyOfRange(Arrays.java:3664)
at java.lang.String.<init>(String.java:207)
at java.lang.StringBuilder.toString(StringBuilder.java:412)
at org.supercsv.io.Tokenizer.readColumns(Tokenizer.java:129)
at org.supercsv.io.AbstractCsvReader.readRow(AbstractCsvReader.java:179)
at org.supercsv.io.CsvMapReader.read(CsvMapReader.java:97)
at dev.nm.nmutils.csvzip.CsvZipFileReader.next(iub:54)
at tech.nmfin.algoquant.data.historicaldata.[database configuration redacted].zip.CompustatZipTradingData.load(wo:103)
at tech.nmfin.algoquant.data.historicaldata.[database configuration redacted].zip.CompustatZipTradingData.load(wo:169)
at tech.nmfin.algoquant.data.historicaldata.[database configuration redacted].zip.CompustatZipCompanyDB.<init>(imb:95)
at tech.nmfin.algoquant.data.historicaldata.[database configuration redacted].zip.CompustatZipCompanyDB.<init>(imb:26)
at tech.nmfin.algoquant.execution.datatype.product.stock.market.db.MarketDB_HK_Compustat.<init>(xz:152)
at tech.nmfin.algoquant.demo.model.factormodel.FundamentalModelStrategyDemo.<clinit>(FundamentalModelStrategyDemo.java:104)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at ModelDemoRunner.main(ModelDemoRunner.java:35)
Download FundamentalModelStrategyDemo.zip contains stdout, stderr, the execution record, checksums and any exported CSV/chart files.
Use the first relevant exception and the source configuration to resolve the prerequisite or code issue, then rerun. A missing dataset requires the correct original schema and period; substituting synthetic values would be a different experiment. A timeout establishes only that this bounded attempt did not finish.
For model assumptions, original publications and adaptation limits, use the literature guide.