-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
ENH: Add capm to financial.py #11058
Conversation
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.
I think there's a general reluctance to add new financial functions to numpy: #2880.
|
||
""" | ||
try: | ||
rf >= 1 or rm >= 1: |
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.
SyntaxError here.
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.
oops! I missed out the if statement there.
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.
"I think there's a general reluctance to add new financial functions to numpy: #2880."
Does it mean contributing to the finance library is void for now?
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.
@olamilekan000 indeed. I've added a comment to gh-2880 to that effect.
ke = rf + beta * (rm - rf) | ||
return ke | ||
except Exception as e: | ||
raise e |
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.
This try
/except
can be removed
@olamilekan000 thank you for contributing. we don't want to accept new financial functions, hence I'm closing this PR. We do appreciate your efforts though. |
I just added capm to financial.py