Getting Started

Portfolio Construction helps you compare, stress-test, optimize, hedge, and rebalance multi-asset portfolios. Most tabs use the same basic pattern: choose a date range, define one or more portfolio groups, click Run, then inspect charts, tables, and the Navigate to... dropdowns for follow-up analysis.

DD-MM-YYYY
Date fields use this format; leave blank for full history
Ctrl + Enter
Run the active analysis from the keyboard
Share Link
Create a link that restores the current tab inputs
Snapshot
Copy or paste a tab setup, including its latest visible status
Autocomplete
Search assets by dataset name, ticker, or alias
Rebal 0
Never rebalance; hold the starting allocation through time

Where To Start

GoalSuggested tabWhat to watch
Understand the appIntro gives the investing context and core concepts.Asset classes, diversification, drawdowns
Replay a portfolioBacktest shows historical growth, drawdowns, rolling metrics, correlation, and beta.CAGR, Sharpe, max drawdown
Find an allocationFrontier searches many weight combinations and marks the best trade-offs.Sharpe, return, volatility, worst drop
Forecast outcomesForecast bootstraps future portfolio paths from historical daily return blocks.Ending value ranges, median, tail percentiles
Size leverage carefullyMargin estimates leverage capacity from worst losses and maintenance margin.Safe leverage, margin proximity
Study option protectionHedge compares backspread overlay settings on top of a portfolio.Worst drop, drawdown, hedged CAGR
Compare funding currenciesCurrency tests USD/EUR/GBP/JPY/CHF borrowing mixes.Carry, FX move, safe leverage
Evaluate a candidate assetCWARP ranks assets by how much they improve a base portfolio.CWARP score, scatter position
Compare equal-risk outcomesMatch finds the leverage needed to match a chosen metric.Matched leverage, growth, drawdown
Scan fixed leverageLeverage sweeps leverage levels without margin-call checks.CAGR, volatility, drawdown
Check diversificationCorrelation shows rolling relationships between groups.Correlation, beta, return scatter
Plan tradesRebalance converts current holdings into buy, sell, borrow, and repay actions.Trade list, cash, leverage, risk metrics
Inspect trend fundsTrend summarizes KMLM, CTA, and DBMF live positioning and local snapshot history.Gross exposure, net exposure, categories, shifts
Study BH MacroBH Macro compares the share price with NAV (premium/discount) and how it behaves when VIX spikes.Discount vs VIX, crisis episodes
Analyze IBKR statementsIBKR parses an activity statement locally and converts rows to EUR.Expenses, pricing plan, 2074, 2TR
Price short boxesBox converts box-spread credit and annualized rate for major index options.Rate, credit points, notional
Buy via an ITM putPut builds a breakeven ladder for acquiring shares by selling an in-the-money put, against buying outright.Breakeven premium, effective entry, entry delta
Look at FX and ratesForex shows policy rates, funding-return correlation, and pair history.Trailing rate, pair chart, correlation
Inspect one assetAssets shows one asset's basic history and summary stats.Date range, CAGR, volatility, drawdown

Intro

Intro explains the core investing ideas behind the tool: diversification, long-run compounding, risk, drawdowns, and why mixing different return drivers can matter more than simply adding more assets. Its examples use longer-history simulated proxies for global equities and compare both DBMF and KMLM trend-following proxies.

Backtest

Replay one or more portfolios over history. Use it after choosing an allocation to understand growth, drawdowns, rolling performance, correlation, and beta through different market regimes.

InputDescription
Date rangeOptional start and end dates. Blank fields use the longest shared history.
Portfolio groupsAssets, weights, optional nested groups, and per-group rebalancing frequency.
FundingFor leveraged portfolios, choose one borrowing currency, a USD/EUR/GBP/JPY/CHF debt mix whose weights total 100%, or a custom fixed annual rate with no FX movement.

Output: growth, drawdown, rolling metrics, correlation or correlation matrix, rolling beta versus SPYSIM, and summary metrics.

Frontier

Search many allocation mixes and mark the portfolios with the best return/risk trade-offs. Use the scatter chart to see whether a high-return allocation is taking much more risk than alternatives.

