Skip to content

Model CoinBacktestDemo

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

CoinBacktestDemo — execution tutorial

All model results · Pinned source · Javadoc

What this example teaches

Compares the different asset allocation algorithms.

Using this example. Loads the local crypto-markets CSV ZIP through JesseventCoinDataUtils and compares allocation algorithms. The dataset path is test-data/coin/crypto-markets.csv.zip; its historical coverage and constituent selection constrain the comparison.

Model and publication. Related theory and the scope of this example are distinguished below.

Implementation in this tutorial. Reuses asset-allocation algorithms on a historical crypto dataset; a crypto universe and rebalancing experiment are not a reproduction of Markowitz’s original illustrations. Inspect listing dates, missing observations and constituent selection before interpreting optimizer comparisons.

Verified execution record

Item Value
Status failed
Run 39114006111
UTC publication 2026-10-18 09:11 UTC
Source commit 0097e73c040bdaaddac570e2fe694d9836b676ee
Data mode original main defaults
Exit code 1
Elapsed seconds 0.62
Time limit seconds 180
Maximum Java heap 1200m

The demo raised an exception or did not return normally. This is not a verified numerical result.

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.portfoliooptimization.coin.CoinBacktestDemo

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

This is an incomplete or blocked run. Output below is diagnostic or partial, not a verified strategy result.

09:07:59,224 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
09:07:59,224 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
09:07:59,225 |-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:07:59,248 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@33a10788 - 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:07:59,290 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
09:07:59,291 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
09:07:59,299 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
09:07:59,307 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:07:59,347 |-INFO in ch.qos.logback.core.joran.action.TimestampAction - Using current interpretation time, i.e. now, as time reference.
09:07:59,348 |-INFO in ch.qos.logback.core.joran.action.TimestampAction - Adding property to the context with key="bySecond" and value="2026.10.18,09.07.59" to the LOCAL scope
09:07:59,348 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
09:07:59,351 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE1]
09:07:59,359 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@7006c658 - Will use zip compression
09:07:59,359 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@7006c658 - Large window sizes are not allowed.
09:07:59,359 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@7006c658 - MaxIndex reduced to 21
09:07:59,363 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:07:59,364 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE1] - Active log file name: log/algoquant.2026.10.18,09.07.59.log
09:07:59,364 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE1] - File property is set to [log/algoquant.2026.10.18,09.07.59.log]
09:07:59,366 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG
09:07:59,366 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
09:07:59,366 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE1] to Logger[ROOT]
09:07:59,366 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
09:07:59,367 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@34033bd0 - Registering current configuration as safe fallback point

java.time.format.DateTimeParseException: Text '2013-04-28' could not be parsed: Unable to obtain LocalDateTime from TemporalAccessor: {},ISO resolved to 2013-04-28 of type java.time.format.Parsed
	at java.time.format.DateTimeFormatter.createError(DateTimeFormatter.java:1920)
	at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1855)
	at java.time.LocalDateTime.parse(LocalDateTime.java:492)
	at tech.nmfin.algoquant.data.historicaldata.coin.jessevent.JesseventCoinEODMktCacheFactory.s(rhb:47)
	at tech.nmfin.algoquant.data.historicaldata.coin.jessevent.JesseventCoinEODMktCacheFactory.<init>(rhb:159)
	at tech.nmfin.algoquant.data.historicaldata.coin.jessevent.JesseventCoinDataUtils.s(vhb:128)
	at tech.nmfin.algoquant.data.historicaldata.coin.jessevent.JesseventCoinDataUtils.<init>(vhb:62)
	at tech.nmfin.algoquant.demo.model.portfoliooptimization.coin.CoinBacktestDemo.main(CoinBacktestDemo.java:91)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at ModelDemoRunner.main(ModelDemoRunner.java:35)
Caused by: java.time.DateTimeException: Unable to obtain LocalDateTime from TemporalAccessor: {},ISO resolved to 2013-04-28 of type java.time.format.Parsed
	at java.time.LocalDateTime.from(LocalDateTime.java:461)
	at java.time.format.Parsed.query(Parsed.java:226)
	at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1851)
	... 11 more
Caused by: java.time.DateTimeException: Unable to obtain LocalTime from TemporalAccessor: {},ISO resolved to 2013-04-28 of type java.time.format.Parsed
	at java.time.LocalTime.from(LocalTime.java:409)
	at java.time.LocalDateTime.from(LocalDateTime.java:457)
	... 13 more

Downloadable evidence

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

Interpreting the result

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.

Clone this wiki locally