ZodError
at https://app.mycapitally.com/assets/dedicated-worker-BweVZ6hr.js:1499:27542
at Aj (https://app.mycapitally.com/assets/dedicated-worker-BweVZ6hr.js:361:31033)
at rSe (https://app.mycapitally.com/assets/dedicated-worker-BweVZ6hr.js:1499:27530)
at Y2 (https://app.mycapitally.com/assets/dedicated-worker-BweVZ6hr.js:1524:106877)
at Array.reduce (<anonymous>)
at X2 (https://app.mycapitally.com/assets/dedicated-worker-BweVZ6hr.js:1524:106963)
at Bje (https://app.mycapitally.com/assets/dedicated-worker-BweVZ6hr.js:1659:28648)
Hi Rafal, I am trying to export a portfolio and import it back. While it works, the calculation of returns is not being done correctly, or at least they don’t match. This is what Claude tells me when comparing the exports of the two projects: “Since qty/value/principal almost always match but returns.period does not, the problem seems to be in how that field was calculated or exported (possibly different date windows, or a calculation/attribution error in one of the two reports), not in the positions themselves. It also drags along the allocation and returnsAttribution.period fields, which depend on those returns.”
First, check that both projects are using the same date range, display currency, and performance calculation options. If they match, attach both JSONs - the original and the one exported after re-importing it - so I can compare exactly what changes in the performance metrics.