ControlHow to use it
Step % / PrecisionSmaller steps or higher precision inspect more possible allocations and take longer.
Min alloc %Avoid tiny non-zero weights when you want more practical portfolios.
Auto-run MarginAlso show which frontier portfolios remain attractive after margin safety is considered.
Auto-run Margin + HedgeAlso show how the backspread overlay changes safe leverage and drawdown behavior.
Per-asset maintenanceEach portfolio row carries its own maintenance-margin %, defaulting from the asset's metadata (then 25%). The margin frontier blends these by weight per allocation, so safe leverage reflects the real margin requirement of each mix.
Maint BufferOn the Margin / Margin + Hedge cards: nudges the blended maintenance up or down (−50%…+50%) before sizing leverage — a cushion for intraday moves or tighter house requirements. Mirrors the Margin tab's MC Buffer.
Max LeverageCaps applied leverage at your chosen ceiling (1:1 no leverage … 4:1 maximum). Portfolios whose safe leverage exceeds the cap are held at the cap. 4:1 is the practical maximum.

Output: optimal portfolios for Sharpe, return, volatility, Sortino, drawdown, and worst drop. Click any scatter point to inspect weights or send it to another tab via Navigate to… — the per-asset maintenance, buffer, and leverage cap carry across so the Margin tab reproduces the same numbers.

Rolling optimal allocations. The rolling-window optimizer (best Sharpe / volatility / Sortino per window) scores allocations on a lag-adjusted covariance, the same Scholes-Williams correction used for beta and correlation. This matters for books that mix assets trading on different exchange schedules: without it, a fund closing hours before the others looks more diversifying than it really is and gets over-allocated. The correction is a no-op for assets that trade on the same schedule.

Funded constrained results: the dense cloud is a fast screening population for visual distribution; funding currencies are clipped to their common live calendar before any funded evaluation. The objective optima (stars) and any point you click are solved exactly on the full funding path, searching round currency blends within the Step % grid, so a screening estimate is never treated as a funded result on its own.

Margin proximity: funded optimum charts show the realized equity-to-assets ratio from the selected funding path, including FX-revalued debt and resets. Safe leverage is sized against a stricter intraday-stressed path, so the plotted minimum can remain above the sizing threshold.

Reading the scatter: every dot is a screening estimate, colored by its safe leverage, for visual distribution. Stars mark the best funded blend for each objective (the same portfolios the summary table lists), drawn at their position in the cloud. Clicking any dot exact-solves that portfolio's funded path before showing its details, so the numbers you read match the summary and what the Margin tab reproduces on hand-off.

Forecast

Estimate a portfolio's future value range by resampling contiguous historical daily return blocks. Asset returns and the USD risk-free-rate row are sampled together, so each synthetic path keeps the historical co-movement observed inside sampled blocks.

ControlHow to use it
Date rangeHistorical window to sample from. Blank fields use the full shared history.
To / PrecisionChoose the forecast end date and sampling precision. Higher precision improves distribution detail but takes longer.
Block yearsShorter blocks mix history more aggressively; longer blocks preserve longer return regimes.
SeedLeave blank for a generated seed, or reuse a seed to reproduce a run.
Withdraw every … daysHow often you withdraw. Sets the cadence for the Max SWR (safe withdrawal rate) calculation.
Fixed SWRYour planned annual withdrawal rate. Caps the Max SWR row (it reads lower where paths fall short), marks the income charts, and draws the depletion fan. Blank shows the maximum sustainable rate.

Output: aggregate metric percentiles (incl. Max SWR), a monthly portfolio-value range chart, and an Income card you can switch between income-vs-success %, income-by-confidence bars, and a depletion fan.

Margin

Estimate how much leverage a portfolio can carry before a historical loss would breach maintenance margin. Use this for leverage sizing rather than the simpler Leverage tab.

InputDescription
Maintenance margin %Per-asset margin requirement. Dataset metadata supplies the default when available; otherwise it starts at 25%.
MC BufferAdjusts the blended maintenance up or down (−50%…+50%) before sizing leverage.
Max LevCaps the applied leverage at your ceiling (1:1…4:1). The reported safe leverage is the capped value. 4:1 is the practical maximum.
Top DDNumber of worst drawdown episodes to inspect in detail.
Extra margin periodsAdd date ranges where margin requirements should be treated as higher.
Backspread overlayOptionally include the same protective overlay studied in Hedge. With it off, Margin uses the full portfolio and risk-free common history; turning it on requires SPX/VIX, so the analysis window may shorten to their start (Jan 1990).

