Quick Start
“Optimize a minimum‑variance mix of AAPL, MSFT, NVDA; cap any stock at 20 %; plot the growth of $1.” Soteria replies with weights, a pie chart, and a line chart asking you first if you want to place the trades. That’s the magic: one sentence, multiple tools. Read on for the full menu.
Download Historical Returns
Function: Retrieves historical price data and converts to percentage or logarithmic returns for analysis. Key phrases:log returns
, adjusted close
, explicit date range.
Example prompt: “Fetch log returns for AAPL & MSFT from 2020‑01‑01.”
Plot Cumulative Growth
Function: Calculates and visualizes the compounded growth of portfolio value over time. Key phrases:title
.
Example prompt: “Plot cumulative growth; title Tech vs S&P.”
Show Allocation Pie
Function: Creates a visual pie chart representation of portfolio weight distributions. Key phrases:title
.
Example prompt: “Pie‑chart my optimized weights.”
Classic Mean‑Variance Optimization
Function: Performs traditional Markowitz style portfolio optimization (minimize variance or maximize Sharpe) with various risk measures and objectives. Key phrases:Classic
/ FM
; risk measure (MV
, CVaR
, MDD
, …); objective (Sharpe
, MinRisk
, Utility l=3
); allow shorts
.
Example prompt: “Maximize Sharpe for these 10 stocks allow shorts 20 %; risk = CVaR 95 %.”
Optimization with Weight Limits
Function: Applies portfolio optimization while respecting user defined constraints on individual assets or asset classes. Key phrases: “no stock above 12 %,” “Bonds ≥ 10 %.” Example prompt: “Min‑variance; cap any stock at 15 %; Bonds ≥ 10 %.”Hierarchical Clustering Optimization
Function: Creates portfolios using hierarchical risk parity methods that cluster similar assets before allocation. Key phrases: modelHRP
, HERC
, HERC2
, NCO
; dependency (pearson
, distance
); optional risk target.
Example prompt: “Create an HRP portfolio of these 30 ETFs; minimize variance.”
Estimate Expected Returns
Function: Generates forward looking return estimates using various statistical (historical or shrinkage estimators) approaches.Method keyword | Idea (math‑lite) | When useful |
---|---|---|
hist | Simple arithmetic mean | Stable markets, long history |
EWMA λ | Weighted mean (1‑λ)Σλ^t r_t | Emphasize recent data or regime shifts |
James‑Stein | Shrink toward grand mean | Many assets, small sample |
Bayes‑Stein | Shrink toward prior belief | Expect modest excess returns |
BOP | Fully Bayesian posterior | Need probabilistic estimates |
EWMA λ 0.94
).
Example prompt: “Estimate mean returns with EWMA λ 0.94.”
Estimate Covariance Matrix
Function: Computes asset correlation and volatility relationships using robust statistical estimators.Method keyword | Idea | When useful |
---|---|---|
hist | Sample covariance | Plenty of observations per asset |
Ledoit | Shrink toward identity | Many assets, noisy sample |
EWMA | Decay‑weighted covariance | Volatility clustering, recent shocks |
semi | Downside semi‑covariance | Focus on downside risk only |
kernel | Non‑parametric smoothing | Heavy tails or nonlinear dependence |
detone market
(removes first PC).
Example prompt: “Use Ledoit covariance and detone market.”
Compute Cokurtosis Matrix
Function: Analyzes higher order statistical moments to capture tail risk and extreme event dependencies (estimates fourth order co‑moments to capture tail dependence). Key phrases:alpha 0.05
, method (hist
, exp
).
Example prompt: “Cokurtosis alpha 0.05 for FAANG.”
Risk‑Adjusted Sharpe Ratio
Function: Calculates risk adjusted returns using various risk measures beyond standard deviation ( where may be variance, CVaR, MDD, etc). Key phrases: risk keyword (CVaR
, MDD
, MAD
, …).
Example prompt: “Sharpe using CVaR at 95 % for these weights.”
Single Risk Metric
Function: Computes individual risk statistics for detailed portfolio analysis and comparison.Metric | Description |
---|---|
MAD | Mean absolute deviation |
MDD_Rel | Relative max drawdown |
SemiDeviation | Downside deviation |
Kurtosis | 4th‑moment fat‑tailness |
Build Portfolio Return Series
Function: Constructs time series of portfolio performance with flexible rebalancing options. Key phrases:rebalance true
(monthly) or rebalance false
(buy‑and‑hold).
Example prompt: “Portfolio returns with quarterly rebalancing.”
Export CSV Report
Function: Generates a CSV containing dates, asset returns, portfolio return, variance, CVaR, Sharpe. Key phrases: (no extra keywords). Example prompt: “Export a CSV performance report.”Quick Cheat Sheet
Capability | Key phrases | Prompt snippet |
---|---|---|
Download returns | log returns , adjusted , dates | “log returns for AAPL 2020‑01‑01” |
Plot growth | title | “plot growth title: Tech vs S&P” |
Pie chart | title | “pie‑chart weights” |
Classic optimize | risk (CVaR 95 % ), Sharpe , allow shorts | “Max‑Sharpe CVaR 95 % allow shorts” |
Caps optimize | caps/floors text | “cap stock ≤ 12 %” |
HRP/HERC | HRP , minimize variance | “HRP minimize variance” |
Mean vector | EWMA λ , James‑Stein | “mean James‑Stein” |
Covariance | Ledoit , detone | “Ledoit covariance detone” |
Cokurtosis | alpha 0.05 | “cokurtosis alpha 0.05” |
Sharpe ratio | risk keyword | “Sharpe CVaR” |
Risk metric | metric keyword | “MDD_Rel BTC” |
Portfolio series | rebalance true/false | “returns quarterly rebalance” |
Export CSV | - | “export CSV” |