# Questions tagged [optimization]

The selection of a best element from some set of available alternatives. Typically consists of maximizing or minimizing a real function by systematically choosing input values from within an allowed set and computing the value of the function.

280 questions
Filter by
Sorted by
Tagged with
107 views

2k views

### Variance Matrix with 'nan' values

I am trying to optimize a simple portfolio using several random weights and choosing the best. When the number of assets is large I get a covariance matrix with 'nan' values because some asset pairs ...
444 views

### Portfolio Optimization with maximum number of Trades constraint

i am currently running linear optimization and maximizing summation of (weight*score) for each assets. I am running it on assets that are difficult to trade and the universe is easily about 2000 of ...
2k views

### Improvement of Alpha Expression [closed]

I'm newbie user of Websim (websim), given Alpha Expression : (est_eps * (cashflow/sharesout) * (est_sales/sharesout))/est_dividend_ps Settings-Region:USA, Universe:TOP3000, delay:1,MAX stock weight :...
172 views

### Solution for Markowitz problem with Safety-First Ratio

What is the solution for the following markowitz unconstrained problem? The sum of the entries of the weights vector $w$ should always be requied to sum one? Or if we use the risk-free asset it can be ...
1k views

### Derivation of the efficient frontier set (markowitz problem)

I would like to find a Derivation of the efficient frontier set for the markowitz problem:
238 views

### Solving a Markowitz problem with restrictions (lower and upper bound) to the weights vector

I would like to find a step by step solutionfor the following Markowitx problem. It is a standard markowitz problem. The unique detail (wich is why I am posting this question here) is that there is a ...
281 views

### PortfolioAnalytics [R] - optimize.portfolio.rebalancing / rebalancing period

I am having difficulties trying to set up the rebalancing period to semi-annual or every 9 months in the optimize.portfolio.rebalancing function in the package ...
764 views

### R optimization using OPTIM

I have a covariance matrix and vector of expected returns as my inputs. I have used optim to solve for the weights that maximize the portfolio's return/volatility. I like optim as you can create your ...
3k views

### Fitting GARCH(1,1) in Python for moderately large data sets

I am using the arch package in python to fit a GARCH(1,1) to fit daily S&P 500 returns from 1990 to 2017 (about 6800 data points). The code I am using is as follows: ...
87 views

79 views

### Maximum likelihood for lognormal mixture

I have a collection of historical data that I want to fit to the following model $$y_{t+1} - y_t = \alpha + (\rho + \sigma_2 Z_{t+1} )y_t + \sigma_1 Z_{t+1}$$ where everything except the y's are ...
2k views

### Dmat argument in solve.QP R function: Cov or 2*Cov?

Background My final objective is to find a portfolio located on the efficient frontier from a choice of 100 stocks from a stock index (eg. S&P500). This efficient portfolio will be such that ...
2k views

### Black Scholes in Practice: Delta Hedging

From the Wikipedia page, we know call option as an example is price through delta hedging. $$\Pi=-V+V_SS$$ and over $[t,t+\triangle t]$ $$\triangle\Pi=-\triangle V+V_S\triangle S$$ My questions ...
2k views

### Portfolio optimization subject to transaction costs

Mean-Variance portfolio optimization attracted lots of attention in this forum so far. I am interested in the effect of incorporating transaction costs into the decision framework and I would like to ...
2k views

### How to build a market-neutral portfolio using CVXPY?

I am trying to implement a simple minimum variance portfolio optimisation with a few simple constraints: long-only portfolio fully invested (sums to one) market-neutrality, i.e sum(betas) = 0. I am ...
545 views

### Maximum Certainty Equivalent Portfolio with Transaction Costs

Out of curiosity I tried to compute the portfolio weights of a maximum certainty equivalent allocation, however, by incorporating (quadratic) transaction costs. However, my result is not as intuitive ...
56 views

### DJIA Portoflio Optimization

I've been practicing R for about several months, and have begun transitioning from text book examples to what actually interests me. I'm currently participating in the CFA program, but my programming ...
211 views

