Data analysis

Data quality before the dashboard:
what must be right?

A dashboard can look clean and still produce wrong answers. Before the first chart, provenance, structure, units, time ranges and metrics must be defined. This guide covers the checks I use before analysing data.

Simon Stark|Published 11 September 2026|Approx. 13 min read

01

A dashboard only answers a clearly defined question

The chart comes late. First decide what the metric is supposed to measure. “How is my portfolio doing?” could mean the account balance, investment performance, portfolio value including deposits or real return after inflation. Every one of those can be calculated correctly and still answer a different question.

Before analysing, write down at least the observation, period, unit and rule. A monthly portfolio series needs a definition for whether 2026-01 means the start of the month, its closing value or an average.

Target metricWhat counts as an observation?Unit
Portfolio valueAccount value at a defined cut-off dateEUR
Period returnChange between consecutive cut-off datesDecimal internally, e.g. 0.05
Cumulative returnChange from the first to the last valuePercent
DepositCash entering the portfolio from outsideEUR
First check: If you cannot describe the question in one sentence with a period and unit, the analysis is not ready for a dashboard.

02

Every number needs provenance and a reference unit

A value alone is rarely enough. An observation needs its source, retrieval time, date or period, time zone, unit, identifier and the rule that produced it. Without that context, an export may look complete but cannot be interpreted safely later.

CheckQuestion before analysis
SourceWho supplies the value, and is it an original series, a proxy or an estimate?
TimeWhich date and time zone apply? Is it daily, monthly or quarterly data?
GranularityDoes one row represent one day, one month, one security or an existing sum?
UnitIs the value EUR, USD, percent, percentage points, units, grams or an index level?
DefinitionIs it a price, return, price index, total-return value or forecast?

One row per day cannot automatically be compared with one row per month. Combining data requires a deliberate aggregation. A month-end value, monthly average and sum of daily returns are different quantities.

The asset-class backtester therefore defines exactly which series are compared. S&P 500, Bitcoin and gold sound unambiguous in conversation; in the model they are specific series with their own currency, trading calendar and source.


03

Keep raw data unchanged

I separate raw data from the cleaned working file. The raw file remains exactly as delivered. The cleaned file contains consistent dates, column names and number formats. This makes it possible to distinguish an error in the source from an error introduced during conversion.

  1. Retrieve: Save response, status, content type and retrieval time. A successful connection is not yet a valid import.
  2. Preserve: Do not overwrite the raw file. Keep earlier deliveries traceable when a source publishes a new version.
  3. Parse: Check expected columns, data types and separators. A CSV response containing HTML is not a CSV.
  4. Normalise: Convert dates, decimal separators, currencies and percentages into a defined internal format.
  5. Log: Record rejected rows, gaps, source changes and warnings instead of silently deleting them.
  6. Analyse: Build charts and metrics only from the checked dataset.

A concrete example from the data work behind my backtester: some supposed CSV requests returned HTTP 200 while the content was an HTML page. Checking only the status code marks the download as successful and moves the failure to the parser or dashboard.

Practical rule: Store the source and quality status next to the value. Then a single point on a curve can later be traced back to its original request.

04

0.05 and 5 can both be correct numbers

The most common error is not the formula but the representation before it. A 5% return may be stored as 0.05 and displayed as 5.0%. Both describe the same value, but only one belongs in a function expecting a decimal.

r = 0.05 Vnew = Vold × (1 + r) €10,000 × 1.05 = €10,500If the function expects 5 at this point, it produces €60,000 instead of €10,500. The calculation runs, but the input is conceptually wrong.
FieldInternal representationDisplay
Return0.055.0%
Share0.2525%
Price123.45€123.45
Exchange rate1.081.08 USD per EUR

Percentage points, basis points, price versus return, nominal versus real values and different currencies add further traps. Each field needs a precise definition. Percent signs belong in the display, not in a column whose parser expects a number.

The fastest counter-check is a known record. Take one value from the raw file through to the display and compare every intermediate step. One test case often finds decimal errors earlier than a complete dashboard screenshot.


05

Blank is not zero

A genuine zero is an observation. A blank usually means that no observation exists. These cases must not receive the same meaning.

Suppose a portfolio is €10,000 in January and €10,500 in February, but March is missing. Replacing the gap with a 0% return makes March look stable. Carrying forward €10,500 makes the chart look complete even though no new March observation exists. Both replacements change the analysis.

  • 0% return: A valid observation with no change.
  • Blank value: No usable observation for the expected period.
  • Carry forward the last value: Useful for a shared display axis, but it is not a new return observation.
  • Interpolate: Only with a documented reason and visible label. A plausible number does not make a gap real.

This distinction is central to the asset-class backtester. Exchanges close at weekends while Bitcoin trades continuously. The shared chart carries forward the last known value, but risk metrics use actual observations so weekends do not become extra days with 0% returns. The full method is documented here.

