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.

Filter by
Sorted by
Tagged with
2 votes
1 answer
548 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 ...
FerdinandC's user avatar
0 votes
1 answer
899 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 ...
campione's user avatar
5 votes
0 answers
4k 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: ...
user369210's user avatar
1 vote
0 answers
97 views

Confusion about Assumptions in Markowitz Optimization

Setup and Definition of Terms Supposed that we have a universe of possible securities $\mathcal{S}$. We wish to construct an "optimal" portfolio, which will be represented by proportional weights $\{...
Peter Wills's user avatar
8 votes
1 answer
1k views

What's the importance of duality theory in portfolio optimization?

I'm interested in portfolio optimization and there's a lot of modelizations out there using duality theory. Since I didn't study that yet, I searched around the net to understand what it means and ...
mlx's user avatar
  • 287
2 votes
0 answers
725 views

Optimal weights for portfolio optimisation (r)

The question is what R optimization could be applicable to find a vector of weights that when, multiplied by S matrix creates equal rows sums, and when set in the objective function returns the ...
user2948605's user avatar
4 votes
1 answer
127 views

Proof that linear returns aggregate across securities

I keep reading that linear returns aggregate across securities, but I'm having trouble proving it. I suspect there's some mistake in my approach; I'd appreciate some help in seeing it. Suppose we ...
Peter Wills's user avatar
2 votes
1 answer
435 views

Optimize portfolio of non-normal binary return assets

I am facing t = 1,..T investment periods where each period I have x$ to invest. Suppose each period I can build a portfolio from thousands of assets (some are uncorrelated whilst some are highly ...
rock3000's user avatar
1 vote
0 answers
91 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 ...
Nid's user avatar
  • 33
3 votes
2 answers
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 ...
Zeca's user avatar
  • 45
5 votes
2 answers
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 ...
ZHU's user avatar
  • 167
3 votes
1 answer
3k 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 ...
Stefan Voigt's user avatar
  • 1,456
1 vote
2 answers
3k 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 ...
ThatQuantDude's user avatar
7 votes
2 answers
714 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 ...
Stefan Voigt's user avatar
  • 1,456
0 votes
1 answer
65 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 ...
Munckinn's user avatar
0 votes
1 answer
278 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, ...
milkmotel's user avatar
  • 376
5 votes
1 answer
664 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 ...
KlaasNotFound's user avatar
0 votes
0 answers
416 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)? ...
beeba's user avatar
  • 1,074
2 votes
2 answers
10k 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 ...
Cyrix's user avatar
  • 21
0 votes
2 answers
782 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 ...
Nourhaine Nefzi's user avatar
0 votes
1 answer
195 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 ...
snowave's user avatar
  • 191
2 votes
1 answer
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 ...
Nicolas Galarza Ricci's user avatar
0 votes
1 answer
296 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 ...
Nick's user avatar
  • 253
14 votes
5 answers
1k 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-...
Lucas Morin's user avatar
9 votes
4 answers
15k 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 ...
Varun P's user avatar
  • 91
1 vote
0 answers
401 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. ...
Vinay Bharath's user avatar
2 votes
0 answers
173 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 ...
user3338639's user avatar
1 vote
1 answer
308 views

Portfolio optimization - maximize variance with exposure to risk factors equal to zero

Optimize a portfolio such that the exposure to risk factors is zero and the variance is maximized (instead of traditional minimization problem). so the optimization problem look like: $$maximize\;w^...
user20308's user avatar
1 vote
0 answers
53 views

Continous-time portfolio allocation optimization for a given consumption rate

I have the following PDE $0 = V_t - c(t)V_x - \lambda^2 V_x^2/V_{xx} + rxV_x + 1/2\lambda^2x^2V_{xx}$ where $t\mapsto c(t)$ is some given function and $r,\lambda$ are given constants. If necessary, ...
Calculon's user avatar
  • 595
1 vote
1 answer
613 views

Starting values for constrOptim() in R

I want to perform a constraint optimization for Maximum Likelihood Estimation in R to forecast volatility of returns. The probleme is that my initial values aren't in the permitted region. Is there ...
Nils 's user avatar
  • 49
2 votes
2 answers
861 views

Dealing with a constraint which is the square root of a quadratic form

I'm trying to maximize my portfolio, but don't know how to deal with the constraint which is on the form max $2u^Tx-x^T \Sigma x$ Subject to $e^Tx = 1$ $u^Tx - m (x^T \Sigma x)^{1/2} >= c $ ...
user19265's user avatar
2 votes
1 answer
297 views

Numerical Optimizer Matlab Calibration LMM

I am trying to mimimize the following function in order to calibrate the Libor Market Model $$\sum_{i=1}^{n} \left(\sigma_i^{market}-\sigma_i^{Reb}\left(a,b,c,d,\beta\right)/\sqrt{T_i}\right)^2,$$ ...
Tinkerbell's user avatar
3 votes
1 answer
435 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 ...
glork's user avatar
  • 617
0 votes
1 answer
40 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\}$ ...
Joseph Zambrano's user avatar
4 votes
1 answer
447 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) ...
Sprog's user avatar
  • 43
