Skip to content

Commit

Permalink
Merge pull request #2 from genesis-volatility/dvol-variance-premium
Browse files Browse the repository at this point in the history
aadding dvol variance premium
  • Loading branch information
phatdoyle authored Feb 9, 2022
2 parents 4c61e19 + 4452f23 commit 9a14424
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 3 deletions.
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

0 comments on commit 9a14424

Please sign in to comment.