Repository navigation
Model JanuaryEffectStrategyDemo
All model results · Pinned source · Javadoc
Demonstrates how to set up the simulator to simulate the tutorial strategy,
JanuaryEffectStrategy.
Using this example. Supplies market data, capital, timing context and measures to the JanuaryEffectStrategy example. The strategy trades one unit; initial capital is not an instruction to invest the whole account. Inspect the scheduled event dates together with the available price observations.
Model and publication. No single original research publication is claimed for this library/example policy.
Implementation in this tutorial. This is a calendar-rule illustration: schedule daily callbacks, open one unit near year-end and flatten after the configured new-year date. The code does not estimate a seasonal premium or implement a causal explanation of the January effect. It is not presented as a replication of a specific empirical publication.
| Item | Value |
|---|---|
| Status | completed |
| Run | 39114360151 |
| UTC publication | 2026-10-18 09:17 UTC |
| Source commit | 355aa9242fc2a247b256aecc8406cbb409aa5ff3 |
| Data mode | original main defaults |
| Exit code | 0 |
| Elapsed seconds | 9.13 |
| 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.januaryeffect.JanuaryEffectStrategyDemoThe 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:12:30.109 [main] INFO t.n.a.d.m.j.JanuaryEffectStrategy,97 - initialize at 2000-01-01T00:00
09:12:30.127 [main] INFO t.n.algoquant.util.config.AQConfig,194 - looking up configuration file: config.default.xml
09:12:30.128 [main] INFO t.n.algoquant.util.config.AQConfig,194 - looking up configuration file: config/config.default.xml
09:12:30.128 [main] INFO t.n.algoquant.util.config.AQConfig,209 - loading config file: file:/home/runner/work/algoquant-examples/algoquant-examples/target/model-results/JanuaryEffectStrategyDemo/work/config/config.default.xml
09:12:30.269 [main] INFO t.n.algoquant.util.config.AQConfig,95 - current directory: /home/runner/work/algoquant-examples/algoquant-examples/target/model-results/JanuaryEffectStrategyDemo/work
09:12:30.269 [main] INFO t.n.algoquant.util.config.AQConfig,169 - current config:
09:12:30.278 [main] INFO t.n.algoquant.util.config.AQConfig,11 - nm.license: /home/runner/work/algoquant-examples/algoquant-examples/license/nm.lic
09:12:30.282 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_FOLDER: ./test-data
09:12:30.282 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_GAINCAPITAL: ${DATA_FOLDER}/processed/gaincapital/extracted-from-raw-arrange-by-dates
09:12:30.282 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_BLOOMBERG: ${DATA_FOLDER}/processed/bloomberg
09:12:30.283 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_YAHOO: ${DATA_FOLDER}/yahoo
09:12:30.283 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_SGX: ${DATA_FOLDER}/raw/sgx
09:12:30.283 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_HOLIDAYS: ./log/holidays
09:12:30.284 [main] INFO t.n.algoquant.util.config.AQConfig,11 - DATA_COMPUSTAT_HK: ${DATA_FOLDER}/[database configuration redacted]/hk
09:12:30.284 [main] INFO t.n.algoquant.util.config.AQConfig,11 - PDF_OUTPUT_FOLDER: ./log/
09:12:30.285 [main] INFO t.n.algoquant.util.config.AQConfig,11 - PDF_PLOT_WIDTH: 800
09:12:30.285 [main] INFO t.n.algoquant.util.config.AQConfig,11 - PDF_PLOT_HEIGHT: 600
09:12:31.364 [main] INFO t.n.a.d.h.yahoo.YahooEODCacheFactory,196 - reading Yahoo! data for ^HSI from the Internet from 2000-01-01T00:00 to 2012-02-01T16:00
09:12:33.235 [main] INFO t.n.a.d.m.j.JanuaryEffectStrategyDemo,101 - report = Performance Report:
Product Profit Loss Execution Count Information Ratio For Periods Omega For Periods
^HSI 5313.6591796875 24.0 0.7648742222272568 6.80475528523084
Total 5313.6591796875 24.0 0.6560871616691525 3.348813567373397

Download JanuaryEffectStrategyDemo.zip contains stdout, stderr, the execution record, checksums and any exported CSV/chart files.
| Export | Bytes |
|---|---|
files/charts/chart-01.png |
101224 |
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.