Output: safe leverage, margin-call proximity, leveraged growth, drawdowns, top episodes, weight drift, and hedge effect when enabled.

Funding and overlays: funding bounds must permit weights totaling 100%. Base and hedged tracks select blends independently; Match leverage applies the lower leverage afterward while retaining both blends. With TIMS enabled, scenario margin reduces the safety cushion only. Displayed hedged return and drawdown use pre-TIMS equity so margin demand is not counted twice. An infeasible result means no tested blend remained safe even at 1x on the selected history.

Margin-call days: proximity charts and counts use the realized funded equity-to-assets ratio. A day is counted only when that ratio is below the portfolio's raw maintenance requirement. MC Buffer changes the stricter threshold used to size leverage; it does not redefine an actual maintenance breach.

Hedge

Compare put-backspread overlay settings on top of a base portfolio. The goal is to reduce severe drawdowns without turning the overlay into a separate long-option sleeve.

ControlMeaning
DTEOption time to expiry. Longer-dated options usually move more slowly and cost more time value.
DeltaHow close the short put is to the current index level. Higher delta is closer to the money.
Exit DTEWhen positions are closed as expiry approaches.
Risk %How much portfolio value can be at risk in the overlay's difficult zone.
Ratio2:1 or 3:1 long-to-short put structure.
Robustness filtersHide fragile-looking results and focus on settings that remain strong near neighboring choices.

Output: baseline versus hedged growth, drawdowns, optimal overlay settings, episode cards, and rolling views of which settings worked best over time.

Currency

Test how a USD-denominated portfolio would have behaved when funded through USD, EUR, GBP, JPY, CHF, or a mix of those currencies. Results combine portfolio returns, interest-rate carry, and FX moves.

ControlDescription
ModeChoose fixed equal-weight mixes, single-currency baselines, dynamic equal-weight, or sampled mixes.
CurrenciesToggle which funding currencies are eligible.
Weight boundsLimit how much of any currency can appear in sampled mixes.

Output: ranked funding mixes, optional scatter chart, policy-rate chart, pair FX chart, and funding-return correlation.

Interpretation: safe leverage is fitted to the same historical window shown in the result, including an intraday loss allowance. It is not a forecast or a guarantee against future margin calls. In sampled mode, the full cloud is first evaluated approximately at 2x leverage; only the strongest candidates and reference rows receive the exact path-based safe-leverage solve. Approximate or infeasible rows can remain visible in the scatter, but they are excluded from rankings and detail actions. Tight bounds can produce skipped candidate IDs when no valid mix is found within the fixed rejection budget.

CWARP

Candidate Weighting And Risk Parity ranks candidate assets by how much they improve a base portfolio. Use it before adding a new sleeve.

InputDescription
Base portfolioYour current portfolio.
CandidatesAssets or groups being tested for inclusion.
Borrowed alloc %How much extra exposure is assigned to each candidate during the comparison.
Margin spread %Borrowing cost added to the candidate exposure.

Output: CWARP score, ranked candidate table, and volatility-versus-return scatter.

Match

Put portfolios on equal footing by finding the leverage needed to match a target volatility, CAGR, or max drawdown.

ModeDescription
PortfolioCompare your portfolio with a selected asset or portfolio.
Target valueMatch a numeric target directly.

Output: matched leverage, metrics before and after matching, growth chart, and drawdown chart.

Leverage

Sweep simple fixed leverage levels on a portfolio to see the broad risk/return trade-off. This tab is for quick exploration; use Margin when margin-call risk matters.

InputDescription
Step %Increment between leverage levels.
Max %Highest leverage level to display.

Output: table and chart of CAGR, volatility, Sharpe, Sortino, and max drawdown at each leverage level, using the portfolio's selected funding mix.

Correlation

Check whether assets or portfolios really diversify each other. Use two groups for rolling detail, or three or more groups for a matrix view.

