1
$\begingroup$

I have plotted the IV of TSLA options using yahoo options data, but the scatter plot doesn't look right, can anyone advise why the plot looks like this? I would expect to see a vol smile plotted.

EDIT additional question, is the same risk-free rate used to get those options data? and what is the rf used in practice, please?

import pandas_datareader.data as web
import pandas as pd
import matplotlib.pyplot as plt

tesla = web.YahooOptions('TSLA')
tesla.headers = {'User-Agent': 'Firefox'}
tesla_calls = tesla.get_call_data(12,2023)

tesla_calls.reset_index(inplace=True)
tesla_calls = tesla_calls[tesla_calls['Expiry'] == '2023-12-01T00:00:00.000000000']
plt.scatter(tesla_calls['Strike'], tesla_calls['IV'])

    Strike     Expiry  Type               Symbol    Last  Bid  Ask  Chg  \
19   100.0 2023-12-01  call  TSLA231201C00100000  107.00  0.0  0.0  0.0   
28   140.0 2023-12-01  call  TSLA231201C00140000   82.30  0.0  0.0  0.0   
30   145.0 2023-12-01  call  TSLA231201C00145000   76.80  0.0  0.0  0.0   
32   150.0 2023-12-01  call  TSLA231201C00150000   58.75  0.0  0.0  0.0   
35   160.0 2023-12-01  call  TSLA231201C00160000   50.22  0.0  0.0  0.0   

    PctChg   Vol  Open_Int       IV  Root  IsNonstandard Underlying  \
19     0.0  11.0       0.0  0.00001  TSLA          False       TSLA   
28     0.0   NaN       0.0  0.00001  TSLA          False       TSLA   
30     0.0   2.0       0.0  0.00001  TSLA          False       TSLA   
32     0.0   6.0       0.0  0.00001  TSLA          False       TSLA   
35     0.0   5.0       0.0  0.00001  TSLA          False       TSLA   

    Underlying_Price          Quote_Time     Last_Trade_Date  \
19            205.76 2023-10-26 20:00:01 2023-10-26 16:17:53   
28            205.76 2023-10-26 20:00:01 2023-10-19 16:58:57   
30            205.76 2023-10-26 20:00:01 2023-10-24 14:04:46   
32            205.76 2023-10-26 20:00:01 2023-10-23 13:33:46   
35            205.76 2023-10-26 20:00:01 2023-10-26 18:42:36   

                                                 JSON  
19  {'contractSymbol': 'TSLA231201C00100000', 'str...  
28  {'contractSymbol': 'TSLA231201C00140000', 'str...  
30  {'contractSymbol': 'TSLA231201C00145000', 'str...  
32  {'contractSymbol': 'TSLA231201C00150000', 'str...  
35  {'contractSymbol': 'TSLA231201C00160000', 'str...  

enter image description here

$\endgroup$
7
  • 3
    $\begingroup$ Why don't you just look at the data on the website? Yahoo is notorious for being unreliable and if you want a proper smile, you need to take care of a lot of things, which Yahoo simply doesn't do. You can look here for a fairly detailed description of the steps required to build a vol surface. With regards to risk free rate, that just the exact tenor that matches the option expiry date as explained here. $\endgroup$
    – AKdemy
    Oct 27, 2023 at 10:10
  • $\begingroup$ @AKdemy thank you for the reply, which website? $\endgroup$
    – Skittles
    Oct 27, 2023 at 11:01
  • 1
    $\begingroup$ Where do you think web.YahooOptions comes from? $\endgroup$
    – AKdemy
    Oct 27, 2023 at 11:09
  • 3
    $\begingroup$ Yahoo finance, where IV is also computed. $\endgroup$
    – AKdemy
    Oct 27, 2023 at 11:17
  • 3
    $\begingroup$ The data at the moment is somewhat better but overall it's what it is with yahoo. $\endgroup$
    – AKdemy
    Oct 28, 2023 at 11:02

1 Answer 1

0
$\begingroup$

I haven't extracted the data using your code, but I suppose there should be nothing wrong with your code, this is a sufficiently simple exercise. Why don't you convert the dataset to Excel and look at the implied volatility values to see if they match? If they do, then it is a data issue.

Usually it is common to not see smooth volatility smiles for market options (last I tried for the S&P500). Also, take note that sometimes its due to options being unequally liquidly traded, meaning that ITM are less liquidly traded than OTM options (for both calls and puts). Sometimes option prices even violate the upper and lower (no arb bounds) in the market.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.