moneyfeel-mri
Python client for the moneyfeel Macro & Geopolitical Risk Index.
Free programmatic access to the moneyfeel MRI — an institutional-grade macro regime classifier covering 5 regions (GLOBAL, US, EU, ASIA, EM) across 3 timeframes (Daily, Weekly, Monthly), updated daily.
Installation
pip install moneyfeel-mri
# With pandas support (recommended)
pip install moneyfeel-mri[pandas]
Get a Free API Key
- Register at moneyfeel.it — free, no credit card
- Go to your account page
- Find the MRI API Access section → Generate API Key
Quick Start
from moneyfeel import MRI
client = MRI("mf_live_YOUR_KEY")
# Current regime — no auth required
current = client.current()
for region in current:
print(region["region"], region["regime_weekly"], region["score_weekly"])
# Historical data as pandas DataFrame
df = client.history_df("US", "WEEKLY", from_date="2020-01-01")
print(df.tail())
# Latest regime
latest = client.latest("EU", "WEEKLY")
print(f"EU: {latest['regime']} | score={latest['mri_score']}")
# Performance metrics
m = client.metrics("US", "WEEKLY")[0]
print(f"Sharpe: {m['sharpe']} | CAGR: {m['cagr_strategy']}% | MaxDD: {m['max_dd']}%")
# Full CSV download
df_full = client.download("US", "WEEKLY") # returns DataFrame
client.download("US", "WEEKLY", "us_weekly.csv") # saves to file
All Methods
| Method | Auth | Description |
|---|---|---|
current() |
No | Current regime for all 5 regions |
status() |
No | API health check |
regions() |
No | Available regions and timeframes |
history(region, tf, from_date, to_date) |
Yes | Historical regime data |
history_df(region, tf, from_date, to_date) |
Yes | Same, as pandas DataFrame |
latest(region, tf) |
Yes | Most recent regime record |
metrics(region, tf) |
Yes | Strategy performance KPIs |
timeseries(region, tf, from_date) |
Yes | Daily return series |
timeseries_df(region, tf, from_date) |
Yes | Same, as pandas DataFrame |
eoy(region, tf) |
Yes | Year-by-year returns |
drawdowns(region, tf) |
Yes | Top 10 drawdown periods |
download(region, tf, output_path) |
Yes | Full CSV dataset |
Error Handling
from moneyfeel import MRI, MRIAuthError, MRIRateLimitError
import time
client = MRI("mf_live_YOUR_KEY")
try:
data = client.history("US", "WEEKLY")
except MRIAuthError:
print("Invalid or revoked key — get a new one at https://moneyfeel.it/conto-iscrizione/")
except MRIRateLimitError as e:
print(f"Rate limited — retry after {e.retry_after}s")
time.sleep(e.retry_after)
Data Coverage
- Regions: GLOBAL · US · EU · ASIA · EM
- Timeframes: DAILY · WEEKLY · MONTHLY
- History: 2007-01-04 to present
- Updated: daily at market close
Rate Limits
| Limit | Value |
|---|---|
| Requests/minute | 30 |
| Requests/day | 2,000 |
| History | Full (2007+) |
| Cost | Free |
Links
License
CC BY-NC 4.0 — free for research and non-commercial use.
Metadata
Release files for moneyfeel-mri 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| moneyfeel_mri-1.0.4.tar.gz | 8.0 kB | Without provenance | Details for moneyfeel_mri-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| moneyfeel_mri-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for moneyfeel_mri-1.0.4-py3-none-any.whl |
Total release size: 15.5 kB
Release files / moneyfeel_mri-1.0.4.tar.gz
| Download URL | moneyfeel_mri-1.0.4.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50b98cbc88b0d6a9a8addd5b3fb750243e8c9c5e684476af3fbbc17a946a20a4
|
|
BLAKE2b-256 checksum How to use checksums |
0c72cc316e48961ece031249b9cb46d37903c904cf2402cefcb116e342cfc0ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.13
|
Release files / moneyfeel_mri-1.0.4-py3-none-any.whl
| Download URL | moneyfeel_mri-1.0.4-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a675f0ddc0c7014aebb006a394512c1c9ad8eab724db9f379956a3f4a2f720d2
|
|
BLAKE2b-256 checksum How to use checksums |
f851aab31e304664144423a80be27a5babcd28dc486c3eb3bea5b604e72f1679
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.13
|
Security for moneyfeel-mri 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.