Portfolio Inspector
Modified on 2020/08/30 10:04 by Eugene — Categorized as: Visualizers
The
Portfolio Inspector
is a tool designed to show how the portfolio composition would look at any given day for a portfolio simulation. It provides a holistic approach to portfolio analysis, acting as the Trades tab combined together with the Equity Curve chart, and giving even more insight with useful performance metrics from the Performance tab.
The Portfolio Inspector is a fast way to see what kind of portfolios the system would have constructed, and a professional user could easily see if it is a sane way to construct a portfolio or not.
The Portfolio Inspector window is horizontally divided in two zones: the control area at the top that allows to select a date to analyze and also displays the equity curve chart with portfolio performance metrics, and the table area at the bottom with four tables providing detailed information. To resize the chart/tabular/performance numbers areas freely, position the mouse cursor in between the zones until the cursor changes, then click and drag.
The chart has a context menu, allowing to change the scale between Linear (default) and Semi-Log, and to show or hide the Buy & Hold equity. By default, Buy & Hold isn't displayed. The curve is always plotted on its own axis, to prevent possible chart distortion and always keep the portfolio equity accessible
Example use cases
User tests a new diversified futures trading system on 100 different futures which produced an extremely good result for one year but suddenly started taking massive losses next year. To find the culprit of the crash, the user is stepping through day by day in the Portfolio Inspector screen, to see what instruments were held in the portfolio. He realizes that the system was not properly diversified, and the reason for its huge losses was going short 30 different equity futures contracts all around the same time. Finding this risk concentration unacceptable, he goes back to redesign the system to avoid such behavior.
You see a big drawdown day. By clicking on the equity curve, it's easy to visually select the date and quickly see what happened and how the portfolio looked before and after.
Time navigation
There are 3 ways to navigate in time:
Pick any date from the Date Picker, or type it directly
Drag the horizontal slider to advance several bars at a time, or click the arrow buttons to step one day back and forth easily
Click
on
the green equity line.
They all act in sync, so the changes to the current date made in other controls will be reflected in the Date Picker.
Portfolio Performance
The tool works in Portfolio Simulation mode (fully) for which it was designed, and in Raw Profit mode, where its capabilities are limited to show only a subset of the performance metrics. As some numbers are not available in RP mode, you will notice it.
The following metrics are displayed for a selected date:
Portfolio value
Buy&Hold for comparison
Daily change of the account
Year-To-Date (YTD) and Month-To-Date (MTD) percent return, which are in line with Wealth-Lab's "By Period" readings.
New, closed and total positions today
Long and short exposure
Exposure is calculated for long and short positions as:
Dollar size of all long (or short) positions * 100 / Equity(day)
The five views
The five tables show the portfolio performance by instrument in a Table and as a Pie chart, by each position, by child strategy for Combination strategies, and trades by day. Each table is sortable by clicking the column title. Profitable instruments, positions or trades are highlighted in
green
and losers are highlghted in
red
.
The contents of By Instrument, By Position, By Strategy and Trades tabs can be copied to clipboard if you right click and select the option from the context menu.
Portfolio By Instrument
Accumulates all open positions on a given date for an instrument and shows the aggregate position.
The "Days held" and "Entry date" readings are based on the first taken position in the instrument. If at end of day there's no position held in an instrument, it's not reflected on this list.
The visualizer fully supports multi-position systems. For single position systems, the "Average Entry" column just shows their regular entry price. But if your system can hold more than one position in an instrument on a given date, the "Average Entry" column will show the average entry price of the total position, which is the sum of all positions in this instrument divided by the position count. The same applies to the "Shares (Contracts)" tab that shows accumulated shares (contracts) for an instrument.
The table is sortable by clicking the column title. Columns can be repositioned by dragging the mouse.
Portfolio By Position
List all open positions on a given date for all instruments. Entry price will re-use Symbol Info Manager settings, or will use 2 symbols after the decimal point by default. If at end of day there's no position held in an instrument, it's not reflected on this list.
The table is sortable by clicking the column title. Columns can be repositioned by dragging the mouse. Double-click on a Position to center the Wealth-Lab chart on that trade.
With Combination strategies, the table will identify Combo child strategy name for all positions.
Portfolio By Strategy
For Combination strategies (the new multiple system backtesting wizard in WL 6.2 and higher), the table offers a breakdown by Combination child strategy for a given date. The following performance metrics are included: the exposure percentage, long/short shares (contracts), the number of symbols with open long/short positions. If at end of day there's a child strategy isn't holding a position, it's not reflected on this list.
The table is sortable by clicking the column title. Columns can be repositioned by dragging the mouse. Double-click on a Position to center the Wealth-Lab chart on that trade.
Trades
Prints all trades which happened on a given date for all instruments, indicating whether the trade was an "Entry", "Exit" from an open position, or a "Roundtrip" trade opened and closed within the same bar. Entry and exit prices will re-use Symbol Info Manager settings, or will default to 2 symbols after the decimal point (if no SymbolInfo was found).
The table is sortable by clicking the column title. Columns can be repositioned by dragging the mouse. Double-click on a Position to center the Wealth-Lab chart on that trade.
With Combination strategies, the table will identify Combo child strategy name for all positions.
Assets
This is the "Portfolio By Instrument" view as a pie chart. Accumulates all open positions on a given date for an instrument and visualizes the holdings in an instruments as a percentage of the portfolio.
Known issues
Profit/loss and PnL% are 0 for trades held for only 1 bar
Profit/loss and PnL% are 0 for symbols that suddenly stopped trading (like GMGMQ.PK or an expired futures contract)