How MAISNER Works
A technical reference for the mathematical models underlying the platform. Written for quantitative professionals, portfolio managers, and technically minded investors.
Portfolio Optimization — Mean-Variance
MAISNER implements Markowitz Mean-Variance Optimization (MVO) with several institutional-grade enhancements. The core problem maximizes the Sharpe ratio subject to linear constraints.
Objective Function
Constraints
Three portfolios are computed simultaneously: Max Sharpe, Minimum Variance, and Equal Weight. This allows direct comparison of optimization strategies against a naive benchmark.
| Parameter | Value | Description |
|---|---|---|
| RISK_FREE | 3.80% | Risk-free rate (ECB rate proxy) |
| WEIGHT_MAX | 35% | Maximum weight per asset |
| FREQ | 252 / 12 | Daily if ≥400 obs, else monthly |
Constrained Optimization
The Constrained Optimizer allows portfolio managers to impose explicit structural requirements on individual positions and sectors, then optimizes the remaining free budget using the same RMT-MVO engine. This is the institutional standard for managing client mandates, regulatory constraints, and conviction-driven overrides.
Asset Partition
All assets in the portfolio are classified into one of three sets before optimization begins.
𝓑 = bounded set (per-ticker bounds: lbi ≤ wi ≤ ubi)
𝓕 = free set (standard bounds: 0 ≤ wi ≤ wmax)
Remaining Budget
Full Optimization Problem
Constraint Types
| Type | Syntax | Description |
|---|---|---|
| Locked weight | wi = c | Position fixed at exact percentage. Optimizer cannot move it. |
| Locked shares | ni = k | Fixed number of shares. Weight derived from current market price. |
| Min/max per ticker | lbi ≤ wi ≤ ubi | Optimizer chooses within the specified range. |
| Sector floor | Σsector ≥ smin | Forces minimum allocation to a sector. |
| Sector ceiling | Σsector ≤ smax | Caps total allocation to a sector (default 40%). |
Infeasibility Handling
If the set of constraints is infeasible (e.g. locked weights sum to more than 1, or sector caps conflict with locked positions), MAISNER raises an explicit error identifying which constraint is violated. It never silently relaxes user-defined constraints.
Random Matrix Theory — Covariance Cleaning
Raw sample covariance matrices are notoriously noisy for typical portfolio sizes. MAISNER applies Marchenko-Pastur filtering to separate signal eigenvalues from noise eigenvalues.
Marchenko-Pastur Distribution
The ratio Q = T/N determines the noise floor. For small portfolios with limited history, RMT cleaning provides substantial improvement in out-of-sample covariance estimates. The cleaned matrix retains the information eigenvalues (genuine risk factors) while suppressing estimation error.
Quality Tilt
Pure Sharpe maximization often overweights assets with recent momentum. MAISNER applies a quality penalty to the MVO objective, tilting the optimizer toward fundamentally strong companies.
Quality Score
Quality scores are computed from FMP fundamental data: ROE, gross margin, operating margin, and debt coverage ratio. Each metric is normalized and combined into a composite score in [0, 1].
| Parameter | Value |
|---|---|
| LAMBDA_QUAL | 0.05 |
| QUALITY_THRESH | 0.30 |
| Metrics | ROE, Gross Margin, Op. Margin, Debt Coverage |
CVaR Optimization
For multi-asset portfolios including options and non-linear instruments, mean-variance optimization is inappropriate. MAISNER uses Conditional Value-at-Risk (CVaR) minimization via linear programming.
CVaR Definition
Correlated Scenario Generation
| Parameter | Value |
|---|---|
| Scenarios | 5,000 |
| Alpha | 0.95 |
| Method | LP (linear programming) |
| Correlation | Cholesky on RMT-cleaned Σ |
Monte Carlo Simulation
Long-horizon wealth projections are generated via Geometric Brownian Motion with correlated asset paths.
| Parameter | Value |
|---|---|
| Paths | 10,000 |
| Horizon | 10 years |
| Output | 5th / 50th / 95th percentile |
| Metrics | P(loss), P(2×), Median@10y, Range |
Stress Testing
Historical scenario analysis replays actual crisis return distributions against the current and optimised portfolios. Custom stress mode allows arbitrary macro shock specification.
Historical Scenarios
| Scenario | Period | S&P 500 Drawdown |
|---|---|---|
| 2008 GFC | Sep 2008 – Mar 2009 | −56.8% |
| 2020 COVID | Feb 2020 – Mar 2020 | −33.9% |
| 2022 Rate Shock | Jan 2022 – Oct 2022 | −25.4% |
| 2000 Dot-com | Mar 2000 – Oct 2002 | −49.1% |
Advanced Stress — Custom Shocks
Users can define simultaneous shocks across equity markets (by region/sector), interest rates, FX rates, and individual ticker overrides. Shocks are applied as multiplicative return adjustments to portfolio weights.
Leverage Analysis
The Leverage Analyzer quantifies the risk and return impact of applying financial leverage to a portfolio. It combines the Kelly Criterion for optimal leverage sizing with continuous-time volatility decay, margin call analytics, and Monte Carlo liquidation probability.
Kelly Criterion — Optimal Leverage
Leveraged Return and Volatility
Volatility Decay (Continuous-Time Drag)
Margin Call Threshold
Monte Carlo Liquidation Probability
MAISNER simulates 5,000 independent GBM paths over a 252-trading-day horizon. Each path uses portfolio drift μL and volatility σL. A path is classified as a liquidation event if its running minimum touches the margin call threshold at any point during the year.
Historical Stress Scenarios
| Scenario | S&P 500 Drawdown | Applied to Leveraged Portfolio |
|---|---|---|
| 2008 GFC | −56.8% | DD × L, then check MC threshold |
| 2020 COVID | −33.9% | DD × L, then check MC threshold |
| 2022 Rate Shock | −25.4% | DD × L, then check MC threshold |
| 2000 Dot-com | −49.1% | DD × L, then check MC threshold |
| 1987 Black Monday | −22.6% | DD × L, then check MC threshold |
| Parameter | Value | Description |
|---|---|---|
| MC_PATHS_LEV | 5,000 | GBM paths for liquidation probability |
| MC_HORIZON_LEV | 252 days | 1-year daily simulation |
| US Maintenance | 25% | RegT maintenance margin requirement |
| EU Maintenance | 50% | ESMA margin requirement |
| Leverage range | 1× – 3× | Table computed at 1.0, 1.5, 2.0, 2.5, 3.0 |
Stop Loss Calculator
The Stop Loss Calculator derives position-level and portfolio-level exit thresholds from the volatility structure of the portfolio. The methodology follows Giuseppe Paleologo's Advanced Portfolio Management (2021), which frames stop-loss placement as a statistical inference problem rather than an ad-hoc rule.
Position-Level Volatility Stop
Each position's stop is calibrated to its realised volatility (from the RMT-cleaned covariance diagonal) and the chosen horizon. The parameter k controls the width — how many volatility-adjusted standard deviations separate entry from exit.
Portfolio Drawdown Limit
The portfolio-level stop integrates correlation structure via the full covariance matrix, capturing diversification effects that position-level stops ignore.
Sharpe-Adjusted Stop (Paleologo Key Insight)
Paleologo's central contribution is showing that a strategy with genuine edge (positive Sharpe ratio) should use a tighter stop than a zero-edge strategy. The intuition: if returns are reliably positive, an observed loss of k-σ is stronger evidence of a regime change than it would be for a random walk.
GBM First-Passage Barrier Probability (Analytical)
The probability that a position touches its stop before the horizon is computed analytically using the reflection principle for Geometric Brownian Motion — no Monte Carlo required.
Kelly Connection
The Kelly Criterion provides a natural consistency check: a stop that implies a maximum loss exceeding the Kelly-optimal risk budget is oversized relative to the strategy's edge.
Re-Entry Level
After a stop is triggered, the re-entry level accounts for the short-term mean-reversion noise band estimated as 0.5-σ over 5 trading days.
| Parameter | Values | Description |
|---|---|---|
| k_multiplier | 1.5 / 2.0 / 2.5 | Stop width in daily-vol units × √T |
| horizon_days | 30 / 60 / 90 | Horizon for √T scaling |
| confidence α | 0.90 / 0.95 / 0.99 | VaR confidence level (parametric) |
| RF | 3.80% | Risk-free rate (Kelly denominator) |
| Covariance source | RMT diagonal | Per-ticker variance from Marchenko-Pastur cleaned Σ |
Options Pricing
European Options — Black-Scholes
American Options — Barone-Adesi Whaley (BAW)
American-style options cannot be priced with Black-Scholes due to early exercise. MAISNER implements the Barone-Adesi Whaley approximation, which provides a closed-form solution by decomposing the American option into a European component and an early exercise premium.
Implied Volatility
When live market prices are available, MAISNER back-calculates implied volatility using Brent's method — a bracketed root-finding algorithm that is guaranteed to converge. If the IV calculation fails (e.g., deep ITM/OTM with negligible time value), the platform falls back to historical volatility.
Bond Analytics
Duration and Convexity
Vasicek Interest Rate Model
Bond returns in stress scenarios and portfolio projections use the Vasicek mean-reverting short rate model for interest rate simulation.
| Parameter | Value |
|---|---|
| BOND_MAX | 60% of portfolio |
| CONVEXITY_THRESH | 0.05 |
| Credit ratings | AAA → CCC (FMP data) |
Factor Analysis
The Factor Explorer computes Information Coefficient (IC) and related statistics for 11 cross-sectional factors.
Information Coefficient
Information Ratio
| Factor | Category |
|---|---|
| momentum_12m | Momentum (12-1) |
| momentum_1m | Short-term reversal |
| value_composite | P/E, P/B, EV/EBITDA |
| quality_composite | ROE, margins, debt |
| low_volatility | 12-month realised vol |
| fcf_yield | FCF / Market cap |
| earnings_revision | EPS estimate changes |
| size | Log market cap |
| dividend_yield | Trailing dividend yield |
| growth_composite | Revenue + EPS growth |
| short_interest | Short % of float |
Backtesting & Deflated Sharpe Ratio
Walk-Forward Validation
All strategy backtests use walk-forward analysis: the strategy is fitted on a training window and evaluated on an out-of-sample test window that rolls forward in time. This prevents look-ahead bias and provides a realistic estimate of live performance.
Deflated Sharpe Ratio
Multiple testing bias is a major source of overfitting in quantitative strategies. MAISNER computes the Deflated Sharpe Ratio (DSR), which adjusts the observed Sharpe Ratio for the number of trials tested and the non-normality of returns.
Performance Attribution
MAISNER implements the Brinson-Hood-Beebower (BHB) three-effect decomposition, which explains the difference between portfolio return and benchmark return as the sum of allocation, selection, and interaction effects. The benchmark is a synthetic SPY blend constructed from sector ETF returns weighted by approximate S&P 500 sector weights.
Brinson-Hood-Beebower Decomposition
Let wp = portfolio sector weight, wb = benchmark sector weight, Rp = portfolio sector return, Rb = benchmark sector return, Rbtotal = total benchmark return.
Benchmark Construction
The sector benchmark uses approximate SPY sector weights (Technology 30%, Financials 13.2%, Healthcare 12.8%, …) applied to sector ETF returns (XLK, XLF, XLV, XLY, XLI, XLC, XLP, XLE, XLB, XLU, XLRE). SPY actual return is also fetched for reference.
Sector resolution uses a two-layer lookup with a 24-hour in-process cache: (1) FMP Professional /stable/profile is queried first for accurate GICS sector classification (e.g. AMZN → Consumer Discretionary, JPM → Financials, JNJ → Healthcare); (2) the internal Stocks.xlsx sector column (normalised from Russian to English) is used as fallback for tickers not found in FMP or for EU-listed securities. The same enriched sector map is applied consistently across the Optimizer, Constrained Optimizer, Stress Tests, and Attribution engine. Tickers that remain unresolved after both lookups are excluded from the BHB decomposition and do not affect total effects — all sector-level effects still sum exactly to active return over the resolved weight subset.
| Sector | ETF | SPY Weight |
|---|---|---|
| Technology | XLK | 30.0% |
| Financials | XLF | 13.2% |
| Healthcare | XLV | 12.8% |
| Consumer Discretionary | XLY | 10.1% |
| Industrials | XLI | 8.7% |
| Communication | XLC | 8.6% |
| Consumer Staples | XLP | 5.9% |
| Energy | XLE | 3.8% |
| Materials | XLB | 2.4% |
| Utilities | XLU | 2.3% |
| Real Estate | XLRE | 2.2% |
Portfolio Monitor
The Portfolio Monitor provides real-time P&L tracking, currency exposure breakdown, and option expiry management for user-defined portfolios. Unlike the Analyzer and Optimizer, the Monitor supports multi-asset portfolios (stocks, ETFs, bonds, options, futures, crypto) for all subscription tiers.
Position-Level P&L
Option Valuation
For live options (expiry > today), the Monitor computes an estimated current value as intrinsic value plus an approximate time value derived from a simplified Black-Scholes formula with σ = 25% assumed volatility. Expired options (expiry ≤ today) are marked to zero (conservative) and displayed with an EXPIRED badge — they should be removed from the portfolio.
Currency Exposure
Currency is inferred from the exchange suffix of each ticker (.DE/.PA → EUR, .L → GBP, .ST → SEK, etc.; no suffix → USD). The currency breakdown shows the percentage of total portfolio value held in each currency. FX rates are fetched from FMP at runtime.
Long/Short Optimizer
The Long/Short Optimizer extends the standard MVO framework to allow negative portfolio weights (short positions). The mathematical structure is identical to the long-only case — the same Sharpe objective, the same RMT-cleaned covariance matrix — with two key adaptations: a borrow cost term subtracted from the expected return of shorted positions, and relaxed weight bounds that permit negative values.
Portfolio Modes
Two net-exposure configurations are available:
- Long/Short (net = 1): Σwᵢ = 1. Standard fully-invested portfolio allowing some short positions. Long gross > net; short gross < long gross.
- Market Neutral (net = 0): Σwᵢ = 0. Dollar-neutral — long exposure equals short exposure. A minimum gross constraint (Σ|wᵢ| ≥ 0.5) prevents the degenerate all-zero solution.
Borrow Cost Adjustment
Objective Modes
| Mode | Objective | L/S Adaptation |
|---|---|---|
| Standard | max (μ_eff − r_f) / σ | Same Sharpe with borrow-adjusted μ; bounds [-max_short, max_long] |
| Conservative | min wᵀΣw | Minimise portfolio variance; negative weights allowed; tends toward fewer shorts |
| Balanced | max Sharpe s.t. σ ≤ vol_cap | SLSQP vol constraint; falls back to min-variance if vol_cap is infeasible |
| Aggressive | max μ_eff | Pure return maximisation; bounds widened to [−1.5×max_short, 1.5×max_long] |
| Dividend | max Σ(wᵢ>0)×ROIᵢ − 0.3σ | Yield only from long leg; vol penalty prevents pure high-yield concentration |
Weight Constraints
Portfolio Statistics
Volatility and Sharpe (identical to long-only)
Upper Barrier Probability for Short Stop-Losses
When L/S portfolio weights are passed to the Stop Loss Calculator, short positions (w < 0) use the upper barrier formula (stop triggered when price rises above entry):
Long/Short Analyzer
The Long/Short Analyzer evaluates an existing L/S portfolio given the user's actual positions — ticker, quantity, direction, and purchase price. Live prices are fetched at run-time to compute current mark-to-market values, realised P&L, and forward-looking risk metrics using the same RMT covariance infrastructure as the optimizer.
Position Valuation and P&L
Portfolio Exposure
Portfolio Risk (RMT Covariance)
Stress Scenarios (Beta-Adjusted)
Hedging Optimizer
Implements the Yu & Sun (2017) model: "Optimal Hedging with Options and Futures against Price Risk and Background Risk", Math. Comput. Appl. 22(1):5. The model simultaneously optimises a put option hedge and a futures hedge for a commodity or equity position subject to correlated background risk (weather, operational, yield).
Model Structure
The terminal profit from the hedged position is (Equation 1 of the paper):
| Symbol | Meaning |
|---|---|
| PT | Spot commodity price at horizon T (lognormal) |
| FT | Futures price at horizon T (lognormal, corr ρ1 with PT) |
| F0 | Current futures price |
| Q | Quantity held |
| K | Put option strike — grid-searched over [0.7⋅F0, 1.3⋅F0] |
| Φ | Black-Scholes European put price at K |
| h | Option hedge ratio (units of puts per unit of Q) |
| H | Futures hedge ratio — grid-searched over [0, 2] |
| ZT | Background risk ~ N(0, σz2), corr ρ2 with PT |
| β | Background mix: β=0 pure additive, β=1 pure multiplicative |
| r | Risk-free rate (3.80%) |
| τ | Hedging horizon in years |
Budget Constraint
The option budget is a fraction d of the position value P0·Q:
When Φ is near zero (deep in-the-money or very short expiry), h is clamped to zero to avoid a degenerate hedge.
Simulation
N = 10,000 correlated paths are drawn via a factored Cholesky structure. Three independent N(0,1) variates W1, W2, W3 give:
This exactly reproduces corr(PT, FT) = ρ1, corr(PT, ZT) = ρ2, corr(FT, ZT) = ρ1·ρ2.
Risk Measure: ESα (TCE)
The risk measure minimised is the Expected Shortfall (ES) of the normalised loss, which equals the Tail Conditional Expectation (TCE) by Proposition 1 of the paper. For a loss distribution L = −(ΠT − W0) / W0:
All results are expressed as a fraction (or percentage) of initial wealth W0 = P0·Q, making them comparable across different position sizes.
Grid Search
The joint optimum (H*, K*) is found by exhaustive grid search:
Grid: H — 21 points (0.0, 0.1, …, 2.0); K — 20 points uniformly spaced. The optimal h* follows from the budget constraint: h* = d·P0/Φ(K*).
Over-Hedge
When H* > 1 the futures short exceeds the underlying exposure. This can be ES-optimal when β is high (multiplicative background risk dominates) or when ρ1 is low (futures are a poor spot proxy so a larger position is needed to hedge the residual). The UI flags over-hedge with an amber badge.
Sensitivity Analysis
| Series | What it shows |
|---|---|
| ES vs β | How additive vs multiplicative background risk changes the hedge benefit (11 points, [0,1]). |
| ES vs d (budget) | Marginal value of increasing the option budget from 1% to 50% of position value (10 points). |
| ES vs α | How the optimal ES varies with the tail probability from 1% to 10% (10 points). |
| ES vs σspot | Hedge effectiveness across volatility regimes: 10%, 16%, 20%, 40%, 60% (5 points; paths re-simulated for each). |
Futures Diagnostic Curve
At the optimal strike K*, ESα is computed for H ∈ [0, 2] (41 points) with options at d fixed. The resulting U-shaped (or monotone) curve shows whether futures add value beyond options alone (it will be non-trivial when ρ1 < 1 and σspot ≠ σfutures). H* is annotated with a dashed vertical line.
Three Comparison Scenarios
| Scenario | H | h | Purpose |
|---|---|---|---|
| No Hedge | 0 | 0 | Baseline unhedged position |
| Options Only | 0 | d⋅P0/Φ | Pure put hedge without futures |
| Optimal | H* | h* | Joint optimum from grid search |
Portfolio-Native Mapping
The abstract Yu & Sun model is mapped to a real portfolio by treating the portfolio as
Q = W₀ / P₀ units of the hedge underlying (e.g. SPY). Portfolio statistics
are estimated from price_history.xlsx (1-year monthly log-returns).
| Model param | Portfolio quantity | Notes |
|---|---|---|
| Q | W₀ / P₀ | Portfolio value in units of hedge underlying |
| σspot | σportfolio | Annualised vol from monthly returns (12-month window) |
| σfutures | σhedge | Vol of hedge underlying — used for BS put pricing |
| ρ1 | corr(port returns, hedge returns) | Hedge effectiveness; higher = better hedge |
| ρ2 | √(1 − ρ12) × 0.5 | Conservative approximation for background-spot correlation |
| σz | σportfolio × √(1 − ρ12) | Idiosyncratic (unhedgeable) vol |
| μspot | rf + max(0, β) × 5% | CAPM estimate; β = cov(port, hedge) / var(hedge) |
| μfutures | rf | Risk-neutral futures drift |
| F0 | P0 × erτ | Fair futures price (continuous compounding, no dividends) |
Hedge Strategies Evaluated
| Strategy | Structure | Free params optimised |
|---|---|---|
| Protective Put | Long put on hedge underlying, H = 0 | K (strike) |
| Collar | Long put + short call, same expiry, H = 0 | Kput, Kcall |
| Put + Futures | Long put + short futures (full Yu & Sun 2017) | K, H |
| Futures Only | Short futures only, h = 0 | H |
All strategies are ranked by ESα. The best strategy and trade instructions (number of contracts = ⌈h × Q / 100⌉, estimated premium, cost as % of AUM) are shown in the results panel alongside ES vs Budget and ES vs Horizon sensitivity charts.
Option Pricing
The put premium Φ is priced with the Black-Scholes formula using the futures price F0 as the underlying:
The futures volatility σf is used for this pricing step, not the spot volatility, as the put is written on the futures contract.
Platform Constants
| Constant | Value | Description |
|---|---|---|
| RISK_FREE | 3.80% | Risk-free rate (annualised) |
| WEIGHT_MAX | 35% | Max weight per linear asset |
| CRYPTO_MAX | 15% | Max total crypto allocation |
| FUTURES_MAX | 20% | Max total futures allocation |
| BOND_MAX | 60% | Max total bond allocation |
| OPTION_MAX | 30% | Max total options allocation |
| LAMBDA_QUAL | 0.05 | Quality tilt penalty weight |
| QUALITY_THRESH | 0.30 | Min quality score threshold |
| MC_PATHS | 10,000 | Monte Carlo simulation paths |
| MC_HORIZON | 10 years | Monte Carlo time horizon |
| CVAR_SCENARIOS | 5,000 | CVaR scenario count |
| CVAR_ALPHA | 0.95 | CVaR confidence level |
| DATA_HISTORY | 10 years | Price history for analysis |
| STALENESS | 30 days | Max data age before refresh |
Data sources: FMP Professional (primary — fundamentals, prices, dividends), Polygon (secondary — US equities), yfinance (EU tickers, fallback). All data fetched over HTTPS with API key authentication.
PRIIPs KID Generator
Implements EU Regulation 1286/2014 (PRIIPs) and Commission Delegated Regulation 2017/653 as amended by 2021/2268. Generates a Key Information Document using Method 1 (historical block bootstrap) for Category 3 products (equities / ETFs) with at least 24 months of price history. Five years (60 months) is recommended per ESMA guidance.
Summary Risk Indicator — VEV, MRM, SRI
Performance Scenarios — Block Bootstrap
Cost Disclosure — Reduction in Yield (RIY)
Multi-Asset Optimizer
Extends the core MVO engine to portfolios containing equities, ETFs, futures, crypto, bonds, and options simultaneously. Each asset class is handled by a dedicated sub-optimizer; results are stitched into a single set of weights subject to class-level allocation caps.
Asset Class Constraints
| Class | Cap | Treatment |
|---|---|---|
| Equities / ETFs / Crypto | 35% per ticker · 15% total crypto | Standard MVO with RMT cleaning |
| Bonds | 60% total | Vasicek synthetic returns → MVO |
| Futures | 20% total | Linear payoff → included in MVO |
| Options | 30% total | Scenario-based CVaR-LP |
Bond Sub-Optimizer — Vasicek Synthetic Returns
Options Sub-Optimizer — CVaR Linear Programme
Combined Portfolio Metrics
Portfolio Analyzer
Holdings-based workflow: enter current positions as (ticker, shares) pairs, and the engine computes current portfolio metrics, runs a full MVO re-optimization, and produces a rebalancing plan with trade-level cost estimates.
Holdings → Weights
Rebalancing Plan
Comparison Metrics
| Metric | Formula |
|---|---|
| Sharpe | (μ − r_f) / σ |
| Sortino | (μ − r_f) / σ_down, σ_down = √(E[min(r,0)²]×252) |
| Beta | Cov(r_p, r_SPY) / Var(r_SPY) |
| Alpha (Jensen) | μ_p − r_f − β(μ_SPY − r_f) |
| Max Drawdown | max(V_peak − V_trough) / V_peak over 2-year daily log |
Advanced Stress Test — Custom Scenarios
Extends the historical scenario library with a fully configurable shock constructor. The user specifies a base crisis (optional), market-wide shock, per-sector shocks, and per-ticker overrides. A GBM path is generated to visualise how portfolio value evolves through the scenario.
Shock Priority Chain
GBM Path Generation
Options Strategy Builder
Assembles multi-leg options strategies from a ticker, spot price, implied volatility, and expiration date. Each strategy is defined as a set of legs with direction (+1 long / −1 short), option type, and a delta target used to select the appropriate strike.
Supported Strategies
| Strategy | Legs | View |
|---|---|---|
| Covered Call | Long stock + short OTM call (Δ≈0.30) | Neutral-bullish, income |
| Protective Put | Long stock + long OTM put (Δ≈−0.25) | Bullish with downside insurance |
| Collar | Long stock + short OTM call + long OTM put | Bounded risk and reward |
| Long Straddle | Long ATM call + long ATM put | Volatility long, direction neutral |
| Long Strangle | Long OTM call (Δ≈0.25) + long OTM put (Δ≈−0.25) | Vol long, cheaper than straddle |
| Bull Call Spread | Long ATM call + short OTM call (Δ≈0.30) | Bullish, defined risk/reward |
| Bear Put Spread | Long ATM put + short OTM put (Δ≈−0.30) | Bearish, defined risk/reward |
| Short Straddle | Short ATM call + short ATM put | Sell volatility, range-bound |
| Iron Condor | Short OTM call spread + short OTM put spread | Low-vol income, 4 legs |
Strike Selection via Delta Targeting
Portfolio Greeks Aggregation
Tax Loss Harvesting
Identifies unrealised losses in a portfolio that exceed a user-defined threshold and estimates the potential tax saving from crystallising those losses. Accounts for country-specific rates, holding periods (US), and wash-sale restrictions. Suggests substitute securities to maintain market exposure during the exclusion window.
Core Calculation
Country Tax Rates
| Country | Rate | Wash-sale | Notes |
|---|---|---|---|
| US | 37% ST / 20% LT | 30 days | Dual rate; holding > 1 year qualifies for LT |
| DE | 26.375% | None | Abgeltungsteuer 25% + 5.5% Solidaritätszuschlag |
| FR | 30% | None | PFU flat tax (prélèvement forfaitaire unique) |
| UK | 20% | 30 days | Bed-and-breakfasting rule; CGT higher rate |
| NL | N/A | — | Box 3 taxes fictitious return on net wealth; TLH not applicable |
| CH | N/A | — | No CGT for private investors (Privatvermögen) |
Substitute Selection
After crystallising a loss, the position is replaced with a similar-but-not-identical security to maintain sector exposure during the wash-sale window. Substitutes are sourced from: (1) a curated ticker map (~60 tickers); (2) same-sector ETFs; (3) FMP screener peers (same sector, similar market cap). Up to 4 substitutes are returned per position.
Signal Analysis
Evaluates each factor from the Factor Library as a standalone trading signal over forward periods of 1, 3, 6, and 12 months. Produces Information Coefficient, hit rate, long/short spread, and t-statistics. Supports ensemble composite construction via OLS signal combination.
Information Coefficient (IC)
Hit Rate & Long/Short Spread
Ensemble Composite
Efficient Frontier
Generates the mean-variance efficient frontier by Monte Carlo sampling of random portfolios, then renders an interactive scatter chart. Clicking any point populates weight sliders; dragging a slider instantly recomputes portfolio metrics for the custom allocation.
Random Portfolio Generation
Interactive Metrics
| Metric | Formula | Notes |
|---|---|---|
| Sharpe | (μ − r_f) / σ | Uses RMT covariance |
| Sortino | (μ − r_f) / σ_down | σ_down = downside deviation × √252 |
| Beta | Σ wᵢ βᵢ | Weighted sum of individual betas vs SPY |
| Quality | Σ wᵢ qᵢ | Weighted quality score (0–1) |