Portfolio optimizer
Introduction
The portfolio optimizer converts models forecasts into dollarized target positions, taking into considerations various constraints, including risk, GMV, max esposure by coin, etc.
It is solving a convex optimization problem at each rebalancing period.
Therefore, it is the first step into bulding the trading strategies framework on top of the quantitative framework.
Description
Consider an investor who wishes to allocate capital among securities at time and hold them over a single period of time until . We denote the (known) price of security at the beginning of the investment period and the (random) price of security at the end of the investment period . The rate of return of security over period is then modeled by the random variable , and its expected value is denoted by . The risk-averse investor seeks to maximize the return of the investment.
The part of investment risk called specific risk (the risk associated with each individual security) can be reduced (for a fixed expected rate of return) through diversification, which means the selection of multiple unrelated securities into a portfolio. Modern Portfolio Theory formalized this process by using variance as a measure of portfolio risk, and constructing a optimization problem.
To be able to solve the portfolio optimization problem, we have to assume that the investor knows the value of the expected return vector and covariance matrix . In practice it is only possible to have estimates, which we denote by and respectively.
Rebalancing a portfolio generates turnover, i. e., buying and selling of tokens to change the portfolio composition. The Markowitz model assumes that there are no costs associated with trading, but in reality, turnover incurs expenses. We take this into account in the form of transaction cost constraints.
Note that to be able to compare transaction costs with returns and risk, we need to aggregate them over the length of the investment time period.
Source: Mosek.
Methodology
Risk term:
Returns term: forecast_returns
TransactionCosts: 0.0015 * (x - current_notional) + k * (x - current_notional)^2
Where k = 0.001 * C * sigma / (MDV x p_t)
sigma: annualized volatilty in %
p_t: token price at time t
C: cost coefficent
MDV: median 90 days volume.
Objective function: U = returns - lanbda * risk - TransactionCosts
Constraints:
GMV < GMV_max
NMV < NMV_max
single_coin_exposure < single_coin_exposure_max
mdv < mdv_max
Problem to solve:
maximize U
subject to: constraints
Last updated