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

Adds options helper function for DTE, updates SDK trail map to not use yFinance. #4937

Merged
merged 3 commits into from
May 1, 2023

Conversation

deeleeramone
Copy link
Contributor

Adds a new helper function in openbb_terminal/stocks/options/op_helpers.py for appending the chain DataFrame with a column for DTE.

This PR updates the SDK so that:

  • openbb_terminal.stocks.options.op_helpers is a valid SDK path.
  • the mapping for openbb.stocks.options.DTE to come from the op_helpers.

The docstring has been updated:

In [1]: from openbb_terminal.sdk import openbb

In [2]: openbb.stocks.options.dte?
Signature:      openbb.stocks.options.dte(chain: pandas.core.frame.DataFrame) -> pandas.core.frame.DataFrame
Call signature: openbb.stocks.options.dte(*args: Any, **kwargs: Any) -> Any
Type:           get_dte
String form:    <openbb_terminal.stocks.options.op_helpers.Operation object at 0x104e871c0>
File:           ~/GitHub/OpenBBTerminal/openbb_terminal/stocks/options/op_helpers.py
Docstring:     
Returns a new column containing the DTE as an integer, including 0.
Requires the chain to have the column labeled as, expiration.

It works with all sources, relying on there being a called called: expiration.

Screenshot 2023-04-30 at 2 40 56 PM

@deeleeramone deeleeramone added enhancement Enhancement platform OpenBB Platform labels Apr 30, 2023
@reviewpad reviewpad bot added the feat XS Extra small feature label Apr 30, 2023
@codecov
Copy link

codecov bot commented Apr 30, 2023

Codecov Report

Patch coverage: 26.35% and project coverage change: -0.19 ⚠️

Comparison is base (df9a154) 58.29% compared to head (9c74623) 58.10%.

❗ Current head 9c74623 differs from pull request most recent head 25c044c. Consider uploading reports for the commit 25c044c to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4937      +/-   ##
===========================================
- Coverage    58.29%   58.10%   -0.19%     
===========================================
  Files          588      588              
  Lines        53666    53716      +50     
===========================================
- Hits         31283    31214      -69     
- Misses       22383    22502     +119     
Impacted Files Coverage Δ
...inal/core/sdk/controllers/crypto_sdk_controller.py 0.00% <ø> (ø)
...inal/core/sdk/controllers/stocks_sdk_controller.py 0.00% <ø> (ø)
...penbb_terminal/core/sdk/models/crypto_sdk_model.py 0.00% <0.00%> (ø)
...bb_terminal/core/sdk/models/portfolio_sdk_model.py 0.00% <0.00%> (ø)
...penbb_terminal/core/sdk/models/stocks_sdk_model.py 0.00% <0.00%> (ø)
openbb_terminal/core/sdk/sdk_helpers.py 36.92% <ø> (ø)
openbb_terminal/core/sdk/sdk_init.py 92.75% <ø> (ø)
openbb_terminal/core/sdk/trailmap.py 92.68% <ø> (ø)
openbb_terminal/dashboards/stream/Forecasting.py 0.00% <0.00%> (ø)
...bb_terminal/dashboards/stream/streamlit_helpers.py 0.00% <0.00%> (ø)
... and 17 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -594,3 +594,20 @@ def Vomma(self, change):
* norm.pdf(self.d1)
/ self._sigma
)


@log_start_end(log=logger)
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need for this logger. Will pollute with unhelpful START END messaged

@jmaslek jmaslek enabled auto-merge May 1, 2023 20:24
@jmaslek jmaslek added this pull request to the merge queue May 1, 2023
Merged via the queue into develop with commit 845564c May 1, 2023
13 checks passed
@jmaslek jmaslek deleted the feature/options-helper-dte branch May 1, 2023 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement feat XS Extra small feature platform OpenBB Platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants