@Demo public class SMA2Demo011 extends Object
--live for Yahoo history and
--charts for a desktop chart. The report is written to the console.
Using this example. Shows another explicit SMA2 simulator setup; compare its configured measures and currency assumptions with SMA2Demo010. The built-in strategy uses fixed unit positions, and lag lengths count observations rather than elapsed calendar days.
Model and publication. No single original research publication is claimed for this library/example policy.
Implementation in this tutorial. The signal compares a fast and a slow arithmetic mean of prices. A fast mean above or below the slow mean produces a directional target after the required history is available. Lag parameters count observations. SMA2DynamicDemo additionally recalibrates parameters on trailing windows; that procedure is separate from the crossover formula.
| Constructor and Description |
|---|
SMA2Demo011() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(String[] args) |
void |
run(Stock product) |
Copyright © 2026. All rights reserved.