Skip to content

SMA2Demo020

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

SMA2Demo020

This is an earlier AlgoQuant usage tutorial record. Its numerical results are irrelevant to the teaching purpose. See the maintained tutorial and the learning directory.

Synthetic-data demonstration. Source · Verified execution · Data-and-methodology · Reproduce-the-results

What this example does

Fixed SMA crossover; fast lag 1, slow lag 2. Uses SimTemplateYahooEOD with an overridden data factory, so the default remains synthetic. The template specifies products, dates, strategy, currency and measures. Maximum long exposure reported: 84.987209.

Configuration and verified results

Item Value
Instrument label XOM
Requested interval (end excluded) 2010-01-01 to 2011-01-03
Data Generated weekday OHLCV bars
Mode Offline, headless; script passes --quick (only dynamic demo changes its workload)
NAV observations 263
Executions 11
P&L 168.880699
InformationRatioForTrades 4.956692
OmegaForTrades Infinity

The run passed the nonempty/finite NAV check. Execution count counts fills; it is not necessarily a count of completed round-trip trades. NAV observations count the report's valuations.

Run it

mvn exec:java -Dexec.mainClass=tech.nmfin.algoquant.demo.model.technical.SMA2Demo020 -Dexec.args="--quick"

A valid external NM license and Maven authentication are required; see Reproduce-the-results.

Clone this wiki locally