Skip to content

Model MRModelFixedGridOnSGXDataDemo

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

MRModelFixedGridOnSGXDataDemo — execution tutorial

All model results · Pinned source · Javadoc

What this example teaches

Using this example. Runs a fixed-grid mean-reversion basket using local SGX SiMSCI and NK tick caches. The two instruments and basket coefficient must be interpreted with their product and currency conventions; the result is not a normalized portfolio return.

Model and publication. No single original research publication is claimed for this library/example policy.

Implementation in this tutorial. This fixed-grid adaptation supplies SGX futures tick caches instead of the FX caches used by MRModelFixedGridDemo; product conventions differ. These are library-specific spread/grid trading policies. A basket converts product prices into a spread; the configured mean-reversion model maps its level or deviation into a desired state, and MeanReversionStrategy translates that state into product orders. Grid distance, periodic/ranged update behavior and scale are distinct controls. The folder name does not mean that option implied volatility is being traded. Mean reversion is an assumption to check, not a property guaranteed by this policy.

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 20.65
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.volarb.MRModelFixedGridOnSGXDataDemo

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:08:01,818 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
09:08:01,819 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
09:08:01,819 |-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:08:01,833 |-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:08:01,861 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
09:08:01,861 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
09:08:01,867 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
09:08:01,871 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:08:01,896 |-INFO in ch.qos.logback.core.joran.action.TimestampAction - Using current interpretation time, i.e. now, as time reference.
09:08:01,896 |-INFO in ch.qos.logback.core.joran.action.TimestampAction - Adding property to the context with key="bySecond" and value="2026.10.18,09.08.01" to the LOCAL scope
09:08:01,897 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
09:08:01,899 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE1]
09:08:01,903 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@7907ec20 - Will use zip compression
09:08:01,903 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@7907ec20 - Large window sizes are not allowed.
09:08:01,903 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@7907ec20 - MaxIndex reduced to 21
09:08:01,905 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:08:01,906 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE1] - Active log file name: log/algoquant.2026.10.18,09.08.01.log
09:08:01,906 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE1] - File property is set to [log/algoquant.2026.10.18,09.08.01.log]
09:08:01,906 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG
09:08:01,906 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
09:08:01,907 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE1] to Logger[ROOT]
09:08:01,907 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
09:08:01,907 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@546a03af - Registering current configuration as safe fallback point

09:08:01.965 [main] INFO  t.n.algoquant.util.config.AQConfig,194 - looking up configuration file: config.default.xml
09:08:01.967 [main] INFO  t.n.algoquant.util.config.AQConfig,194 - looking up configuration file: config/config.default.xml
09:08:01.968 [main] INFO  t.n.algoquant.util.config.AQConfig,209 - loading config file: file:/home/runner/work/algoquant-examples/algoquant-examples/target/model-results/MRModelFixedGridOnSGXDataDemo/work/config/config.default.xml
09:08:02.067 [main] INFO  t.n.algoquant.util.config.AQConfig,148 - 09:08:01,818 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
09:08:01,819 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
09:08:01,819 |-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:08:01,833 |-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:08:01,861 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
09:08:01,861 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
09:08:01,867 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
09:08:01,871 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:08:01,896 |-INFO in ch.qos.logback.core.joran.action.TimestampAction - Using current interpretation time, i.e. now, as time reference.
09:08:01,896 |-INFO in ch.qos.logback.core.joran.action.TimestampAction - Adding property to the context with key="bySecond" and value="2026.10.18,09.08.01" to the LOCAL scope
09:08:01,897 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
09:08:01,899 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE1]
09:08:01,903 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@7907ec20 - Will use zip compression
09:08:01,903 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@7907ec20 - Large window sizes are not allowed.
09:08:01,903 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@7907ec20 - MaxIndex reduced to 21
09:08:01,905 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:08:01,906 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE1] - Active log file name: log/algoquant.2026.10.18,09.08.01.log
09:08:01,906 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE1] - File property is set to [log/algoquant.2026.10.18,09.08.01.log]
09:08:01,906 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG
09:08:01,906 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
09:08:01,907 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE1] to Logger[ROOT]
09:08:01,907 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
09:08:01,907 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@546a03af - Registering current configuration as safe fallback point


09:08:02.068 [main] INFO  t.n.algoquant.util.config.AQConfig,95 - current directory: /home/runner/work/algoquant-examples/algoquant-examples/target/model-results/MRModelFixedGridOnSGXDataDemo/work
09:08:02.068 [main] INFO  t.n.algoquant.util.config.AQConfig,169 - current config:
09:08:02.075 [main] INFO  t.n.algoquant.util.config.AQConfig,11 - nm.license: /home/runner/work/algoquant-examples/algoquant-examples/license/nm.lic
09:08:02.075 [main] INFO  t.n.algoquant.util.config.AQConfig,11 - DATA_FOLDER: ./test-data
09:08:02.076 [main] INFO  t.n.algoquant.util.config.AQConfig,11 - DATA_GAINCAPITAL: ${DATA_FOLDER}/processed/gaincapital/extracted-from-raw-arrange-by-dates
09:08:02.076 [main] INFO  t.n.algoquant.util.config.AQConfig,11 - DATA_BLOOMBERG: ${DATA_FOLDER}/processed/bloomberg
09:08:02.076 [main] INFO  t.n.algoquant.util.config.AQConfig,11 - DATA_YAHOO: ${DATA_FOLDER}/yahoo
09:08:02.076 [main] INFO  t.n.algoquant.util.config.AQConfig,11 - DATA_SGX: ${DATA_FOLDER}/raw/sgx
09:08:02.076 [main] INFO  t.n.algoquant.util.config.AQConfig,11 - DATA_HOLIDAYS: ./log/holidays
09:08:02.077 [main] INFO  t.n.algoquant.util.config.AQConfig,11 - DATA_COMPUSTAT_HK: ${DATA_FOLDER}/[database configuration redacted]/hk
09:08:02.077 [main] INFO  t.n.algoquant.util.config.AQConfig,11 - PDF_OUTPUT_FOLDER: ./log/
09:08:02.077 [main] INFO  t.n.algoquant.util.config.AQConfig,11 - PDF_PLOT_WIDTH: 800
09:08:02.077 [main] INFO  t.n.algoquant.util.config.AQConfig,11 - PDF_PLOT_HEIGHT: 600
09:08:22.111 [main] INFO  t.n.a.d.m.v.MRModelFixedGridOnSGXDataDemo,146 - report = Performance Report:
Product	Profit Loss	Information Ratio For Trades	Omega For Trades
NK	-9374.099999999977	-2.714561416802233	-1.0
SiMSCI	7.29652E7	6.425031460219233	Infinity
Total	7.29558259E7	0.9243955958299965	127.10519270537083

Downloadable evidence

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

Export Bytes
files/charts/chart-01.png 74810

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