ViewDescription
2 groupsRolling correlation, return scatter, quadrant analysis, beta versus SPYSIM, growth, and drawdown.
3+ groupsPairwise correlation heatmap plus portfolio-level growth and drawdown.

Lag-adjusted beta and correlation. Both are computed with a lead/lag correction (Scholes-Williams) rather than a naive same-day calculation. The reason: a fund listed on a different exchange than the benchmark closes at a different local time (for example, a European-listed S&P 500 ETF on Xetra closes hours before the US close), so part of each day's market move lands in the fund's next-day return. A same-day beta would understate its real exposure (it can read near 0.5 for a fund that truly tracks the market one-for-one). The correction adds the neighboring-day benchmark relationship to recover the true economic beta and correlation, and normalizes so the benchmark scores exactly 1.0 against itself. For assets that trade on the same schedule as the benchmark the adjustment makes effectively no difference.

Rebalance

Turn current positions, cash, target weights, and margin debt into concrete buy, sell, borrow, repay, and hold actions.

InputDescription
PortfolioCurrent value, target weight (decimals allowed), maintenance margin, asset, and currency for each holding. Maintenance defaults come from dataset metadata when available, then 25%.
DiluteKeep a position from being sold while allowing the rest of the portfolio to move toward target.
Cash on handCapital to deploy. Buy modes invest all of it at target weights, borrowing only when cash cannot reach the weights; sell-only ignores it.
Leverage by currencyExisting margin debt and desired target mix across USD, EUR, GBP, JPY, and CHF. Decimal target percentages are accepted.
ModeChoose cash-only buys, buy-only with borrowing, buy with max leverage, buy/sell to target, or sell-only.
OrderSort trades by current exposure state, then by the next-step priority score from drift closure and the selected metric focus.
Exposure controlsScale individual recommended trades with synced sliders and percentage boxes before acting on them.
Reduce by priorityGlobal slider and percentage box scale total trade exposure down, shedding it by the priority ranking; the method picker chooses Waterfall (drop lowest-priority trades first) or Proportional (trim all, weakest fastest).

Output: trade tables, before/after pies, financing bars, currency debt rebalance, priority ranking, and risk metrics comparing current and slider-adjusted portfolios. In the growth chart, color separates before/after and line style separates unlevered/leveraged. Exposure slider changes update the key metrics in the background, cash-only buys can be redirected among eligible rows, and the risk metrics table can send all four before/after unlevered/leveraged paths to Backtest or send pairs to Backtest, Match, or Correlation.

Trend

Inspect current positioning for KMLM, CTA, and DBMF. Use it to understand what managed-futures funds are currently long or short, how concentrated the exposures are, where funds overlap, and which normalized instruments have shifted across local snapshots.

ViewDescription
SummaryAs-of date selector, row count, gross notional versus NAV, and net notional versus NAV. Each fund defaults to its latest local snapshot, and changing one date updates the instant views with that selected snapshot mix.
Category net chartDirectional exposure by category across the funds for the currently selected per-fund snapshot dates.
Category matrixGross exposure share, net direction, and overlap count by category and fund for the selected per-fund snapshot dates, grouped into stable exposure families such as rates, currency, equity, and commodities.
Instrument historyNet exposure share for normalized markets over time with each fund's gross notional book scaled to 100%. Fund, section, sub-section, and From/To filters narrow the chart and recompute shift counts inside the selected snapshot window.

BH Macro

BH Macro Limited is a closed-ended LSE fund feeding the Brevan Howard Master Fund, with separate GBP (BHMG) and USD (BHMU) share classes. This page compares the listed share price against the published NAV and shows how that premium/discount behaves around volatility spikes. Pick a class and a date range to zoom in; every chart and table follows the same From / To range.

ViewDescription
Premium / discount vs VIXDaily price/NAV − 1 for the selected class overlaid with VIX on a second axis, plus mean/median/min/max of the discount over the range. Red bands mark weeks where VIX is at or above the selected threshold.
Discount / premium distributionHistogram of rolling price/NAV − 1 observations for the selected class inside the current date range. The default window is a 21-trading-day rolling average; the slider and number input can change it from 1 to 252 days, and Reset returns it to 21.
VIX-spike episodesEvent-study table of local VIX peaks above the threshold, defaulting to 40: NAV and price moves into the peak, and the discount before, at, and eight weeks after — the crisis widen-then-revert pattern.
Reset controlsThe window Reset restores 21 trading days. The VIX Reset restores a threshold of 40 and redraws the threshold bands and episode table.
Chart legendsLegends identify the selected share class price, NAV, VIX, and VIX-threshold shading; click a legend item to hide or show it.

