Support to export to Yahoo Finance & other portfolio tools

Trading 212 doesn’t have a whole lot of tools to analyse the stock portfolio like many other apps built just for this purpose. It would be nice if there’s an API or means by which we can export trades to other platforms.

I wrote a simple script to convert the Trading212 CSV files into a format you can easily import to Yahoo Finance. But this has to be done manually - would love to see a long term official solution that works automatically.

6 Likes

nice script noticed it not picking ETFs or Europe

Unknown symbol VNRT
Unknown symbol USDV
Unknown symbol VUSA
Unknown symbol VMID
Unknown symbol VUKE
Unknown symbol VWRL
Unknown symbol VEUR
Unknown symbol VHYL
Unknown symbol VUSA
Unknown symbol VUKE
Unknown symbol VEUR
Unknown symbol VHYL
Unknown symbol VMID
Unknown symbol USDV
Unknown symbol VWRL
Unknown symbol VNRT
Unknown symbol VNRT
Unknown symbol VNRT
Unknown symbol VEUR
Unknown symbol VMID
Unknown symbol VUSA
Unknown symbol VWRL
Unknown symbol VHYL
Unknown symbol VUKE
Unknown symbol USDV
Unknown symbol UKDV
Unknown symbol ROG
Unknown symbol ROG
Unknown symbol ROG

Happy to take this further on GitHub issues. But here’s what’s happening:

  • Yahoo Finance doesn’t always use the same tickers as Trading 212.
  • From my experience:
    • USD tickers can be mapped directly
    • GBP / GBX tickers typically have “.L” appended at the end
    • EURO tickers didn’t have a defined pattern so, I had to find the manual mapping

That’s the crux of the issue. If people have suggestions on how to work around this, glad to take this up. Here is the manual symbol map.

For your case, you just need to map these to corresponding tickers on Yahoo Finance. It’s a one time change and it should work from there on. Hope that helps.

Ideal you need a look up on ISIN rather than ticker, but usually if the currency is GBP or GBX then probably ticker.L

See yahoo does not use ISIN so maybe difficult

Thanks for checking. ISIN was my first choice but ran into the same roadblock. I couldn’t find any other way than to use a manual map - I’m working on moving the map to config file so that each user can have their own personal map.

Let me know if you find a way to avoid this mapping.

You right there need to be a mapping https://www.isin.net/country-codes/

Start two letter drive the location, but they you need the corresponding response of Yahoo.

either way if do of ISIN or currency same issue.

Best approach is to allow the user to do themselves, most will be GBP, GBX, USD is the European ones that are hard and will be easier to map on ISIN, so probably move over to ISIN mapping than using currency

1 Like

I don’t think this is an issue with 212. Its a lack of standardisation in the industry.

The problem using ISIN or ticker is that they can be multi listed and even use different currencies.

Europeans use ISIN.
Americans use CUSIP.
UK use Sedol.

I’ve not exported in a while, but a mapping to an exchange could potentially be done through currency. That or if there was more data fields 212 could add(exchange), that might also help.

1 Like

You aren’t concerned about your data privacy?
Giving trading information to a third-party?
Specially a US Big Tech.

Do you know who have access to your financial data? :wink:

I would prefer getting the quotes from a third-party than offering my investment data to them. For example, using Excel or Python to have my portfolio and updating their prices from a third-party. And this way, it’s more customizable.

Importing and not exporting.

2 Likes

If you are aware of any Open source portfolio that works well for this, I would love to look into adding support to it’s importing format.

Maybe could be interesting creating a Excel Template with all the Stats and Graphs that pull out the quotes to update them.

Possible steps:
1 - Download your T212’s CSV transaction history
2 - Customize your Excel’s portfolio (country or asset class or sector or currency or any other category you like) based on the CSV
3 - Create the Stats and Graphs you like to see based on your previous configurations (Standard Deviation, Sharpe/Sortino/Treynor/Jensen Ratios, Local currency CAGR, converted to your national currency CAGR, Drawdowns, VaR, CVaR, etc).
4 - Link to third-party source to update prices
5 - Enjoy

I pull quotes from different sources according to the instruments types and using different software. It’s time consuming and boring. One of the major problems is the same already mentioned, the symbol/ticker/ISIN and exchange.

You could have the same ISIN for different markets, also happens for the ticker, and opposite also happens, different tickers for the same instrument.

Other problem is the instruments availability, not all instruments are available in every source. That why I have multiple sources.

Other problem is more technical, pulling the quotes. That why I pull it with several software.

For those, willing to try a DIY Excel portfolio, Excel 365 have a live free quotes built-in that pulls out prices and other information for Stocks, ETFs and Investment Trusts in several markets from Refinitiv. Expect a price delay.

With the latest changes, you can add all your manual mappings in the config.ini file. This allows you to pull future improvements to the script without risk of conflicts.

I modified mine so GBP is also .L, FYI be careful of Stock splits number of total shares maybe wrong as this not part of transactions, so Apple and Tesla maybe wrong if you own it.

In my experience, all GBP stocks are reported as GBX. I think there’s no need for mapping GBP to .L as well but there’s also no harm in doing so.

I noticed issues with Tesla and Apple due to stock splits. Not sure how to handle that. Any suggestions? - I was hoping Yahoo finance would be able to handle them correctly from the dates of the trade but apparently not.

Not all UK stocks are priced in pence, as denominated by GBX, perhaps just the ones you purchase?

1 Like

Oh, that’s good to know. I will add GBP as well for .L

I not sure there much you can do about split as does not form part of the export data as discovered, the only way is to web scrape the front end

I’m the founder of a stock portfolio tracker and an API for this would be really useful. Currently, if you invest though trading212, you have to add your orders manually.

What stock portfolio tracker have you built - can it import and map from the CSV?