Comments (5)
Hi @feribg,
About your questions, well I chose pd.series since I added w_max and w_min parameters because it is easier to work with them when we use Graph based portfolio models. After check your code, there is no bug on Riskfolio-lib, the problem is in the pd.Series constraints you created.
Best,
Dany
from riskfolio-lib.
@dcajasn what is the problem how should those be created i get errors in both cases when the index is a sequence (0, len) and when the index is the list of assets. So how should those be constructed? When the index is a sequence the error is the assets are not in the index, when its the assets the error is the the sequence is not in the asset list...
One thing worth pointing out is that my assets are integer IDs and not strings.
from riskfolio-lib.
Check your code (list() is not a ps.Series method). There is no problems with Riskfolio-Lib. Use hrp_constraints function to build constraints.
from riskfolio-lib.
This is a superficial example the real code uses columns.tolist() etc. I literally copied the code in when w_max
is none.
My w_max and min look exactly like the output described here https://riskfolio-lib.readthedocs.io/en/latest/constraints.html it's an index of asset Ids (integers) and a fixed value for all assets. I will add a mini example to see how it fails. Do you expect the index to be string? I think this is where things go wrong if its integer you assume positional index although i cant see where in the code that happens...
from riskfolio-lib.
All indexes and column names in pandas series and dataframes must be strings.
from riskfolio-lib.
Related Issues (20)
- Allowing sht (to allow short ) in the HCPortfolio NCO method HOT 3
- risk parity portfolio comparison to R HOT 1
- Reports.excel_report() can't deal with multiple portfolio HOT 1
- Pandas 2.0 HOT 5
- [Feature Request] Add Treynor Black Model for Portfolio Optimization Feature HOT 1
- Optimization without return streams HOT 1
- Custom weights Contrain HOT 1
- module 'riskfolio.external.cppfunctions' has no attribute 'kurtosis_matrix' HOT 1
- example not working HOT 7
- Plotting erros HOT 1
- Constraint violation HOT 2
- LaTeX legend with ParserError HOT 3
- Constraints in Riskfolio does not work HOT 1
- Conditional Portfolio Allocation Constraints HOT 1
- Can online portfolio problems be solved? HOT 1
- Tutorial 18-AttributeError: 'NoneType' object has no attribute 'to_numpy'-- pls. look into HOT 4
- Positioning vector here HOT 1
- Examples pages HOT 1
- Report generation failing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from riskfolio-lib.