IBKR

Parse an Interactive Brokers HTML Activity Statement locally in your browser and summarize expenses, market-data subscriptions, pricing-plan clues, and selected French tax figures. Non-EUR rows are converted with Banque de France ECB exchange rates, and only the currencies and dates needed for the selected year are loaded into the report view.

OutputDescription
YearsAvailable years are detected from statement rows after upload; the latest detected year is selected by default.
ExpensesCommissions, transaction fees/taxes, market-data subscriptions, other fees, debit interest, and borrow fees are shown for the selected year.
Pricing planObserved commissions are classified as Fixed, Tiered, or ambiguous with confidence and rationale.
Summary controlsExpense, 2TR/withholding, and 2074 sections each have their own compact display control.
2074 rowsRealized closing trades matched to opening trades FIFO, aggregated, shown per operation, or manually grouped by repeated ticker across all dates or per day.
1133 bridgeWhen losses exist, the helper can show same-year loss offset against gains or leave losses as non-imputed carry-forward.
2047 → 2TRCredit interest and SYEP (foreign source, IBKR Ireland) converted to EUR, declared via formulaire 2047 cadre 2 then carried gross to 2042 case 2TR — no French SIRET collecteur. Summary mode keeps separate rows for SYEP, EUR credit interest, and USD credit interest.
2778-SD / DIVFixed-income and dividend support stays separate. The 2778-SD card breaks down 2TR interest (credit + SYEP) by payment month with the PFU acompte (12.8% + social), interest withholding review-only; the 2778-DIV card does the same for dividends and stays hidden when no dividends are present.
FX freshnessLatest ECB date available for the report and the foreign currencies needed, with a stale marker when newest rates could not be refreshed.
InformationalWithholding, debit interest, borrow fees, and other interest are compacted by category and currency when Summary is on.
WarningsMissing FX, unsupported currencies, and special trade cases that need review.
Tax assumptionHow the report treats it
ResidencyFrench tax resident using IBKR Ireland; PFU is the only supported tax mode.
Date basisIncome, fees, dividends, and withholding are assigned to the IBKR payment/account-credit date, not the month named in the description.
Interest (foreign)Credit Interest and SYEP are foreign-source (IBKR Ireland): declared on form 2047 (cadre 2) → 2042 case 2TR, gross, with no French SIRET collecteur. Irish 20% interest withholding is separated as non-imputable review/reclaim guidance (Revenue.ie IC7) — not credited on 8VL (France–Ireland treaty: source ≈0%).
Dividends2778-DIV appears only when dividends are present; foreign dividend withholding is review-only and no Irish dividend credit is auto-computed.
Payment in Lieu / Return of CapitalA Payment in Lieu of Dividend (substitute payment when shares are lent over the record date) is always treated as a dividend and feeds the 2778-DIV base (flagged as a substitute payment for review). A Return of Capital reduces cost basis rather than being distributed income, so it is excluded from the 2778-DIV base, kept for display, and flagged.
Foreign accountThe report reminds you to declare the IBKR Ireland account on 3916/3916-bis.
TradeoffReason
Local parsingStatement contents stay in the browser, but parsing is limited to known IBKR Activity Statement HTML structures.
FX methodBanque de France ECB rates with a five-day lookback are practical and reproducible, but remain an approximation of the required exchange-rate date.
Pricing inferenceFixed/Tiered is inferred from observed commissions because IBKR statements do not expose the configured plan.
2074 draft rowsFIFO trade rows are a preparation aid; options, assignments, commodities, losses, and professional/habitual activity need tax review.
Year nuanceSocial-rate and monthly-payment edge cases are simplified; 2025/2026 French treatment may require external confirmation.

Box

