# TLDR

We construct an optimization problem to set optimal margin requirements based on expectiles to balance between prudentiality and opportunity cost. See the full write-up here.

# Motivation

We aim to build an exchange that can facilitate trading contracts on illiquid underlyings. To manage risk, we need to set proper margin requirements. Typical industry approaches involve simulating scenarios and setting margins according to worst-case losses (e.g. CME’s SPAN). On the other hand, crypto exchanges open opportunities for more prudent, near real-time risk management.

# Risk measures

To quantify risk, we will choose a risk measure, \rho: \mathcal{G} \mapsto \mathbb{R}, where \mathcal{G} is the set of all functions X: \Omega \mapsto \mathbb{R} that represents the future returns of a portfolio. In particular, we are interested in convex risk measures (i.e. coherent risk measures that relax positive homogeneity) because they satisfy monotonicity, translation invariance, and convexity (Artzner et al., 2001). Note however that because crypto assets are highly correlated and have fat-tailed return distributions, it may be more desirable to require subadditivity conditional on two assets being negatively correlated.

In addition to their theoretical soundness, we desire a risk measure that is practical. This entails two more requirements: *elicitability* and *robustness*. A risk measure \rho is *elicitable* if there exists a scoring function whose minimizer is an optimal forecast for \rho (Ziegel, 2014). Elicitability is important for backtesting, which allows us to compare the performance of different forecasting methods.

We consider a risk measure \rho to be *robust* if it is continuous with respect to the Wasserstein distance (Emmer et al., 2015). Robustness is important because a robust risk measure is insensitive to a small perturbation in the probability measure, which implies greater tolerance to model misspecification. Indeed, all risk measures require the specification of a model \mathbb{P}, a distribution over future returns of an account (unless we directly forecast risk measure, or rather statistic, from historical samples).

Existing risk measures include: value-at-risk, expected shortfall, spectral risk measures (Cotter and Dowd, 2006), median shortfall (Kou et al., 2013), and liquidity-adjusted risk measure (Weber et al., 2013; Angelidis and Benos, 2006), each of which satisfies some but not all the requirements mentioned above.

Instead, we choose to explore expectiles

for some 0 < \tau < 1 and (x)_+ = \max(0, x).

We can then define *expectile value-at-risk* EVaR_\tau(X) = -e_\tau(X). We choose to explore EVaR_\tau because it is the only risk measure to be coherent, robust, and elicitable for \tau \leq \frac{1}{2}. We can characterize EVaR_\tau by its acceptance set \mathcal{A}_{EVaR_\tau} = \{ X \mid \frac{\mathbb{E} [(X - e_\tau(X))_+]}{\mathbb{E} [(e_\tau(X) - X)_+]} \geq \frac{1-\tau}{\tau} \} (Bellini and Bernardino, 2017). Note that \Omega(X, \tau) = \frac{\mathbb{E} [(X - e_\tau(X))_+]}{\mathbb{E} [(e_\tau(X) - X)_+]} is a performance measure referred to as the omega ratio (Chen, 2018), the ratio of expected gains to expected losses. Hence, \mathcal{A}_{EVaR_\tau} defines a set of accounts with sufficiently large omega ratios. \tau can then be intuitively thought of as the weight given to expected gains relative to expected losses.

# Designing optimization problem

It’s easy to set margin requirements equal to some risk measure, but this could lead to high margins that disincentivize trading (and certainly would not reflect the risk appetite of crypto-traders). Instead, optimal margin requirements involve balancing two factors: *prudentiality* and *opportunity cost* (Lam et al., 2003). Prudentiality can be captured by a risk measure, while opportunity cost is more abstract. Opportunity cost could be defined as the expected overcharge \mathbb{E}[(M-L)_+] where M is margin and L is loss, or as some risk-free rate multiplied by the required margin, sometimes known as funding cost. It follows that higher margin products demand higher expected returns in an equilibrium (Gâleanu and Pedersen, 2011).

See Brennan, 1986; Shanker, 2014; Berlinger et al., 2019; Capponi and Cheng, 2018 for existing optimization problem formulations.

For our formulation, we want to balance between prudentiality and opportunity cost without relying on exogenous parameters that we need to calibrate, so we will minimize the sum of expected margin shortfall and expected margin overcharge. The only constraint we will impose is that we want to remain solvent under this margin requirement. Hence, we formulate our optimization problem with expectile value-at-risk as the following:

where n is the number of traders, and x_i^t denotes the unrealized profit and loss of the account for trader i and current time t. In words, the first term in the summation of our objective function is expected margin overcharge \mathbb{E}[(M - L)_+] and the second term is expected margin shortfall \mathbb{E}[(L - M)_+]. The constraints require the new margin requirement for each trader to be no less than their current loss.

One issue, however, is that the optimal margin requirement EVaR_{\tau^*} could be too lenient compared to \tau \approx 0.00145, which results in similar values to the industry standards VaR_\alpha with \alpha = 0.01 and ES_{\alpha'} with \alpha' = 0.025 under normal distributions.

For the future, we will also consider margin change frequency via “margin bands” (Lam et al., 2010), initial margin requirements, partial liquidation mechanisms, and requiring additional margin for large positions.

# Questions

- What are some efficient methods to solve this optimization problem?
- What are suitable, alternative formulations for the objective function?