-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introducing the R-squared coefficient and Treynor Ratio for a financial portfolio #134
Conversation
…for a financial portfolio
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good implementation.
Only the two tiny suggestions I mentioned, and can I ask you to add unit tests for finquant.quants.treynor_ratio please. The other one does not require any since you are using a function from scikit-learn, so we can assume it is thoroughly tested. Other than that, this PR is clean and nicely done. Thank you for this addition :)
Co-authored-by: Frank Milthaler <fmilthaler@users.noreply.github.com>
Co-authored-by: Frank Milthaler <fmilthaler@users.noreply.github.com>
My pleasure! I forgot the unit tests for the Treynor Ratio, but I just added them. As you guessed, I used a function from |
The R-squared coefficient measures how closely the portfolio's returns track the benchmark market index's returns. On the other hand, the Treynor Ratio is a metric used to evaluate an investment portfolio's risk-adjusted returns.
They have been incorporated in the same PR to simplify the merging, and because such parameters both refer to the market index.