3 votes
1 answer
558 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 ...
pedro's user avatar
  • 31
2 votes
3 answers
831 views

What are the canonical books on optimization methods?

I am looking for some literature devoted to optimization methods in finance (portfolio optimization, asset pricing etc). Could you please recommend some books (perhaps, essentially non elementary: I ...
Nikita's user avatar
  • 21
0 votes
1 answer
65 views

Imposing MLE restrictions by logistic mapping

I am doing some Maximum Likelihood Estimation with a density that has time-varying parameters. I am using the fmincon function in Matlab, but I do not know how to ...
Masher's user avatar
  • 491
2 votes
1 answer
346 views

How to calculate a hypothetical minimum-variance point?

If we have $N$ assets which are uncorrelated, but have the same mean return of $\mu$ but the variances are different where $\sigma_i^2$ is the variance of each asset $i = 1, 2,...,N$ how can you write ...
klib's user avatar
  • 328
1 vote
0 answers
495 views

How to hedge an ETF position with a basket of its underlying components

In practice, when one takes on a large equity ETF position, I would imagine it's not necessarily "optimal" to hedge using a basket of all the constituents even though that should be a perfect hedge. ...
Palace Chan's user avatar
  • 1,347
2 votes
0 answers
59 views

Given (past) stock values for N assets, how to find the maximum - theoretical - profit?

In the past few days I have been thinking about a question which seems trivial, yet I can't think of any efficient way to find the optimal solution... Here is the problem: imagine you have a ...
Federico's user avatar
  • 121
16 votes
1 answer
690 views

Max option leverage strike

Since options represent leveraged stock investments, at which strike $K$ does a European option provide maximum leverage? Hereby define leverage $L$ as ratio of Delta/Optionprice: $$L(K)=\frac{\...
emcor's user avatar
  • 5,795
1 vote
1 answer
87 views

Segmented investment to yield same monthly return in each segment

Not an investment specialist, so please excuse the very basic math. Given a lump sum, I need to distribute this lump sum over (x) segments, each lasting (y) years (years can be different for each ...
Sina Khelil's user avatar
0 votes
0 answers
282 views

Discrete Hedging of Options

Assume that a stock $S_t$ follows simple geometric Brownian motion. Let's say we sold option whose payoff is $f(S_T)$. Now, we are only allowed to trade 2 times in the interval [0,T]. What kind of ...
Chandrasekhar's user avatar
5 votes
1 answer
333 views

Full Kelly portfolios having same weights as tangency portfolios

I'm currently comparing empirically the differences between Markowitz and Kelly portfolios. I calculated the Kelly weights for monthly return observations over 10 years for a sample of 50 stocks from ...
User1111's user avatar
3 votes
3 answers
2k views

Ledoit-Wolf Shrinkage estimator not giving positive definite covariance matrix

I used ten year daily data for 407 stocks and computed the daily and monthly covariance matrices. Since I have more variables than observations for the monthly matrix, I wasn't surprised to find the ...
User1111's user avatar
1 vote
0 answers
134 views

Smoothening yield curve by minimizing forward curve slope

I am using government bullet bond data and have bootstrapped a yield curve by solving the following optimization which minimizes unweighted price error: $$\text{min}\sum_i\left(P_i-\sum_t\frac{F_{it}}...
KHH's user avatar
  • 11
1 vote
1 answer
235 views

optimization with absolute constraints

Suppose I have an optimization where I need to impose ADV-like constraint (for a case where Shorting is allowed): $\max \mu'w - \lambda w'\Sigma w$ $ |w| \le V $ $ Aw = 0$ and I want to use a ...
uday's user avatar
  • 792
4 votes
0 answers
266 views

How would it be possible to use Dynamic Programming to search a space of investment strategies to find an optimum?

As my question states, the problem I am having is finding a sensible way to search a large space. Any help or insight that could be provided would be hugely appreciated. Currently I am trying to ...
ahair's user avatar
  • 71
4 votes
1 answer
486 views

How to scale $\alpha$, trading costs in a standard portfolio optimization problem

In the usual "portfolio optimization problem under linear constraints". Let me define the terms here. $$ \text{Find } w^*=\underset{w}{\text{argmax}} \ \ r^Tw - \lambda w^{T} \Sigma w - tradingCost(|...
statquant's user avatar
  • 1,288

1 2 3
4
5
7