India Macro-Momentum Regime Dashboard
Project description
๐งญ Nautilus
Best free open-source India macro-momentum regime dashboard โ powered by yfinance, real RBI data, and a 5-state Gaussian HMM.
100% local ยท zero cloud cost ยท zero paid APIs ยท zero synthetic data.
What it does
- Fetches Nifty 50 prices (
^NSEI) and the India 10Y G-Sec yield (NIFTYGS10YR.NS) via yfinance. - Loads RBI repo rate from a bundled historical CSV (public domain).
- Fits a 5-state Gaussian HMM on price volatility + macro features.
- Applies a risk-gate overlay (not aggressive Kelly scaling) that preserves India's upward drift in bull markets while going cash during confirmed Panic regimes.
- Renders an interactive Streamlit dashboard with regime shading, bond yield panel, Williams VixFix, equity curve backtest, and CSV exports.
Quickstart
git clone https://github.com/chrislernunes/Nautilus
cd Nautilus
python -m venv .venv
# Linux/macOS:
source .venv/bin/activate
# Windows MSYS2 UCRT64:
source .venv/Scripts/activate
pip install -e ".[dev]"
pip install hmmlearn # enables 5-state HMM
streamlit run src/nautilus/dashboard/regime_dashboard.py
v5 Regime Multipliers
| Regime | Multiplier | Rationale |
|---|---|---|
| Bull Quiet | 1.00ร | Full exposure โ ride India's drift |
| Bull Volatile | 1.00ร | Still bullish directionally |
| Neutral | 0.75ร | Mild reduction |
| Stress | 0.35ร | Meaningful cut |
| Panic | 0.00ร | Cash |
Previous v4 used 0.40ร for Neutral and 0.15ร for Stress โ this averaged ~0.55ร across bull markets, destroying ~45 pp of return with no compensating benefit. BigBeluga is fully removed.
Project structure
nautilus/
โโโ data/
โ โโโ rbi_repo_rate.csv # Bundled RBI repo rate history (public domain)
โโโ src/nautilus/
โ โโโ config.py # Paths, tickers, defaults
โ โโโ etl/
โ โ โโโ loader.py # yfinance + Parquet cache
โ โ โโโ macro.py # Real RBI repo + NIFTYGS10YR.NS bond yield
โ โโโ strategies/
โ โ โโโ momentum.py # MA signal, WVF, cross-sectional momentum
โ โ โโโ regime.py # HMM fitting + regime containers
โ โโโ backtests/
โ โ โโโ engine.py # Vectorized backtest (no double-shift)
โ โโโ dashboard/
โ โโโ regime_dashboard.py # Streamlit app
โโโ tests/
โโโ test_engine.py # Unit tests
Data sources
| Data | Source | Cost |
|---|---|---|
| Nifty 50 prices | ^NSEI via yfinance |
Free |
| Stock universe | .NS tickers via yfinance |
Free |
| 10Y G-Sec yield | NIFTYGS10YR.NS via yfinance |
Free |
| RBI repo rate | Bundled CSV (RBI press releases, public domain) | Free |
No Quandl. No FRED. No Bloomberg. No API keys.
Updating RBI repo rate
After each MPC meeting, add a new row to data/rbi_repo_rate.csv:
2025-06-06,5.75
Then click ๐ Refresh Data in the sidebar.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nautilus_spark-0.5.1.tar.gz.
File metadata
- Download URL: nautilus_spark-0.5.1.tar.gz
- Upload date:
- Size: 34.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f9cd24c4824a43dc42587063bc245fd319c9531038f8163031144fcc830f3bb
|
|
| MD5 |
f1549532f859c0c560b1f3497d9df538
|
|
| BLAKE2b-256 |
b5078256d2079b0c6e435e2803993eeb7544e41b0ef9c1652a8826925efdf111
|
File details
Details for the file nautilus_spark-0.5.1-py3-none-any.whl.
File metadata
- Download URL: nautilus_spark-0.5.1-py3-none-any.whl
- Upload date:
- Size: 35.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d587f3f6e4c8c61b88fd23c2acacd06c5a44e299a9a99a1b9cfadac175bbb05
|
|
| MD5 |
1a84fe0bb4e050fda6fca99a966d8b56
|
|
| BLAKE2b-256 |
c241e682dd52a85bb45e6b9be00d469bd45ecd1015af22ff66d89ebe130dc17c
|