Skip to content
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

Adding new portfolio metrics #2029

Merged
merged 42 commits into from
Jul 7, 2022

Conversation

northern-64bit
Copy link
Contributor

@northern-64bit northern-64bit commented Jul 2, 2022

Description

Added new portfolio metrics to the metric command. These metrics are:
"gaintopain",
"trackerr",
"information",
"tail",
"commonsense",
"jensens",
"calmar",
"kelly",
"payoff",
"profitfactor"

To do:

  • Add risk of ruin
  • Fix jensen's alpha (it acts weirdly, please help)

If anyone knows how to fix the commit log please message me.

How has this been tested?

I ran all of the new metrics commands in the terminal and they seemed to work. Could someone please validate that they are correctly calculated?

Checklist:

Others

  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My code passes all the checks pylint, flake8, black, ... To speed up development you should run pre-commit install.
  • New and existing unit tests pass locally with my changes. You can test this locally using pytest tests/....

@Chavithra Chavithra added the feat S Small T-Shirt size Feature label Jul 2, 2022
@JerBouma
Copy link
Contributor

JerBouma commented Jul 4, 2022

Hey @northern-64bit,

What I am really missing is a simple Excel or Google Spreadsheet (or other tool) that illustrates that the calculations are correct. E.g. we need to be able to check whether the calculation makes logical sense to us.

I think I could just let this PR go through but it would be very high-level look at whether the calculations match that of what I wrote down. You think you can find a way to see if your calculations are correct? E.g. create a very simple portfolio and show that it works.

@northern-64bit
Copy link
Contributor Author

You think you can find a way to see if your calculations are correct? E.g. create a very simple portfolio and show that it works.

Sure, I'll make a simple portfolio in order to make a manual check with google sheets and then share it with you.

Copy link
Contributor

@JerBouma JerBouma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving this for now but we should re-check the metrics after portfolio refractor.

@northern-64bit
Copy link
Contributor Author

This is ready to be merged now after the tests have been fixed.

@JerBouma JerBouma merged commit 89297fa into OpenBB-finance:main Jul 7, 2022
@JerBouma JerBouma mentioned this pull request Jul 7, 2022
14 tasks
@northern-64bit northern-64bit deleted the portfolio_metrics branch July 11, 2022 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat S Small T-Shirt size Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants