Posts

Showing posts from March, 2023
Mean - variance optimization. Maximize the return for a given target risk. Optimization of some function could be very difficult problem if we are dealing with complex objectives and constraints. But the Convex optimization problem is one of well - known class of problems which is very useful for finance. A convex problem has the following form: $$ \begin{split}\begin{equation*} \begin{aligned} & \underset{\mathbf{x}}{\text{minimize}} & & f(\mathbf{x}) \\ & \text{subject to} & & g_i(\mathbf{x}) \leq 0, i \in \{ 1, \ldots, m \} \\ & & & A\mathbf{x} = b,\\ \end{aligned} \end{equation*}\end{split} $$ Where $ \mathbf{x} \in \mathbb{R}^n$ , and $f(\mathbf{x}), \; g_i(\mathbf{x})$ are convex functions [1]. Maximization of return given target risk. In the portfolio optimization problem we have some amount of money to invest in any of $n$ different assets of some set of assets. We can choose what f...
Mean - variance optimization. Minimize the portfolio volatility. Optimization of some function could be very difficult problem if we are dealing with complex objectives and constraints. But the Convex optimization problem is one of well - known class of problems which is very useful for finance. A convex problem has the following form: $$ \begin{split}\begin{equation*} \begin{aligned} & \underset{\mathbf{x}}{\text{minimize}} & & f(\mathbf{x}) \\ & \text{subject to} & & g_i(\mathbf{x}) \leq 0, i \in \{ 1, \ldots, m \} \\ & & & A\mathbf{x} = b,\\ \end{aligned} \end{equation*}\end{split} $$ Where $ \mathbf{x} \in \mathbb{R}^n$ , and $f(\mathbf{x}), \; g_i(\mathbf{x})$ are convex functions [1]. Maximization of return given target risk. In the portfolio optimization problem we have some amount of money to invest in any of $n$ different assets of some set of assets. We can choose what fraction $...
Mean - variance optimization. Minimize the risk for a given target return. Optimization of some function could be very difficult problem if we are dealing with complex objectives and constraints. But the Convex optimization problem is one of well - known class of problems which is very useful for finance. A convex problem has the following form: $$ \begin{split}\begin{equation*} \begin{aligned} & \underset{\mathbf{x}}{\text{minimize}} & & f(\mathbf{x}) \\ & \text{subject to} & & g_i(\mathbf{x}) \leq 0, i \in \{ 1, \ldots, m \} \\ & & & A\mathbf{x} = b,\\ \end{aligned} \end{equation*}\end{split} $$ Where $ \mathbf{x} \in \mathbb{R}^n$ , and $f(\mathbf{x}), \; g_i(\mathbf{x})$ are convex functions [1]. Minimization of risk given target return. In the portfolio optimization problem we have some amount of money to invest in any of $n$ different assets of some set of assets. We can choose what f...
Mean - variance optimization. Maximize the quadratic utility for a given risk aversion. Optimization of some function could be very difficult problem if we are dealing with complex objectives and constraints. But the Convex optimization problem is one of well - known class of problems which is very useful for finance. A convex problem has the following form: $$ \begin{split}\begin{equation*} \begin{aligned} & \underset{\mathbf{x}}{\text{minimize}} & & f(\mathbf{x}) \\ & \text{subject to} & & g_i(\mathbf{x}) \leq 0, i \in \{ 1, \ldots, m \} \\ & & & A\mathbf{x} = b,\\ \end{aligned} \end{equation*}\end{split} $$ Where $ \mathbf{x} \in \mathbb{R}^n$ , and $f(\mathbf{x}), \; g_i(\mathbf{x})$ are convex functions [1]. Maximization of the quadratic utility given risk aversion. In the portfolio optimization problem we have some amount of money to invest in any of $n$ different assets of some set of ...
Mean - variance optimization. The diversification of the portfolio with the help of $L_2$ regularization. The mean-variance optimization process often ends with most of the stock weights to be negligibly small. But in order to have a diversified portfolio, it should include a definite number of assets. It can be achieved with the help of the technique known as $L_2$ regularization [1]. To make it happen, we add a small - weight penalty to our objective function - the $\gamma \mathbf{w}^T \mathbf{w}$ (i.e a sum of square of the weights) member. Here $\gamma \gt 0$ is a constant parameter of regularization, the more the value of the $\gamma$, the more regularization (or diversification) effect we will have. This term reduces the number of negligible small weights, because it has a minimum value when all the weights are equally distributed, and the maximum value in the case where the only weight is nonzero and equal ...
Expected return and covariance matrix calculation. Expected return of the asset for holding period can be calculated as $R = \frac{V_f - V_i}{V_i}$ where $V_f$ = final value, including dividends and interest $V_{i}$ = initial value and the excess return formula is $R_p = R - 1$ $V_{i}$ = initial value Expected return of the asset for a long time period in most cases calculated as the geometric mean of the asset return for a small-time periods. $\overline{R} = \left(\prod _{i=1}^{N}a_{i}\right)^{\frac {1}{N}}={\sqrt[{N}]{a_{1}a_{2}\cdots a_{N}}}$ or, equivalently, as the arithmetic mean in logscale: $\overline{R} = \exp {\left({{\frac {1}{N}}\sum \limits _{i=1}^{N}\ln a_{i}}\right)}$ where $a_i$ are the asset returns for each period, $N$ is a number of periods. The expected return of the linear combination of $N$ random variables $x_i$ with coefficients $w_i$ correspondingly can be calculated as $\overline{R} = \sum _...
My new article on portfolio optimization - Optimizing the Sharpe ratio on the website for portfolio optimization. https://asset-master.net/optimize-sharpe-ratio