Price short box spreads for SPX, ESTX50, Z / FTSE 100, N225, and SMI. Enter either credit points or rate, and the tab solves the other side for the selected index contract.

Default strikes are refreshed around the latest index level and sized to approximately USD 50,000 in each settlement currency. Shared or manually entered strikes always take precedence. Z credits must use 0.5-point increments; rate-derived Z credits are rounded to that valid tick.

InputDescription
Credit ptsNet credit quoted in index points.
Rate %Annualized simple rate implied by the box.
DTEDays to expiry used for the rate conversion.
FeeOptional per-leg cost included in the implied rate.

Output: implied rate, equivalent credit, notional, and a comparison against the matching 1-year interest-rate-swap rate (the term borrowing benchmark). The Close 10% OTM card beside DTE shows a suggested positive debit close limit set 10% below the current gross credit and rounded down to the valid credit tick. It does not construct another order. The rate chart plots each currency's 1-year swap level.

Put

Plan buying shares by selling a cash-secured in-the-money put instead of buying outright. Selling the put commits you to buy 100 shares per contract at the strike if assigned, in exchange for the premium, so your effective entry is strike minus premium. Enter one ask and the tab lays out a ladder of integer strikes; type the chain premium per strike to compare.

InputDescription
AskThe price to buy the shares outright; the reference the ladder is built around.
QuantityNumber of contracts (legs); scales the per-contract dollar totals.
ITM cap %Maximum integer strike distance above the ask. Defaults to 25% and controls how far upward the ladder extends.
PremiumThe put premium you would collect, entered per strike from the chain.
Breakeven checkboxPer-row checkbox that keeps Premium equal to that strike's breakeven value. The header checkbox enables a global mode for every visible row, including rows added later by changing the ITM cap.

Output: per integer strike (from the at-the-money/in-the-money strike up to the configured ITM cap), the breakeven premium (strike minus ask, the premium at which the effective entry equals the ask), and once you enter a premium, the effective entry, the entry delta versus buying at the ask (dollars and percent), the premium credit, the final cost, and the total delta. Dollar totals scale with Quantity. Negative deltas mean a lower entry than the ask and are green; positive deltas mean the effective entry lands above the ask and are red.

Forex

View major policy rates and FX pairs without setting up a portfolio. The From/To fields also act as zoom controls.

ViewDescription
Annualized policy rateTrailing rate chart for USD, EUR, GBP, JPY, and CHF.
Funding-return correlationHeatmap showing how currency funding returns moved together.
Pair FX timeseriesCross-rate chart for any selected currency pair, with their trailing rates alongside it.
Live-from presetsOne-click date buttons for each currency's available history.

Assets

Browse assets by return driver, then inspect one asset at a time. Use it to confirm available history, live date, maintenance margin, and basic performance before adding an asset to a portfolio.

Output: asset classes, ticker, currency, date range, live date, maintenance margin, CAGR, annualized volatility, Sharpe ratio, maximum drawdown, and related dataset links when variants exist.

Upload CSV

Add your own price history from the header Upload CSV button. Uploaded assets appear in autocomplete and can be used across tabs.

RequirementDetails
HeaderDate,USD
Date formatYYYY-MM-DD, for example 2020-01-02.
PricesPositive USD values. Absolute prices or normalized index levels both work.
NameThe filename becomes the starting asset name.

MCP endpoint

AI assistants can query the same market data the app uses, directly, over the Model Context Protocol. Point any MCP client at /mcp on this host (for example https://<host>/mcp); it speaks streamable HTTP. The endpoint is read-only — it exposes data, never trades or computations.

ToolReturns
list_datasetsEvery dataset with its asset classes, ticker, aliases, date range and maintenance margin.
get_assetSpec and metrics (CAGR, volatility, Sharpe, max drawdown, currency, inception) for one dataset, by name, ticker or alias.
get_price_seriesHistorical dates and values for up to 50 datasets, plus the beta benchmark.
get_holdingsLatest published holdings and category exposure for trend funds (KMLM, CTA, DBMF).
get_fx_ratesBanque de France (ECB) reference FX rates by date, optionally filtered by currency and range.

Docs

This page is the user guide for the app. Use it to choose the right tab, understand the main inputs, and interpret the major outputs without leaving the app.