CSV headers with different currency

Hi,

Is there anyone who’s portfolio is set up with GBP or USD. Can you help me clarify if your CSV export headers have either GBP or USD in their names?

F.e. mine is in EUR and looks like this:
Action,Time,ISIN,Ticker,Name,No. of shares,Price / share,Currency (Price / share),Exchange rate,Result (EUR),Total (EUR),Withholding tax,Currency (Withholding tax),Charge amount (EUR),Deposit fee (EUR),Stamp duty reserve tax (EUR),Notes,ID,Currency conversion fee (EUR),French transaction tax

As you can see Result and Total actually have (EUR) in it…

I can check later but IIRC mine is GBP.

You could set your file loader to check for ISO currency codes?

I was using a CSV reader that would do it based on header names and that worked fine until I thought about the fact that it might say EUR because of my own portfolio.

I then switched to an index-based reader, but that was even more problematic because depending on your date range it might not include all the fields. As discussed here: Common format for history export file (CSV)

So I feel like I need to make something custom which is a mix of both, or do pre-processing where I remove all the currencies within parenthesis.

After the scouring the internet for people who are doing the same, I found that a lot of people are not actually dealing with this problem by just ignoring it. Also discovered that some people have Finra Fee as a field.

After unsuccessfully trying to use index-based, I went back to my header-based library and found out they have a normalizer function for headers. Here I use a regex to replace any currency mentions from both my model and the CSV files; \([A-Z]{3}\)