Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
1k views

Implementing the Sharpe's return-based style analysis on Python

I am trying to implement the Sharpe's return-based style analysis on Python. The problem is formulated as follows: ...
JungleDiff's user avatar
1 vote
1 answer
856 views

PortfolioAnalytics: What is the training_period and rolling_window "type" in optimize.portfolio.rebalancing?

In R-package PortfolioAnalytics, what is the unit of the training_period and rolling_window ? is it the just data points ? or is ...
Courvoisier's user avatar
3 votes
1 answer
487 views

Portfolio Optmization With Risk Aversion Parameter R

I have this problem in R. $$\max w^Tu- y w^T A w$$ where A is covariance variance matrix, y risk aversion parameter. Is it rigth if I use the function solve.QP multiplying the covariance matrix for ...
Elisa Ballestrelli's user avatar
2 votes
1 answer
4k views

Turnover as a soft constraint for portfolio optimization

I am using cvxpy to do a simple portfolio optimization. I implemented the following dummy code ...
ThatQuantDude's user avatar
-1 votes
1 answer
325 views

How to run optimization to achieve an equal active weight portfolio?

I am trying to build an equal active weight portfolio, while minimizing the total risk. However, my constraint of equal active weight always leads to 0 active weight for everything. I know 0 active ...
dickli2119's user avatar
1 vote
2 answers
6k views

portfolio optimization with weights constraint in python

I'm trying to optimize a portfolio using cvxpy. My original construction is the following: ...
Michael's user avatar
  • 500
0 votes
1 answer
2k views

Why am I getting 'NaN' for as the output for a porfolio of 505 assets?

In an attempt to construct the efficient frontier curve for a portfolio made up of all the stocks in the s&p index, I have run into some strange error for the calculations of the volatility of ...
Mysterio's user avatar
  • 105
1 vote
2 answers
460 views

Portfolio optimisation - Non brute force solutions to optimisation problems

Recently I wrote a program in Python which extracts stock data for a designated period and frequency of the predetermined stocks and then optimises the portfolio using the Sharpe ratio. In order to ...
Noir's user avatar
  • 257
3 votes
1 answer
244 views

Why is this utility function not picking up its penalty?

I was reading this seminal paper by Infanger. On page 40, Figure 11. was quite interesting. In particular I was interested in the top one, 19 Years and I wanted to reproduce this plot. To give some ...
math's user avatar
  • 1,770
0 votes
1 answer
233 views

Finance specific modules for Python in 2017?

I'm currently using Pandas, Numpy, Scikit-learn, Matplolib but I feel those are just general data analytics related modules. I was taking a Couresa course that used QSTK for specific quant related ...
moondra's user avatar
  • 151
2 votes
1 answer
5k views

Why optimize.portfolio in R package PortfolioAnalytics is not working?

I used the R-package PortfolioAnalytics for portfolio optimization. In the portfolio optimization part. I used the function optimize.portfolio to set up my optimization. However, here was the error ...
KW_IVDD's user avatar
  • 21
0 votes
0 answers
906 views

Equal Risk Contribution in Portfolio Analytics r pkg

I am trying to estimate the weights of an equal risk portfolio using the PortfolioAnalytics package in r. To start with, I have tried to redo the example provided in the portfolio vignette. The code ...
Sadhak's user avatar
  • 23
2 votes
0 answers
729 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
0 votes
2 answers
149 views

portfolio optimisation based on historical prices [closed]

I'm hoping somebody can help me with the following problem (I'm not a quant). I have a SQL table which contains the historic prices for 3 securities, x,y and z. It has the date and the price. I have ...
user2669338's user avatar
2 votes
1 answer
3k views

What is optimize.portfolio.rebalancing in R-package PortfolioAnalytics calculating?

I recently started using the R-package PortfolioAnalytics for performing some portfolio optimization. And I'm trying to get a grasp on what exactly the function <...
Marcus C.'s user avatar
  • 153
3 votes
1 answer
6k views

Mean Variance portfolio optimisation (Long Only) CVXPY including cardinality constraint

I am working on a portfolio optimisation that requires me to constrain on the number of assets used, e.g from S&P500 build a 20 asset portfolio that is feasible. After doing some research I came ...
ThatQuantDude's user avatar
2 votes
1 answer
3k views

How to calculate the global minimum variance portfolio in R?

