Comments (3)
Hi Tom, the formula that I use for tracking error is to calculate the difference between the index returns and portfolio returns and then calculate the sample standard deviation of this difference. I use this approach that is equivalent to the ex-ante because it can be used when you don't have the composition of assets of an index. Also, the tracking error is a constraint, so the resulting portfolio must have a tracking error lower or equal than your constraint. Another problem that you must consider is that the tracking error constraint must be in the same frequency than your assets returns. If you have a problem, you can send me your notebook to check where is your problem.
from riskfolio-lib.
Hi Dany, thanks. I guess my question now is, can you customize constraint and objective functions? for example if i want use a different method to calculate tracking error as a constraint?
from riskfolio-lib.
Hi Tom, about your question you can't customize objective functions. The reason for this is that Riskfolio-Lib is based on cvxpy so it can only solve disciplined convex problems. All combinations of objective functions and constraints in Riskfolio-Lib are disciplined convex problems (you can check the papers in documentation), so they can be solved by cvxpy. On the other hand, if you want to limit the max value of a risk measure while optimize another is posible (I will make an example soon), for example you can maximize sharpe ratio while you put a constraint on CVaR. Finally, If you want a new objective function or constraint, check if they are convex and send me the formula or paper is based to try to include in Riskfolio-Lib.
from riskfolio-lib.
Related Issues (20)
- 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
- create reward class as a namespace to hold different reward functions HOT 2
- support Portfolio optimization with factor model? HOT 1
- Problem while installing HOT 3
- Rewording of sentence in README HOT 1
- Python 3.12 support HOT 1
- Latex error building reports... HOT 1
- Possible conceptual error in implementation on HRP (De Prado) HOT 1
- utils.dwnload returns uses closing prices and should use adjusted closing prices HOT 2
- Riskfolio-lib v. 6.1.1 fails with matplotlib 3.8.0 and 3.9.0 HOT 2
- Problem After Code Update HOT 1
- Question about the two_diff_gap_stat function HOT 2
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.