mirror of
https://github.com/SHOGGOTH-SECTOR/sica-fondt.git
synced 2026-07-31 08:06:26 +00:00
M3a: HiddenMarkov is the vital package, JSON is hand-rolled
Correct the R dependency: HiddenMarkov (CRAN) for HMM regime detection (Viterbi, Baum-Welch); JSON I/O for Hub protocol is hand-rolled, not jsonlite. Everything else uses base R primitives.
This commit is contained in:
parent
31b29cab32
commit
3da931ecad
@ -75,13 +75,16 @@ else
|
||||
fi
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# R + jsonlite (economy organ: M3a statistical sims)
|
||||
# R + HiddenMarkov (economy organ: M3a statistical sims)
|
||||
# ---------------------------------------------------------------------------
|
||||
if command -v Rscript >/dev/null 2>&1 && Rscript -e 'library(jsonlite)' >/dev/null 2>&1; then
|
||||
log "R + jsonlite already present; skipping."
|
||||
if command -v Rscript >/dev/null 2>&1 && Rscript -e 'library(HiddenMarkov)' >/dev/null 2>&1; then
|
||||
log "R + HiddenMarkov already present; skipping."
|
||||
else
|
||||
log "Installing r-base-core r-cran-jsonlite via apt-get ..."
|
||||
sudo apt-get install -y r-base-core r-cran-jsonlite || die "apt-get install of r-base-core/r-cran-jsonlite failed."
|
||||
log "Installing r-base-core via apt-get ..."
|
||||
sudo apt-get install -y r-base-core || die "apt-get install of r-base-core failed."
|
||||
log "Installing HiddenMarkov from CRAN ..."
|
||||
Rscript -e 'install.packages("HiddenMarkov", repos="https://cloud.r-project.org", quiet=TRUE)' \
|
||||
|| die "CRAN install of HiddenMarkov failed."
|
||||
fi
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@ -17,10 +17,11 @@ for crypto markets C1.
|
||||
|
||||
## 3. Language & location
|
||||
**R 4.x** (apt `r-base-core`) · `src/economy/sims/statistical/`. Minimal dependencies:
|
||||
`r-base-core` + `jsonlite` (Hub JSON protocol). All statistical models — GARCH, Heston SDE,
|
||||
HMM, DCC, copula, jump-diffusion, fBM — are hand-rolled using base R primitives (`optim`,
|
||||
`fft`, `arima`, matrix ops). No CRAN statistical packages. Fractional Brownian motion via
|
||||
spectral methods (Hosking 1984 / Wood & Chan 1994) uses base R `fft()`.
|
||||
`r-base-core` + `HiddenMarkov` (CRAN — Viterbi filter, forward-backward, Baum-Welch). GARCH,
|
||||
Heston SDE, DCC, copula, jump-diffusion, and fBM are hand-rolled using base R primitives
|
||||
(`optim`, `fft`, `arima`, matrix ops). JSON I/O for the Hub stdin/stdout protocol is
|
||||
hand-rolled. Fractional Brownian motion via spectral methods (Hosking 1984 / Wood & Chan 1994)
|
||||
uses base R `fft()`.
|
||||
|
||||
## 4. Does / does-not
|
||||
- **Does:** run Monte Carlo price simulations (GBM, Merton jump-diffusion, Heston stochastic
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user