Skip to content

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

usage
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
correlationcrossPearson / Spearman / Kendall, partial correlation, significance
bayesiancrossNormal-Normal belief update + change-point
hestonquantHeston stochastic-volatility calibration + simulation
evtquant/riskExtreme Value Theory (POT / GPD) + return levels
copulaquantGaussian and C-vine copula dependence
timeseriesquant/MLSARIMA + GJR-GARCH volatility
portfolioquantMarkowitz portfolio + VaR / CVaR
cointegrationquantEngle-Granger cointegration / pairs
hmmMLGaussian hidden Markov regime detection
fixedincomequantNelson-Siegel yield curve
randomforestMLRandom Forest regression / classification
qmcnumericQuantum Monte Carlo (harmonic oscillator)
variantsgenomicsVCF variant calling / cohort summary
popgengenomicsPopulation 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.

module-config
# 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_volkappa (2.0), theta (0.04), xi (0.3), rho (-0.7), v0 (0.04)
timeseriesarima_p (1), arima_d (1), arima_q (1), forecast_steps (10)
evtthreshold (0.95, a percentile in 0..1)
random_forestn_trees (100), max_depth (10), min_samples_split (2)
copulatype (gaussian or vine), family (gaussian/clayton/gumbel), n_variables, simulations
quantum_mcparticles (100), steps (10000), time_step (0.01), omega (1.0)
hmmmax_iter (50), tolerance (1e-4), n_restarts (5)
cointegrationsignificance (0.05), lag_order (1)
correlationmethod (pearson or spearman)
bayesiancredible_interval (0.95), prior_type (noninformative)
fixed_incomedv01_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 / quantheston,evt,copula,cointegration,portfolio
Insuranceevt,copula,bayesian
Energy / utilitiestimeseries,evt,hmm
Telecomtimeseries,randomforest,bayesian,correlation,hmm
Agriculturetimeseries,randomforest,evt,popgen,correlation
Climate / environmenttimeseries,evt,hmm,correlation
Healthcare / genomicspopgen,variants,bayesian,randomforest
Manufacturing / qualityevt,randomforest,correlation
Retail / e-commercetimeseries,randomforest,bayesian
Mining / commoditiestimeseries,evt,copula,cointegration
Research / academiaall

Output

What you get

Two streams, both to standard output:

  1. Terminal log: per-module progress and per-formula timings.
  2. JSON block, after a line containing __DJEHUTI_JSON__, machine readable.
JSON output
{
  "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 }
}