Think of Soteria as your personal quant analyst. You speak in plain English; it quietly runs the right RiskFolio tool under the hood. Use this cheat‑sheet whenever you wonder “What should I ask, and which modes are available?”
“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.
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.”
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.”
Function: Creates a visual pie chart representation of portfolio weight distributions.
Key phrases: title
.
Example prompt: “Pie‑chart my optimized weights.”
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 %.”
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 %.”
Function: Creates portfolios using hierarchical risk parity methods that cluster similar assets before allocation.
Key phrases: model HRP
, HERC
, HERC2
, NCO
; dependency (pearson
, distance
); optional risk target.
Example prompt: “Create an HRP portfolio of these 30 ETFs; minimize variance.”
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 |
Key phrases: any method keyword above (e.g. EWMA λ 0.94
).
Example prompt: “Estimate mean returns with EWMA λ 0.94.”
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 |
Key phrases: any keyword above + detone market
(removes first PC).
Example prompt: “Use Ledoit covariance and detone market.”
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.”
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.”
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 |
Key phrases: any metric keyword above.
Example prompt: “Compute MDD_Rel for BTC daily returns.”
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.”
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.”
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” |