Repository navigation
Model MRModelRanged1Demo
All model results · Pinned source · Javadoc
Using this example. Runs a ranged mean-reversion model on local GainCapital FX prices. A range parameter is expressed in spread/price units; the basket coefficients and lot scale control the traded quantities.
Model and publication. No single original research publication is claimed for this library/example policy.
Implementation in this tutorial. The ranged variant is demonstrated on the configured basket in main; read the basket coefficient and model range together to interpret spread units. 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.
| 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 | 3.29 |
| Time limit seconds | 180 |
| Maximum Java heap | 1200m |
The original main returned successfully. Read the output and model assumptions before interpreting it.
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.MRModelRanged1DemoThe 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.
09:08:00,661 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
09:08:00,661 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
09:08:00,661 |-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:00,698 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@546a03af - 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:00,748 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
09:08:00,749 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
09:08:00,757 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
09:08:00,764 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:08:00,800 |-INFO in ch.qos.logback.core.joran.action.TimestampAction - Using current interpretation time, i.e. now, as time reference.
09:08:00,801 |-INFO in ch.qos.logback.core.joran.action.TimestampAction - Adding property to the context with key="bySecond" and value="2026.10.18,09.08.00" to the LOCAL scope
09:08:00,802 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
09:08:00,805 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE1]
09:08:00,811 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@721e0f4f - Will use zip compression
09:08:00,811 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@721e0f4f - Large window sizes are not allowed.
09:08:00,811 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@721e0f4f - MaxIndex reduced to 21
09:08:00,814 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:08:00,815 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE1] - Active log file name: log/algoquant.2026.10.18,09.08.00.log
09:08:00,815 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE1] - File property is set to [log/algoquant.2026.10.18,09.08.00.log]
09:08:00,816 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG
09:08:00,816 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
09:08:00,817 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE1] to Logger[ROOT]
09:08:00,817 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
09:08:00,817 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@28864e92 - Registering current configuration as safe fallback point
09:08:02.589 [main] INFO t.n.a.d.m.volarb.MRModelRanged1Demo,133 - Performance Report:
Product Execution Count Profit Loss Information Ratio For Trades Omega For Trades
NZD/CHF 10.0 -0.014190000016242266 -0.39867318222868187 -0.7518373726228952
Total 10.0 -0.014190000016242266 -0.39867318222868187 -0.7518373726228952
Download MRModelRanged1Demo.zip contains stdout, stderr, the execution record, checksums and any exported CSV/chart files.
| Export | Bytes |
|---|---|
files/charts/chart-01.png |
97179 |
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.