public class CSI300SimulationDemo extends Object
Using this example.
Configures CSI 300 constituents and local adjusted-price files for a portfolio simulation.
The constituent CSV and price directory are independent inputs and must cover compatible
dates. The index is downloaded from Eastmoney by default; select Sina with
-Dcsi300.indexSource=sina. Optional properties csi300.constituents
and csi300.prices override the local constituent-data paths. The index
history is cached on disk in ./cache/china-index (override with
csi300.indexCache) and validated for calibration coverage before any simulation begins.
The default runs buy-and-hold and equal-weight baselines only; opt into the
expensive 990-optimizer sweep with -Dcsi300.fullGrid=true.
Reported risk-free rates are assumed zero. Set csi300.showCharts=true
to open chart windows; PNG export is automatic.
Model and publication. Related theory and the scope of this example are distinguished below.
Implementation in this tutorial. Reuses rolling portfolio optimization with configured CSI 300 constituents and adjusted prices. A constituent list needs time-consistent membership, and a price history needs coverage for calibration as well as trading. These dataset choices are separate from the underlying optimization theory.
| Constructor and Description |
|---|
CSI300SimulationDemo(dev.nm.misc.datastructure.time.LocalDateTimeInterval interval) |
CSI300SimulationDemo(dev.nm.misc.datastructure.time.LocalDateTimeInterval interval,
SequentialCacheFactory<ListedProduct,StockEOD> source)
Uses a caller-supplied index feed, for reproducible offline tests or another provider.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
main(String[] args) |
static <T> String |
print(SequentialCache<T> cache,
boolean isTimestamp) |
int |
run() |
public CSI300SimulationDemo(dev.nm.misc.datastructure.time.LocalDateTimeInterval interval)
throws IOException
IOExceptionpublic CSI300SimulationDemo(dev.nm.misc.datastructure.time.LocalDateTimeInterval interval,
SequentialCacheFactory<ListedProduct,StockEOD> source)
throws IOException
interval - simulation datessource - daily CSI300 index observations including calibration historyIOException - if constituent membership cannot be readpublic static void main(String[] args) throws IOException
IOExceptionpublic int run()
throws IOException
IOExceptionpublic static <T> String print(SequentialCache<T> cache, boolean isTimestamp)
Copyright © 2026. All rights reserved.