Add example of options chain usage
This commit is contained in:
parent
97c5bd982f
commit
9b6405dc30
@ -39,3 +39,8 @@ class OptionsChain:
|
|||||||
|
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
return str(self.options_chain)
|
return str(self.options_chain)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
options_chain = OptionsChain('$SPXW.X', datetime.now())
|
||||||
|
print(options_chain)
|
||||||
|
print(options_chain.closest_contract_by_credit(5.0, OptionType.PUT))
|
Loading…
Reference in New Issue
Block a user