### Translating matrix expression of Lagrangian into solve.qp() parameters (R)

I have no idea how to do this. I can set up the Lagrangian, but I don't know how to translate it into solve.qp() inputs. The inputs are Dmat, dvec, amat, bvec, ...
296 views

### How to (efficiently) calculate the maximum possible return of a perfect “crystal ball” investment strategy?

I am new to the world of investing, so please excuse the clumsy wording of the question... there is probably a better term for what I am looking for or maybe this is even a known/classic problem. If ...
333 views

### Mean-Variance Optimization Techniques with Multiple Asset Classes

Why does it make sense to use single-period Markowitz mean-variance optimization techniques when we're trying to figure out asset allocation across multiple asset classes (bonds, stocks, REITs, etc)? ...
6k views

### Formula for Optimal Portfolio of 2 Assets when No Shorting Allowed?

I am looking for a formula to calculate the weights of two risky assets that produce the optimal portfolio (i.e highest Sharpe ratio). So far I have found the following formula from a website of ...
667 views

### Asset allocation problem using Hidden Markov Model

I am recently getting more interested in Hidden Markov Models (HMM) and its application on financial assets to understand their behavior. But what captured my attention the most is the use of asset ...
182 views

### EM for conditional Gaussian model

Let $$X_1\sim N(\mu_{X_1},\sigma_{X_2}^2)$$ $$X_2\sim N(\mu_{X_2}, \sigma_{X_2}^2)$$ where $\mu_{X_2}=c+aX_1$. Also, I have data $D$ (with missing values on $X_1,X_2$). How can I update/estimate the ...
1k views

### How to understand this Risk Parity Algorithm?

I am trying to understand an optimization algorithm to achieve risk parity in a portfolio. I need some help figuring out the notation in the following formula: I found this on THIS paper. I ...
236 views

### Portfolio with zero or negative initial cost

Let's say I have formulated an integer linear programming (ILP) problem with the objective function $$F(X)=V(T,X)-C(t,X),$$ where $V(T,X)$ is the payoff of portfolio, and $C(t,X)$ is the initial cost ...
813 views

### Quantum Computing for Quantitative Finance

It's been a while that quantum computing is looked as the next step in computational science. I somewhat always tought we were decade aways from it's happening but it appears I was wrong: ibm-quantum-...
10k views

### Why do we assume quadratic utility in portfolio theory?

In my text (Investments by BKM), the investor's mean-variance utility (given as $U = E[R] - \frac12A\sigma^2$) is stated to be the objective function we wish to maximize. Upon further digging, it ...
372 views

### Optimize a trading strategy created in excel with R

I have created quite a complex back test in excel spanning 15 years with 17 parameters. I would like to optimize the parameters which would give me maximum return given a maximum draw-down percentage. ...
123 views

### Using Market Prices of Bonds to Model the Discount Curve with a Polynomial (Math + R)

I have a small program I'm building to interpolate the discount curve from a portfolio of benchmark bonds. If anyone has any guesses as to whether it's my process, or my code that's messed up I would ...
225 views

356 views

### dynamic Markowitz portfolio

Let's take 4 assets, whose values are known during a period of time of 2 years. Then I calculate the expected returns for each of these 4 assets thanks to these 2 years - historical data. I deduce the ...
38 views

### Equitable Allocation

This questions borders on the actuarial side of things but the general solution should have relevance in several situations. Suppose we have a set of $k$ people who will retire in $\{n_1,...,n_k\}$ ...
353 views

### Portfolio with lots of subportfolios

An account manager has $N$ distinct, equally-sized pots of money, which will be used to make $N$ distinct subportfolios, each of which is drawn from a slightly different (but potentially overlapping) ...
358 views

### Determining maximum strategy capacity and optimal order size for low frequency equity strategy

I have developed a low frequency equity trading strategy that seems to work well with stocks in the S&P 500. Someone asked me about the maximum capacity of the strategy (how much AUM I could ...