Add example of options chain usage

This commit is contained in:
moshferatu 2024-02-13 12:19:30 -08:00
parent 97c5bd982f
commit 9b6405dc30

View File

@ -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))