Coder Social home page Coder Social logo

Tracking error about riskfolio-lib HOT 3 CLOSED

dcajasn avatar dcajasn commented on August 25, 2024
Tracking error

from riskfolio-lib.

Comments (3)

dcajasn avatar dcajasn commented on August 25, 2024 1

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.

TomLiu518 avatar TomLiu518 commented on August 25, 2024

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.

dcajasn avatar dcajasn commented on August 25, 2024

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)

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.