I have noticed that the CBOE will show you the risk-free rate for the options you search. Today the r = 0.017625. I want to be able to calculate this value. Can the r value be pulled from ibapi? I read this paper on the simulatneous solution for implied volatility and risk-free rate. call price = Φ(d1)S - Φ(d1)Ke^(-rτ), where d2 = [ln(S/K)+(r-σ^2/2)τ]/σ√τ. Instead of taking the difference between the T bill yield for duration in question and inflation—which may not represent the actual rate—an optimization algorithm is used. Look at two options: different strikes but same expiry. Compare the option values. Solve the system of equations: C1(σ,r) = C1* ; C2(σ,r) = C2* ; C1* and C2* are the calls' market prices C1(σ,r) and C2(σ,r) are the B-S formula evlauted at σ and r. First order Taylor approximation for small δσ δr If there is a solution to this system, δσ and δr are added to σ and r. This process of finding δσ and δr are repeated until the assumptions of the B-S model are violated. Using python, I have been able to back-calculate the implied volatility per option. What I don't understand is the risk-free rate. Where is that data coming from? Where the CBOE get/calculate it from? All of the python examples I have seen show the value for r being supplied by the user. I was hoping for a way to calculate this continuously throughout time. http://ase.tufts.edu/economics/documents/papers/2014/bianconiImpliedVolatility.pdf
Don't know if this helps but CBOE says this about its VIX calculation: The risk-free interest rates, R1 and R2, are yields based on U.S. Treasury yield curve rates (commonly referred to as “Constant Maturity Treasury” rates), to which a cubic spline is applied to derive yields on the expiration dates of relevant SPX options. As such, the VIX Index value calculation may use different risk-free interest rates for near- and next-term options. Here is some Gov data that may help? https://www.treasury.gov/resource-c...interest-rates/Pages/TextView.aspx?data=yield
You can use Excel goal seek with BSM to get the risk free interest rate, or VBA with an iterative loop.
Black-Scholes call option for non-dividend paying stock European call option similar to non-dividend paying American call option Assumptions: AMZN January 17, 2020 1870 Call AMZN underlying @ 1888.00 T-t = 16/365 = 0.00547945 C1(s + ds) = 52.17 (B-S price) C1* = 52.20 (market price) I used a python ibapi to back calculate the implied volatility to 0.267 Substitute the values for assumptions . ( I performed this in python) The result is r ~ 0.01734106, which is really close to 0.017625 The real problem for me is that the calculations aren't visible. The equation for the IV didn't require r. The numbers check out, but I am not sure if the method is correct. I was reading about Brent's Method for American options. http://www.optimization-online.org/DB_FILE/2005/02/1066.pdf