Error

When i m trying to run code using mibian. I get this error plz guide



CODE 

Import the library

import mibian

Define parameters

nifty_index_price = 10400

strike_price = 10450

interest_rate = 6

days_to_expiry = 20

volatility = 20.00

Type your code below

c = mibian.BS([nifty_index_price, strike_price, interest_rate, days_to_expiry],volatility=volatility)

print(c.callPrice)

print(c.putPrice)





ERROR

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-fe09f983ed65> in <module>
      1 # Import the library
----> 2 import mibian
      3 # Define parameters
      4 nifty_index_price = 10400
      5 strike_price = 10450

ModuleNotFoundError: No module named 'mibian'

            

Hi Swastik,

I tried running the same code and I got the output as follows:

186.62108968279244
202.3213393453434

The Output shows your "call price" and "put price" respectively.



Please note that you need to either

  • Refresh the notebook
or
  • Try not to run any other code above this one.

Hope it helped. Please feel free to get in touch again in case of any further query.

Best,
Chainika
 

Also, when you download Python, packages like NumPy and Pandas get installed.



But, there are some other packages you need to install before trying to import them.

Perhaps, you need to install the package here and that is why the error is showing. 

Use !pip install mibian before starting with the code and that should solve your problem.

Please read more on installing packages here.

Thanks very much fr the support

 

Pleasure!