Giter Site home page Giter Site logo

portfolioopt's People

Contributors

czielinski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

portfolioopt's Issues

pip installation gives error

Hi,
I want to install portfolioopt using pip, But I keep getting the same error.
This is the error:

error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\link.exe' failed with exit status 1181

Failed building wheel for cvxopt

I have looked up forums and installed all possible extensions of Microsoft Visual Studio 2017 with C++, but it is still not working.
What else do I need to do to install cvopt properly?
Many thanks in advance.

can not find base in cvxopt

Hi, thanks for your efforts and works.
the copy of example.py is not working on the fresh installation of the package. it throws an error indicating cvxopt.base library does not exist.
I think this is because of several changes that have been made since version 1.1 of cvxopt library.
for example, all of the functions of base class now are accessible directly from cvxopt library.
I tried to change all the imports which had base in their address in the init file but it did not help I think some of the function names may have changed since. eg ediv-> div.
after all this, I would be very glad if you let me know of the changes you maybe are gonna make to your library. and I would be very glad if you let me know if there is a need for contribution.

Max weights help

Hello,

First thank you for sharing your work. I am using the code and find it helpful to me. One thing i am not having success with is incorporating many asset classes. In the create_test_data function the number of assets is 5. I understand how to increase the number but am finding a portfolio with many assets and small weights. I need to constrain the model to set a max and min weight to asset classes. I am trying to find the efficient frontier and create a portfolio with assets selection/population of around 150 but want to limit the weight of a specific asset to a specific number for example 5%. 100/5 = 20 so i am trying to find a fund of only 20 with 150 selections to choose from. I am writing in the hopes that you know a simple and elegant solution. My solutions have not been optimal. Thanks in advanced and i understand if you are busy.

Different Average

Hey there Christian,

we use your tool and get the same results as you do.
But when i calculate the portfolio-weights with my Excel-Solver i get different results.

Maybe the reason is that we calculate the average differently.
When i calculate the average returns for asset_a in Excel i get 0,008056.
In your examply.py the average for asset_a is -0,001237.

Can you please tell me how you get this average?

Thank you in advance and thank you for the good work!
LinkFoxMario64

G and h in Tangency portfolio function

Hello Christian,

I've been looking at this repo for a while and got confused by the below comment in "def tangency_portfolio",
# exp_rets*x >= 1

I'm wondering why it should be the case, as I can only think about the expected return of the portfolio should be larger than risk free rate and it is much smaller than one.

Thanks,

Michelle

Import my data

Hi Christian Zielinski,

I like your package and i would like to use it for my portfolio.
So, i wish use my own data.
In your exemple.py, your import your data like:
def main():
returns, cov_mat, avg_rets = pfopt.create_test_data()

I try with my pandas dataframe data m:
m=
Out[92]:
Returna Returnb Returnc Returnd
Date
2017-01-05 -0.007472 -0.007472 -0.007472 -0.007472
2017-01-06 0.014726 0.014726 0.014726 0.014726
2017-01-09 -0.008241 -0.008241 -0.008241 -0.008241
2017-01-10 -0.001318 -0.001318 -0.001318 -0.001318
...
len(m)
Out[95]: 98

type(m)
Out[96]: pandas.core.frame.DataFrame

So i tried to change your code like:
def main():
returns, cov_mat, avg_rets = m

and i have the error:
Traceback (most recent call last):

File "", line 70, in
main()

File "", line 22, in main
returns, cov_mat, avg_rets = m

ValueError: too many values to unpack

If you can to help me, i thanks you a lot.

Hi, Thanks in advance for our work.

Thanks in advance for your work.
As mentioned in the issue title I'm failing the building wheel for cvxopt.
I'm on a Windows 7 system and I'm installing to a Python 3.5 environment with:
pip3 install portfolioopt
If you need further info let me know.
Thx

Max weight

Hi how should i change the come to cap they waithe at 10% for the portfolio for example.

thx a lot

Fons

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.