Repository navigation
Model FundamentalModelStrategyDemo
All quantitative model results · Pinned source · Javadoc
Eugene F. Fama and Kenneth R. French, Common risk factors in the returns on stocks and bonds (1993) investigates whether a small set of common risk factors explains shared variation in stock and bond returns. The familiar equity factors are market excess return, size (SMB) and book-to-market value (HML); the paper also considers bond-market factors.
A factor model separates exposure to common factors from the residual specific to each asset. For portfolio construction, this can explain why apparently different assets still carry similar risks. Estimated factor loadings are not automatically return forecasts or profitable trade signals.
This is related context, not a claim that the demo recreates Fama–French portfolios or replicates the 1993 empirical study. The economic and fundamental demos choose their own inputs and estimators. The original publication abstract and Kenneth French's factor definitions were checked; the full article was not independently reviewed.
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.
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 | timeout |
| Run | 39114360151 |
| UTC publication | 2026-10-18 09:54 UTC |
| Source commit | 355aa9242fc2a247b256aecc8406cbb409aa5ff3 |
| Data mode | original main defaults |
| Exit code | -15 |
| Elapsed seconds | 180.02 |
| Time limit seconds | 180 |
| Maximum Java heap | 1200m |
The original main exceeded the configured execution limit; partial outputs are not a completed result.
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:12:32.148 [main] INFO t.n.algoquant.util.config.AQConfig,194 - looking up configuration file: config.default.xml
09:12:32.151 [main] INFO t.n.algoquant.util.config.AQConfig,194 - looking up configuration file: config/config.default.xml
09:12:32.152 [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:12:32.709 [main] INFO t.n.algoquant.util.config.AQConfig,95 - current directory: /home/runner/work/algoquant-examples/algoquant-examples/target/model-results/FundamentalModelStrategyDemo/work
09:12:32.709 [main] INFO t.n.algoquant.util.config.AQConfig,169 - current config:
09:12:32.723 [main] INFO t.n.algoquant.util.config.AQConfig,11 - nm.license: /home/runner/work/algoquant-examples/algoquant-examples/license/nm.lic
09:12:32.724 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_FOLDER: ./test-data
09:12:32.724 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_GAINCAPITAL: ${DATA_FOLDER}/processed/gaincapital/extracted-from-raw-arrange-by-dates
09:12:32.724 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_BLOOMBERG: ${DATA_FOLDER}/processed/bloomberg
09:12:32.725 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_YAHOO: ${DATA_FOLDER}/yahoo
09:12:32.725 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_SGX: ${DATA_FOLDER}/raw/sgx
09:12:32.725 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_HOLIDAYS: ./log/holidays
09:12:32.725 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_COMPUSTAT_HK: ${DATA_FOLDER}/[database configuration redacted]/hk
09:12:32.725 [main] INFO t.n.algoquant.util.config.AQConfig,11 - PDF_OUTPUT_FOLDER: ./log/
09:12:32.726 [main] INFO t.n.algoquant.util.config.AQConfig,11 - PDF_PLOT_WIDTH: 800
09:12:32.726 [main] INFO t.n.algoquant.util.config.AQConfig,11 - PDF_PLOT_HEIGHT: 600
09:12:32.800 [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:12:33.023 [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:12:35.136 [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
09:12:32.724 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_GAINCAPITAL: ${DATA_FOLDER}/processed/gaincapital/extracted-from-raw-arrange-by-dates
09:12:32.724 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_BLOOMBERG: ${DATA_FOLDER}/processed/bloomberg
09:12:32.725 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_YAHOO: ${DATA_FOLDER}/yahoo
09:12:32.725 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_SGX: ${DATA_FOLDER}/raw/sgx
09:12:32.725 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_HOLIDAYS: ./log/holidays
09:12:32.725 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_COMPUSTAT_HK: ${DATA_FOLDER}/[database configuration redacted]/hk
09:12:32.725 [main] INFO t.n.algoquant.util.config.AQConfig,11 - PDF_OUTPUT_FOLDER: ./log/
09:12:32.726 [main] INFO t.n.algoquant.util.config.AQConfig,11 - PDF_PLOT_WIDTH: 800
09:12:32.726 [main] INFO t.n.algoquant.util.config.AQConfig,11 - PDF_PLOT_HEIGHT: 600
09:12:32.800 [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:12:33.023 [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:12:35.136 [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
Download FundamentalModelStrategyDemo.zip contains stdout, stderr, the execution record, checksums and any exported CSV/chart files.
| Export | Bytes |
|---|---|
files/derived-charts/charts.json |
3 |
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.