# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     name: python3
# ---

# +
import numpy as np 
from calcbsimpvol import calcbsimpvol

S = np.asarray(268.55) # Underlying Price 
K = np.asarray([275.0]) # Strike Price 
tau = np.asarray([9/365]) # Time to Maturity 
r = np.asarray(0.01) # Interest Rate 
q = np.asarray(0.00) # Dividend Rate 
cp = np.asarray(1) # Option Type 
P = np.asarray([0.31]) # Market Price

imp_vol = calcbsimpvol(dict(cp=cp, P=P, S=S, K=K, tau=tau, r=r, q=q)) 
print(imp_vol)

# -



StarcoderdataJupyterScriptsDedupFiltered