From 1ee85617f21bce84978be1f981164a62ae640f04 Mon Sep 17 00:00:00 2001 From: gravermistakes Date: Mon, 19 Oct 2026 17:01:24 -0700 Subject: [PATCH] M3a: handle single-step rough-vol horizon --- core/src/economy/sims/statistical/engine.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/economy/sims/statistical/engine.R b/core/src/economy/sims/statistical/engine.R index d9f7fe7..eaf985b 100644 --- a/core/src/economy/sims/statistical/engine.R +++ b/core/src/economy/sims/statistical/engine.R @@ -327,7 +327,11 @@ hurst_rs <- function(x) { fgn_davies_harte <- function(n, H, seed=1L) { n <- as.integer(n) - stopifnot(n >= 2, H > 0, H < 1) + stopifnot(n >= 1, H > 0, H < 1) + if (n == 1) { + set.seed(seed) + return(rnorm(1)) + } k <- 0:n gamma <- 0.5 * ( abs(k-1)^(2*H) - 2*abs(k)^(2*H) + abs(k+1)^(2*H)