Check your ETF CSV before a CoTrading calculation
A CSV that opens in a spreadsheet is not automatically suitable for a return experiment. S05 requires a specific meaning for each value as well as valid column names.
Minimal data contract
Use UTF-8 with date,asset,total_return_index. Values must be positive and finite. The manifest declares asset identities, a single valuation currency, a shared calendar, total-return basis, dividend treatment, source, version and digests. It must distinguish synthetic from real data.
| Synthetic CSV row | Meaning | Check |
|---|---|---|
| 2026-10-26,ETF_A,100 | First total-return observation | Identity declared |
| 2026-10-26,ETF_B,100 | Same calendar/currency | Not a different market close |
| 2026-10-27,ETF_A,110 | Next observation | ETF_B row also required |
| 2026-10-27,ETF_B,100 | Flat index | Zero return is valid |
Zero return is different from a zero index, which is invalid. Duplicate date/asset pairs are errors, even if the duplicate amount happens to match. Missing expected days cannot be filled silently.
Do not rename a price column
A bare close is not converted into a total-return index by changing its header. Check whether splits and reinvested distributions are already included. Do not add cash dividends again to an inclusive series. If treatment is unknown, stop the full-total-return experiment.
Investor.gov defines NAV as fund assets less liabilities; it is not evidence that a particular CSV contains investable total returns. Price, NAV, holdings and total-return series answer different questions.
Read-only preflight prompt
“Inspect the confirmed rule, CSV, calendar and manifest. List duplicate pairs, missing assets/dates, invalid numbers and basis mismatches. Do not forward-fill, remove assets or download replacement data. If valid, show the planned interval before calculation.”
For the four-day teaching sample, deleting ETF_B on October 28 should identify that exact asset/date. Asking for 63-interval momentum should also stop: four observations cannot provide 64 complete observations. A short valid fixed-weight sample is not valid for every rule.
Verification and limits
Check row counts against expected calendar dates multiplied by fixed assets, then verify actual pairs; matching counts alone can hide a duplicate and a gap. Save validation output even when it fails. A passed structural check does not prove vendor accuracy, historical availability, redistribution rights or host readiness.
FAQ
May I forward-fill a missing ETF row?
The first S05 contract rejects gaps; obtain a complete authorized input instead.
Is adjusted close always enough?
Only a documented compatible total-return basis qualifies; the label alone is insufficient.