Getting market data for Cloudflare options (you can specify either calls or puts):
Now we can use the Black-Sholes model: here is the formula and its inputs:
Here is the code that I made; it requires the stock ticker, expiry date and contract name of some option.
It works by finding the column number of the contract number (in order to find all of its relevant data), finding the stock price of the ticker and by using the US-10 year yield as the risk free rate of return.
Afterwards, we plug in the calculations into the formula and we can also configure the type of option (call or put), but for this example we are just using calls.
Here is an example of me inputting a specific Cloudflare(NET) call contract and the Black-Scholes theoretical fair price as output: