Portfolio Analytics Lab icon

Portfolio Analytics Lab

Local dashboard for Trading212 plus user-managed manual broker inputs.

Welcome

Welcome to your local portfolio analytics lab. The goal is simple: connect your Trading212 data, optionally add other brokers through Data Manager, keep full control of your local files, and turn the available data into useful views for holdings, dividends, PnL, activity, forecasting and decision-quality review.

What works now

  • Trading212 API refresh or local cache-only mode.
  • One-click synthetic demo data so you can explore the dashboard before using your own API key.
  • Manual broker inputs through Data Manager for transactions, dividends, cash flows, crypto rows and open positions.
  • Interactive charts with filters, sortable tables and scrollable table containers.
  • Overview KPIs, current holdings, dividends, PnL, activity, forecasting, decision-quality views and an automatic S&P 500 benchmark cache.
  • Editable symbol mapping so you can enrich tickers with true ticker, asset type, sector, country, ETF/leverage flags and custom portfolio tags.
  • Excel/CSV exports, custom HTML reports, local display settings and transparent source tables when enabled.

First run checklist

  1. If you want to explore first, click Try demo data in the sidebar. It uses fake portfolio data and needs no Trading212 API key.
  2. When you are ready for your own portfolio, create a Trading212 API key with read access to Account data, Portfolio, Metadata, History, History - Orders, History - Dividends and History - Transactions.
  3. Paste the API key and secret in the sidebar.
  4. Choose Full refresh for the first real run, then click Run / Refresh Dashboard.
  5. After a successful first run, use Refresh current year only for faster updates or cache-only mode when you do not want to call Trading212.
  6. Use Data Manager to add other broker or crypto rows, then save and rebuild from local cache.

Important notes

This app is still a local testing version. Data is saved in the app folder under data/, output/ and mapping/. Demo data is synthetic and is marked locally so a later Trading212 refresh can replace it cleanly. Gross dividends are not invented; dividend analysis uses received dividend data available from broker/API/cache/manual inputs. Trading212 history gives orders, dividends, cash transactions and current positions, but not exact historical month-end portfolio values for every holding. Because of that, the dashboard return line is a practical available-data proxy, not a perfect historical valuation engine, TWR or broker MWRR. The S&P 500 benchmark is approximate and excludes S&P dividends, EUR/USD FX, taxes and fees. Reported realized PnL is used only where broker or manual source data provides it, so older sells may appear without realized PnL until we add a proper recalculation engine.

Coming later

Let's see.

Benchmark process: what to expect

The benchmark module is automatic. On each dashboard run/rebuild, the app tries to update a local S&P 500 daily-close cache from free public sources. If online fetching fails, it falls back to the last cached file. If no benchmark cache exists yet, benchmark lines are hidden and the status box explains why.

How the S&P 500 virtual portfolio is calculated:
1) The app summarizes your activity by month and calculates monthly net buy value = buys minus sells from Trading212 orders plus manual source inputs where available.
2) For each month, it virtually invests that same net amount into the S&P 500 price index at the month-end close.
3) The virtual S&P shares are carried forward and revalued each month using the next month-end close.
4) The result is an approximate answer to: What would my portfolio value look like if I had deployed the same cash-flow timing into the S&P 500 instead?

Important limitations: this is a basic benchmark, not a professional performance report. It excludes S&P dividends, EUR/USD FX conversion, taxes and fees. Trading212/API history does not provide exact month-end portfolio value for every past month, so the actual return line is an available-data proxy, not TWR, broker MWRR or true historical valuation.

Changing this recalculates the visible S&P simulation from that month onward. The actual line remains approximate because exact historical month-end portfolio values are not available yet.

Portfolio cash-flow & benchmark timeline

Use this chart to compare cash deployed, dividends received, and the simulated S&P 500 portfolio value based on the same monthly net buy cash flows. If the S&P line is missing, check the status box below the chart.

Ctrl/Shift-click to select multiple lines. S&P line uses monthly net buy value as virtual benchmark cash flow.

Portfolio return proxy vs S&P 500 return line

This chart starts from the selected benchmark month and shows approximate return percentage over time. The S&P line uses the same monthly cash-flow timing as your portfolio. The portfolio line is a proxy built from available dividends, reported realized PnL where available, and current open PnL where available. It is not a true time-weighted return, broker MWRR or exact historical valuation.

Top current positions by calculated market value in account currency.

LLM portfolio analysis prompt

Copy this to your preferred LLM.



Filters

Symbol filter uses exact symbol matching. Examples: O matches only O, not Google. Use semicolon for multiple symbols, e.g. NIO; BABA; AAPL.

Filtered current holdings by market value. Use the filters above to isolate asset type, sector, broker or a custom top-N view.

Dividend analysis uses received dividends from available broker/API data plus manual source inputs. Gross dividends are not calculated unless the source provides them clearly.

Symbol filter uses exact symbol matching. Example: O matches only O. Use semicolon for multiple symbols. When all brokers are selected, monthly/quarterly charts aggregate brokers into one value per period.

Current version focuses on price PnL, FX impact and total unrealized PnL. Use the filters below to review all brokers together or isolate one broker/source.

Symbol filter uses exact symbol matching and supports multiple terms separated by semicolon, comma or space.

