RPubs will retire in June 2027. Your existing documents will stay accessible through December 31, 2031
and Connect Cloud is the recommended home for new publishing. Read the blog post

Recently Published

Discussion14_GARCH
Document
Market Regime Detection using Hidden Markov Models
This research models the S&P 500’s underlying volatility states using a 2-State Hidden Markov Model (HMM). By assuming the market operates in hidden, non-stationary regimes, we can mathematically isolate periods of low-volatility “bull” markets from high-volatility “panic” phases without relying on lagging moving averages. Three strategies are evaluated out-of-sample using a walk-forward framework: Strategy A (Baseline): Hard binary switching with an expanding training window Strategy B (Rolling Window): Hard binary switching with a fixed 3-year rolling training window, preventing over-indexing on historical crises Strategy C (Soft Allocation): Probability-weighted exposure using the posterior normal-regime probability as a continuous position size, eliminating abrupt switches
codealong9
Logistic Regression: Modelling Binary Outcomes
An introductory guide to logistic regression, covering intuition, model specification, estimation in R, and interpretation using the wage1 dataset from the wooldridge package.
Hiểu về đường cong ROC và AUC dưới giả định Binormal (phần II)
Tiếp nối phần I "Đường cong ROC và AUC trong đánh giá độ chính xác xét nghiệm chẩn đoán"