Economics › FRED panel always shows 0 observations (numeric values dropped by FredPanel)

Author: pitcanyCreated Sep 12, 2026Updated Sep 12, 2026

Summary

The Economics → FRED panel always renders an empty chart/table, even with a valid FRED_API_KEY. The log shows the script succeeding and then:

[EconomicsService] Run fred_data.py series [CPIAUCSL]
[EconomicsService] Result ready: fred_CPIAUCSL
[FredPanel] Displayed 0 observations

Environment

  • Fincept Terminal v4.5.0 (Linux x64 .deb; the same panel code ships in the macOS arm64 build)
  • Also present on main at 09b70f3 (2026-09-08)

Steps to reproduce

  1. Settings → Credentials → set a valid FRED_API_KEY
  2. Navigate → Markets & Data → Economics → FRED
  3. Load any series, e.g. CPIAUCSL
  4. Result: no data; log says Displayed 0 observations. No error is shown (the key is accepted — invalid/missing keys correctly surface an error).

Cause

scripts/fred_data.pyget_series() converts every observation to a number:

python
observations.append({'date': obs['date'], 'value': float(obs['value'])})

but src/screens/economics/panels/FredPanel.cpp (~line 116) reads the value as a string:

cpp
const QString val_str = obj["value"].toString();
if (val_str == "." || val_str.isEmpty())
    continue;

QJsonValue::toString() returns an empty string for a JSON number, so every observation is skipped.

Suggested fix (C++ side)

Accept numeric values, the same way FredAnalyticsPanel.cpp already does (it checks isDouble()):

cpp
const QJsonValue v = obj["value"];
if (v.isDouble()) {
    clean.append(obj);
    continue;
}
const QString val_str = v.toString();
if (val_str == "." || val_str.isEmpty())
    continue;

Changing the script to emit strings instead would break screens/portfolio/views/EconomicsView.cpp, which reads the same output with value.toDouble(), so the fix belongs in FredPanel.

Source: Fincept-Corporation/FinceptTerminal