I am attempting to use the globalMin.portfolio command to calculate the global minimum variance portfolio in RStudio. My code is as follows (note that several ...
percy's user avatar
  • 23
2 votes
2 answers
2k views

How many years of historical data is require for Portfolio Optimization?

I would like to know about below questions. How many years of historical data is require for Portfolio Optimization in R programming. Thanks Atul
Atul Agarawal's user avatar
2 votes
0 answers
410 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
5 votes
1 answer
1k views

Portfolio Optimization using Parametric Portfolio Policy Method in MATLAB

I want to contruct an optimized stock portfolio with the restriction of a zero-investment strategy. The portfolio weight in each stock needs to be modeled as a function of state variables (factors ...
Nourhaine Nefzi's user avatar
2 votes
2 answers
872 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
3 votes
1 answer
2k views

Portfolio Analytics Optimization

I have a large dataset, 10,000 investments I am trying to create an optimized portfolio for. The portfolio has 3 restrictions. Long Only, Only 50 assets can be selected and every invested asset has ...
JB17's user avatar
  • 41
1 vote
0 answers
484 views

Portfolio Optimization with equal weight for assets selected

I have a data frame of bets, with 1 being a win and 0 being a loss. These bets are correlated so I cannot just pick the highest winning percentage. Goal is to get 2 optimizations, 1 for max sharpe ...
JB17's user avatar
  • 41
3 votes
2 answers
1k views

How to perform portfolio optimization with user-defined expected return and variances using R?

I found some functions for Markowitz mean variance portfolio optimization in R such as portfolio.optim in tseries package. ...
HasnainMamdani's user avatar
6 votes
2 answers
660 views

Matlab Portfolio Optimization with bid ask spread

I'm trying to find the optimal portfolio of options and stock which minimizes the standard deviation of the portfolio returns but also taking into consideration the bid and ask prices of the assets. ...
Michael Watters's user avatar
5 votes
1 answer
4k views

constrained portfolio optimization by fmincon

I am working through this paper, http://www.nber.org/papers/w8922.pdf I want to implement the portfolio weight constraints see page 6-7. Here is the brief overview of my problem: Let ...
active's user avatar
  • 71
1 vote
1 answer
690 views

constrained portfolio optimization in matlab

I am working through this paper, http://www.nber.org/papers/w8922.pdf I want to implement the portfolio weight constraints see page 6-7. Here is the brief overview of my problem: Let ...
user13895's user avatar
2 votes
3 answers
3k views

Portfolio Optimization - Zero beta portfolio

I am trying to solve a optimization portfolio in R in which I do the following constraints: Set weight sum to within a boundary Set return to a certain value Set portfolio beta to 0 The purpose is ...
Artur Silva's user avatar
2 votes
1 answer
661 views

Equall Risk Contribution and The Most Diversified Portfolio [closed]

I am a master degree student on applied economics at Brazil and my thesis will be about smart beta strategies. I pretend to apply Equal Weigth, Mininum Variance, Most Diversified Portfolio and Equal ...
Gabriel Wadih's user avatar
2 votes
1 answer
2k views

short-sale constraint with nonpositive-definite matrix in portfolio optimization

I need help about portfolio optimization in R. I have inverted matrix and I want to use it as an input in portfolio optimization. It was non-positive definite before I have handled it. In portfolio ...
user13895's user avatar
2 votes
2 answers
7k views

Calculating the efficient frontier from expected returns and SD

I'm trying to calculate the efficient frontier (and the optimal portfolio at the Sharpe ratio) given two vectors for a portfolio: (1) expected returns and (2) historical standard deviations. I would ...
itpetersen's user avatar
0 votes
1 answer
4k views

How do I do a mean variance optimization with constraints?

I am using python and the cvxopt library to calculate an efficient frontier, per the docs: http://cvxopt.org/examples/book/portfolio.html However, I cannot figure out how to add a constraint so that ...
bobo5645's user avatar
4 votes
3 answers
1k views

Sampling problem in portfolio optimization

In a summary I am trying to do the following Bond Subset 1 : Get list of USD Bonds --> Filter out Bonds which have YTM > y% DUR > 10 Y etc. .. This gives us Bonds which we are interested in. So in ...
ash's user avatar
  • 921
3 votes
0 answers
489 views

What R-packages for SOCP problems are there?

Currently, I am looking deeper into the topic of second-order cone programming. Could you suggest packages that solve SOCP-problems in R? With your answer, please provide a short description of ...
vanguard2k's user avatar
  • 2,935

1
2