Forecasting

How to read this tab:
Forecasts are scenario models, not predictions. The two method selectors create history-based lines from the data currently loaded from broker/API cache plus manual source inputs. You can also hide either history line from the same dropdown, or show extra comparison lines such as Base, Conservative, Optimistic and Manual user-defined. The method details below explain the selected historical formula, source data, caps and assumptions used.

Ctrl/Shift-click to select more than one extra line.


Method assumptions

Forecast computation notes

History-based portfolio line: Year 0 starts from the current calculated holdings value. Each next row is calculated as (previous portfolio value + previous annual dividend) x (1 + selected historical return assumption). No future cash contribution is assumed in the history method line.

History-based dividend line: Year 0 starts from trailing-12-calendar-month dividends where available, otherwise the latest available annual dividend amount. Each next row is calculated as previous annual dividend x (1 + selected historical dividend-growth assumption).

Extra comparison lines: Base, Conservative and Optimistic use fixed assumptions. Manual user-defined uses the inputs above and can include future annual contributions. No external dividend history, analyst estimates or market-price forecasts are used.

Portfolio value forecast. Includes the selected portfolio history method unless hidden, plus any selected extra comparison lines.

Annual dividend forecast. Includes the selected dividend history method unless hidden, plus any selected extra comparison lines.

Forecast calculation detail

Each row shows the selected historical method and any extra comparison lines, including assumptions and exact calculation steps.

Activity / Orders

This tab uses parsed broker order history plus manual source inputs where available. Realized PnL is only as good as the broker/manual data provides, so older sell orders may still be incomplete.

The date filter is applied to the yearly/monthly Activity charts and the orders table below. Symbol filter uses exact matching and supports multiple terms separated by semicolon, comma or space.

Net buy value by year: buys minus sells from broker order history plus manual source inputs where available.

Reported realized PnL by year, only where broker/manual source data provides realized PnL fields. Older sells may exist without reported realized PnL.

Monthly net buy activity to see when cash was deployed or positions were reduced.

Decision Quality

Experimental decision-quality view using available broker data plus manual source inputs. It combines buys, sells, open PnL, reported realized PnL and dividends by symbol. This is not tax-grade realized PnL and cannot judge decisions where history is incomplete.

These filters apply to both Decision Quality plots and the table. Symbol filter uses exact matching and supports multiple terms separated by semicolon, comma or space.

Best observed result = reported realized PnL + current unrealized PnL including FX + received dividends.

Best open return % by symbol, based on current open position cost basis and current unrealized PnL including FX.

Worst observed result from the same filtered symbols.

Worst open return % from the same filtered symbols.

Data Manager

This is the user-friendly source/input layer. First load Trading212 data from the sidebar. Then add or upload manual data from other brokers here, save, and rebuild the dashboard from local cache. The app keeps broker API raw files untouched and combines your manual inputs during dashboard processing.

Important principle: edit source-level inputs here, not final dashboard result tables. Manual rows are stored locally in data/manual_inputs/. When you save, the dashboard is recalculated so Overview, Dividends, Activity, PnL, Forecasting and Decision Quality can reflect these additions.

Manual transactions

Use this table for manual buys, sells, dividends, deposits, withdrawals, fees, taxes or FX adjustments from other brokers or corrections. For BUY/SELL/DIVIDEND, symbol is required. If the row is not in account currency, fill currency and fx_rate_to_account_currency.

Example rows:
Dividend: enabled=TRUE, date=2026-03-15, broker=manual_broker, event_type=Dividend, symbol=O, net_amount=25.50, currency=EUR, fx_rate_to_account_currency=1.
Buy: enabled=TRUE, date=2026-03-20, broker=manual_broker, event_type=Buy, symbol=AAPL, quantity=2, price=180, gross_amount=360, currency=USD, fx_rate_to_account_currency=0.92.

Manual positions

Use this for holdings from another broker or manual open-position corrections. Provide either market_value_eur, or quantity + current_price. If the row is not in account currency, fill currency and fx_rate_to_account_currency so values can be converted.

Example row:
enabled=TRUE, broker=manual_broker, symbol=VWCE, quantity=10, average_price=100, current_price=115, market_value_eur=1150, cost_basis_eur=1000, currency=EUR, fx_rate_to_account_currency=1.

Validation warnings

This table is read-only. It does not accept rows. It only shows warnings/errors found in your manual inputs, for example missing date, missing symbol, missing amount, missing FX rate, invalid event type, or a position without enough value fields. If it is empty, no obvious issue was detected.

Self-Service Charts

Create quick exploratory charts from any dashboard table. Choose X and Y, then optionally split the plot by one useful category such as broker, year, sector or asset type.


Mapping file

Use this tab to enrich broker symbols with true ticker, clean display name, asset type, sector, industry, country, ETF/leverage flags, risk bucket and custom portfolio. After saving, the dashboard is refreshed from local cache, so no Trading212 API call is needed.

Download mapping CSV

Editable mapping table

Exports

Download latest Excel workbook

Use this tab for full workbook export, custom HTML reports, and individual CSV downloads. The report builder creates a standalone HTML file from selected visible dashboard sections. Open that file in a browser and use Print / Save as PDF when you want a PDF copy.