93 questions
0 votes
0 answers
23 views
Error in solve.QP(Dmat = H, dvec = -c, Amat = t(Aneq), bvec = bneq) : constraints are inconsistent, no solution
Can someone help me with this R code. It's a quadratic optimization problem and something is wrong, as I get an error: Error in solve.QP(Dmat = H, dvec = -c, Amat = t(Aneq), bvec = bneq) : constraints ...
0 votes
0 answers
83 views
Implementing Ehling and Ramos (2006) Mean Variance Efficiency Test for Portfolio Diversification in R
I am trying to do the test of Ehling and Ramos (2006), paper is here. Simply, the paper compares diversification benefit between a portfolio of companies and a benchmark. I am considering my benchmark ...
0 votes
0 answers
94 views
Portfolio optimisation in R with Long Panel data
In regards to this question Portfolio Optimisation under weight constraints, I have a long unbalanced panel data of company returns as well as sector dummy variables taking values of 1 if that company ...
0 votes
1 answer
145 views
Maximum Decorrelation portfolio optimisation
Suppose that I have a data for U.S sector indices such as Non Durable, Durable, Manufacturing,..., etc and for the companies within each of these sectors. I am aiming to see if for the given sectors, ...
1 vote
2 answers
4k views
Import Error undefined symbol: _Z7qpgen2_PdS_PiS0_S_S_S_S_S_S0_S0_S0_S0_S0_S0_S_S0_
I am running this repo: https://github.com/TUMFTM/global_racetrajectory_optimization on a WSL (alternatively I have tried it on multiple different machines like several Linux machines as well as an ...
0 votes
0 answers
90 views
Portfolio Optimization - R solve.QP giving "constraints are inconsistent, no solution"
When I run a shiny app for portfolio optimization, I get this error ("constraints are inconsistent, no solution") randomly about half the time, while it seems to work correctly half the time....
2 votes
3 answers
3k views
How to properly install qpsolvers for Python on Windows?
I am trying to install qpsolvers using pip. The installation goes without errors, and the module imports properly afterwards. However, qpsolvers has no available solvers for it to use : import ...
0 votes
1 answer
473 views
Error: Failed building wheel for quadprog (Ubuntu, python)
In macos I did not receive that error, in Windows I had to install Microsoft Visual Studio but on Linux I do not know how to solve this. The error shows after I type to the terminal: pip install ...
1 vote
0 answers
638 views
Installing/using quadprog in Python
Has anyone used quadprog in Python before? I tried installing and importing it, and it was succesful, but when I try to use it I get this message: 'module' object is not callable Installed with: pip ...
0 votes
1 answer
175 views
Quadratic optimization - portfolio maximization problems
In portfolio analysis, given the expectation, we aim to find the weight of each asset to minimize the variance here is the code install.packages("quadprog") library(quadprog) #Denoting ...
0 votes
0 answers
134 views
how can get rid of "ValueError: all the input array dimensions except for the concatenation axis must match exactly" error when use cvxopt function?
first i define some matrix and vector in proper shape . initialization I=np.eye(24) Z=np.zeros((24,24)) a=0.012 b=1.1 gamma1=0.9/80 gamma2=1.1/80 MM=np.eye(24) for i in range (22): MM[i+1,i]=-1 ...
3 votes
2 answers
2k views
Find linear combination of vectors that is the best fit for a target vector
I am trying to find weights across a number of forecasts to give a result that is as close as possible (say, mean squared error) to a known target. Here is a simplified example showing three different ...
0 votes
0 answers
300 views
Quadprog for Portfolio Optimization with Constraints
Let me start by saying I am new to Stack Exchange sites, so apologies if this turns out to be a low quality question. I am trying to run a mean-variance portfolio optimization using Solve.QP in R and ...
0 votes
0 answers
1k views
Usage and determination of the arguments of quadprog::solve.QP
The function of quadprog looks like that: solve.QP(Dmat, dvec, Amat, bvec, meq=0, factorized=FALSE) My objective function is: And my two constraints are: Now my aim is to determine the single ...
1 vote
0 answers
382 views
How do I correct this Value Error due to Buffer having the wrong dimensions in a quadprog SVM implementation?
I'm using the quadprog module to set up an SVM for speech recognition. I took a QP implementation from here: https://github.com/stephane-caron/qpsolvers/blob/master/qpsolvers/quadprog_.py Here is ...