Before calculation: Count expected periods, existing periods, gaps and the last real observation. A chart should expose this information instead of hiding it behind a smooth line.

06

Duplicates and ordering change the metric

A row with a date and value is not automatically a unique observation. The key must fit the model. For a daily price series it might be series plus date; for a portfolio with multiple accounts, the account ID is part of the key. For monthly data, decide whether a later source revision replaces the old value or becomes a new version.

ErrorPossible effectClean response
Duplicate dateA day or month receives too much weight.Check the key, decide on the revision and log the difference.
Descending timeReturns are calculated in reverse order.Parse dates and sort ascending before calculating.
Locale error1,234.56 is read as 1.23456 or 123456.Define decimal and thousands separators for the source.
Source revisionOld and new versions remain in one series.Mark the version and select exactly one valid observation.

Do not automatically average two values for the same day. That would be a new business rule and could hide an error. First establish whether a source was corrected, two venues were combined or the date was assigned incorrectly.


07

Plausible data can still be conceptually wrong

A value can parse as a number, be positive and sit in a normal range while still having the wrong meaning. Plausibility checks therefore need two levels: technical errors that stop an import and domain warnings that require review.

CheckExampleDecision
Technically invalidDate unreadable, required column missing or content type wrong.Stop the import and report the error.
Structurally invalidDuplicate key without a resolved revision.Hold the record; do not silently average it.
Domain warningUnusual jump, long gap or stale last observation.Mark and review; do not overwrite real jumps automatically.
Definition checkForecast mixed into a series of historical actuals.Separate it and label it in the dashboard.

Thresholds are signals, not truths. A price can jump sharply in one day, and a nutrient value can fall outside an expected range because a new product was added. The check should focus attention, not force the data to fit.

Good warning: “Value on 14 March is 48% above the last observation; check source and unit.” Bad cleaning: “Cap the value so the curve looks calm.”

08

A correct formula can still answer the wrong question

For a monthly portfolio series, the average of monthly returns is not automatically the annual return. Returns compound along the portfolio path. The metric also needs to know whether deposits and withdrawals are included.

Ending value = starting value × ∏ (1 + rt) Total return = ending value / starting value − 1 Annualised return = (ending value / starting value)12 / n − 1Here n is the number of monthly periods actually included. With deposits, use a definition that accounts for cash flows.

A small example shows the difference: a month at +10% followed by a month at −10% has an arithmetic average of 0%, but the value path fell: 1.10 × 0.90 − 1 = −1%. The dashboard must say which quantity it shows.

If €1,000 is added during the series, ending value / starting value − 1 mixes investment performance with the deposit. A return analysis then needs a cash-flow-aware definition, such as time-weighted or money-weighted return. The formula cannot decide that for you.

  • Price: Value of an instrument at one point in time.
  • Period return: Change between two real observations.
  • Cumulative return: Compounded change over the full period.
  • Forecast: A projection that should remain separate from actuals in the data model.

09

A short review that works before every analysis

  1. Record the question: What should the metric answer, for whom and over which period?
  2. Secure raw data: Keep source, retrieval time, original file and response status.
  3. Read the structure: Check columns, types, granularity, keys and time zone.
  4. Normalise display: Define date format, decimal separator, currency and percentage format.
  5. Measure completeness: Report missing values, duplicates, order and last real observation.
  6. Check plausibility: Stop hard errors; flag jumps, gaps and source changes.
  7. Recalculate one row: Manually follow a known value from raw number to dashboard display.
  8. Name the metric: Document formula, unit, data basis and exclusions beside the analysis.

For a small dashboard, a review page or a short log with clear fields is often enough. The important thing is that a bad import becomes visible before it is passed on as a colourful chart.

My release threshold: A red check blocks the metric. A yellow check allows it only with a visible warning. A green check means the defined technical and domain checks passed.

10

The same principle applies to backtesters and solvers

In the asset-class backtester, the work starts before the curve: choose a concrete series, define currency and exchange rate, respect the trading calendar, separate missing observations and disclose the data date. The chart can only show what those rules allow.

In the nutrition calculator, the failure point is different but the rule is the same. Price and nutrients refer to a defined basis. Functions such as foodPrice(f), UNIT_META and buildModel() depend on it. If a value stored per 100 g is interpreted as a package, the solver can produce a mathematically valid plan that is conceptually wrong.

A dashboard and a solver look different, but before calculation both need clear answers: What does one row mean? What unit is the value in? Which observations are missing? Which rule decides whether a deviation is acceptable? Only then is it useful to decide how the result should look.


Check the backtest data basis

Choose a period and asset classes, then read series, ending value and risk together with the methodology.


Read next

Related content