You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, this is an excellent library and you guys did a great job!
I am pulling some options data from Polygon.IO and then options are labeled as 'CALL' and 'PUT', for this library
they need to be 'c' or 'p', which would require either creating a new DataFrame column or renaming the current column.
which really doesn't add much more time on our side, but can easily be handled in the library. there is a dictionary
"binary_flag" in the util.data_format file that converts the 'c' or 'p' to 1 and -1, I'm proposing adding additional keys to
cover more use cases than just 'c' and 'p'. My current workaround is to simply modify the dictionary after I import the library
as seen below.
import py_vollib_vectorized
Add some key_value pairs to the binary flag dictionary
First of all, this is an excellent library and you guys did a great job!
I am pulling some options data from Polygon.IO and then options are labeled as 'CALL' and 'PUT', for this library
they need to be 'c' or 'p', which would require either creating a new DataFrame column or renaming the current column.
which really doesn't add much more time on our side, but can easily be handled in the library. there is a dictionary
"binary_flag" in the util.data_format file that converts the 'c' or 'p' to 1 and -1, I'm proposing adding additional keys to
cover more use cases than just 'c' and 'p'. My current workaround is to simply modify the dictionary after I import the library
as seen below.
import py_vollib_vectorized
Add some key_value pairs to the binary flag dictionary
py_vollib_vectorized.util.data_format.binary_flag['CALL'] = 1
py_vollib_vectorized.util.data_format.binary_flag['PUT'] = -1
The text was updated successfully, but these errors were encountered: