Documentation
Commands, modules, and tuning
Everything you need to run the engine. Copy-paste the commands, tune the modules, and read the output.
Commands
Run the engine
djehuti2 <datafile> [options]
<datafile> NPY / HDF5 / VCF / FASTA / GenBank / JSON / ...
--modules <spec> comma-separated names, 'all', or 0xHEX (default: all)
--sims N Monte Carlo simulation count (>= 1000)
--module-config <json> per-module parameter overrides (JSON string)
--config <file> run a JSON job file, prints combined JSON result
--list-modules list selectable modules and exit
--help show this help and exit
# Examples
djehuti2 data.npy
djehuti2 data.npy --modules heston,evt,copula
djehuti2 data.npy --modules 0x1400
djehuti2 data.npy --sims 5000000
djehuti2 data.npy --module-config '{"random_forest":{"n_trees":300}}'
djehuti2 --config job.json
Modules
Selectable modules
Run --list-modules to see the names on your build. The Monte Carlo core
always runs and is not a --modules name.
| Name | Domain | What it computes |
|---|---|---|
correlation | cross | Pearson / Spearman / Kendall, partial correlation, significance |
bayesian | cross | Normal-Normal belief update + change-point |
heston | quant | Heston stochastic-volatility calibration + simulation |
evt | quant/risk | Extreme Value Theory (POT / GPD) + return levels |
copula | quant | Gaussian and C-vine copula dependence |
timeseries | quant/ML | SARIMA + GJR-GARCH volatility |
portfolio | quant | Markowitz portfolio + VaR / CVaR |
cointegration | quant | Engle-Granger cointegration / pairs |
hmm | ML | Gaussian hidden Markov regime detection |
fixedincome | quant | Nelson-Siegel yield curve |
randomforest | ML | Random Forest regression / classification |
qmc | numeric | Quantum Monte Carlo (harmonic oscillator) |
variants | genomics | VCF variant calling / cohort summary |
popgen | genomics | Population genetics (Fst, Tajima's D, diversity) |
Tuning
--module-config
Pass a JSON string with one block per module you want to tune. Unspecified modules use their defaults.
# Example: tune Random Forest and EVT
$ djehuti2 data.npy --module-config '{"random_forest":{"n_trees":300,"max_depth":12},"evt":{"threshold":0.97}}'
| Block | Parameters (default) |
|---|---|
stochastic_vol | kappa (2.0), theta (0.04), xi (0.3), rho (-0.7), v0 (0.04) |
timeseries | arima_p (1), arima_d (1), arima_q (1), forecast_steps (10) |
evt | threshold (0.95, a percentile in 0..1) |
random_forest | n_trees (100), max_depth (10), min_samples_split (2) |
copula | type (gaussian or vine), family (gaussian/clayton/gumbel), n_variables, simulations |
quantum_mc | particles (100), steps (10000), time_step (0.01), omega (1.0) |
hmm | max_iter (50), tolerance (1e-4), n_restarts (5) |
cointegration | significance (0.05), lag_order (1) |
correlation | method (pearson or spearman) |
bayesian | credible_interval (0.95), prior_type (noninformative) |
fixed_income | dv01_bp_shift (1) |
Recipes
Cross-industry module combos
Pick the modules that match your question. The Monte Carlo core runs automatically.
| Industry | --modules recipe |
|---|---|
| Finance / quant | heston,evt,copula,cointegration,portfolio |
| Insurance | evt,copula,bayesian |
| Energy / utilities | timeseries,evt,hmm |
| Telecom | timeseries,randomforest,bayesian,correlation,hmm |
| Agriculture | timeseries,randomforest,evt,popgen,correlation |
| Climate / environment | timeseries,evt,hmm,correlation |
| Healthcare / genomics | popgen,variants,bayesian,randomforest |
| Manufacturing / quality | evt,randomforest,correlation |
| Retail / e-commerce | timeseries,randomforest,bayesian |
| Mining / commodities | timeseries,evt,copula,cointegration |
| Research / academia | all |
Output
What you get
Two streams, both to standard output:
- Terminal log: per-module progress and per-formula timings.
- JSON block, after a line containing
__DJEHUTI_JSON__, machine readable.
{
"engine": "djehuti2 v3.0",
"file": {
"bytes_mapped": 1048576,
"read_ms": 12.3,
"mmap_evidence": {
"access": "O_RDONLY / PROT_READ / MAP_PRIVATE",
"copy_on_read": false,
"full_decompress": false,
"disk_writes": 0,
"swap_friendly": true,
"corruption_guarded": true
}
},
"modules_run": ["montecarlo", "heston", "evt"],
"results": {
"montecarlo": { "mean": 0.00042, "stddev": 0.0111, "var_95": 0.0179 },
"heston": { "kappa": 2.0, "theta": 0.04, "mean_vol": 0.199 },
"evt": { "xi": 0.312, "beta": 0.0078, "return_level_100": 0.032 }
},
"timings_ms": [
{ "module": "montecarlo", "ms": 234.0 },
{ "module": "heston", "ms": 15.2 },
{ "module": "evt", "ms": 8.7 }
],
"global": { "total_ms": 270.1, "sims_per_second": 213675213 }
}