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

aadding dvol variance premium #2

Merged
merged 1 commit into from
Feb 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
author = "Denys Halenok"

# The full version, including alpha/beta/rc tags
release = "0.2.2"
release = "0.2.21"


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion gvol/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__all__ = ("__version__", "GVol")
__version__ = "0.2.2"
__version__ = "0.2.21"

from gvol.client import GVol
17 changes: 17 additions & 0 deletions gvol/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1877,3 +1877,20 @@ def HifiVolSurfaceStrikesGreeksHourly(
"interval": interval
},
)

def dVolVariancePremium(
self,
symbol: types.SymbolEnumType,
) -> Dict:
"""
Args:
symbol: (types.SymbolEnumType)
Returns:
dict
"""
return self._client.execute(
gql(queries.dvolVariancePremium),
variable_values={
"symbol": symbol,
},
)
13 changes: 13 additions & 0 deletions gvol/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -1195,3 +1195,16 @@
}
}
"""


dvolVariancePremium = """
query DVolVariancePremium($symbol: SymbolEnumType) {
dvolVariancePremium(symbol: $symbol) {
dvolImpliedRvDate
instrument
dvolOpen30Days
parkinsonHv
variancePremium
}
}
"""
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "gvol"
version = "0.2.2"
version = "0.2.21"
description = "GVol is a Python library to access the GVol API"
authors = ["Denys Halenok <[email protected]>"]

Expand Down