Repository navigation
Model SMA2DynamicDemo
All model results · Pinned source · Javadoc
Runs a dynamically calibrated SMA crossover over rebalance/data-window combinations.
Each combination has an independent simulator and performance measures.
The strategy periodically recalibrates using a trailing data window.
--quick reduces both the date range and parameter grid for a smoke run.
Defaults to synthetic data; --live enables Yahoo downloads.
Performance, execution and trade CSV files are written by SimulationResultsExporter.
Using this example. Separates trailing-window calibration from subsequent strategy execution and exports results for multiple parameter combinations. Use --quick for the smaller example configuration. Repeated calibration requires fresh strategy state; report rows belong to their own parameter set and should not be concatenated into one account.
Model and publication. No single original research publication is claimed for this library/example policy.
Implementation in this tutorial. The signal compares a fast and a slow arithmetic mean of prices. A fast mean above or below the slow mean produces a directional target after the required history is available. Lag parameters count observations. SMA2DynamicDemo additionally recalibrates parameters on trailing windows; that procedure is separate from the crossover formula.
| Item | Value |
|---|---|
| Status | blocked-license |
| Run | 39114006111 |
| UTC publication | 2026-10-18 09:11 UTC |
| Source commit | 0097e73c040bdaaddac570e2fe694d9836b676ee |
| Data mode | synthetic --quick |
| Exit code | 1 |
| Elapsed seconds | 0.68 |
| Time limit seconds | 180 |
| Maximum Java heap | 1200m |
The external license was not accepted for this 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.technical.SMA2DynamicDemo -Dexec.args="--quick"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.
This is an incomplete or blocked run. Output below is diagnostic or partial, not a verified strategy result.
09:09:54,083 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
09:09:54,083 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
09:09:54,087 |-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:09:54,113 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@34033bd0 - 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:09:54,159 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
09:09:54,160 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
09:09:54,167 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
09:09:54,177 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:09:54,235 |-INFO in ch.qos.logback.core.joran.action.TimestampAction - Using current interpretation time, i.e. now, as time reference.
09:09:54,237 |-INFO in ch.qos.logback.core.joran.action.TimestampAction - Adding property to the context with key="bySecond" and value="2026.10.18,09.09.54" to the LOCAL scope
09:09:54,238 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
09:09:54,240 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE1]
09:09:54,247 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@47fd17e3 - Will use zip compression
09:09:54,247 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@47fd17e3 - Large window sizes are not allowed.
09:09:54,247 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@47fd17e3 - MaxIndex reduced to 21
09:09:54,249 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:09:54,250 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE1] - Active log file name: log/algoquant.2026.10.18,09.09.54.log
09:09:54,250 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE1] - File property is set to [log/algoquant.2026.10.18,09.09.54.log]
09:09:54,251 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG
09:09:54,251 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
09:09:54,251 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE1] to Logger[ROOT]
09:09:54,252 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
09:09:54,252 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@7cdbc5d3 - Registering current configuration as safe fallback point
dev.nm.misc.license.LicenseError: license has been loaded already (loaded license from: license file: /home/runner/work/algoquant-examples/algoquant-examples/license/nm.lic)
Download SMA2DynamicDemo.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.