¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Black-Scholes-Merton - Risk Free Interest Rate and which Volatility value do I use?


 

The main questions are where do I get the 'Risk Free Interest Rate' and which volatility value should I use?


I've searched and see lots of weird answers, so maybe this question does not have a "best" answer.
However, I would rather get advice than guess and wildly try tons of things.
?
I've created a C# program which downloads a lot of data from TWS API
(My account info, portfolio, full stock histories, option values and Greeks, etc...)
I save most of it to an SQL database to for back testing and reduction of API calls.
?
Now I'm building my Options models and have carefully rebuilt the common formulas using 'decimal' type for much much more accurate functions.
I found that most all copies online become inaccurate around the 5th digit especially after many iterations.
I've rebuilt both the Black-Scholes-Merton function and the Cumulative Normal Distribution code?
and the accuracy of any constant used (I think only Pi for this one).
(I know this is likely overkill - but I had fun doing this part.)
?
Anyway, where do I get the 'Risk Free Interest Rate' to use in my Black-Scholes-Merton formula?
I read that maybe I should pull the rates from the interest rate of the 3 month us treasury bill.
If so, is that easily available through TWS API, or if not is there an easy online reference like a Yahoo finance query, etc?
Also, that the value might not actually change very much over many years?
?
Also, which volatility value should I use?
I see these in my downloads:
field 10 - Bid Option Computation
field 11 - Ask Option Computation
field 12 - Last Option Computation
field 13 - Model Option Computation
field 23 - Option_Historical_Volatility
field 24 - Option_Implied_Volatility
field 58 - RT_Historical_Volatility
field 83 - Delayed_Model_Option
I suspect it would either be the (field 24 - Option_Implied_Volatility) OR (field 13 - Model Option Computation)
?
Thank you for any help.


 

Don,

I pull rates from the Internet (from overnight to 6 months or longer) then I fit a curve and I use the given rate for the expiration of interest.
Re IV: you can of course use IB's calculations, generally the computed one or the half way point between Bid IV and Ask IV.? I coded the simple Newton-Raphson algorithm to extract IV from mid price.? There are other methods as well.
The real issue is however often the Dividend Yield.? Most sources are OK at best.? You can try and use Nelder-Mead instead of Newton-Raphson to extract both IV and DY at the same time.??Since I only trade European options, I prefer calculating a modified "dividend-free" underlying, using the Put-Call Parity and calculated forward price.? That trick technically doesn't work on American options.?


 

Dear Bruno,? Sincerely thank you for the info.
I can handle the IV now - that answer was perfect.

Regarding the Interest rate though:

I pull rates from the Internet (from overnight to 6 months or longer) then I fit a curve and I use the given rate for the expiration of interest.

Would you be willing to provide a link to where you pull that from? And even more if you were willing to share your curve code for it, that would be awesome, but I would understand if you didn't want to.

Thanks again!


 

I'd like to see the code for the interest rate data curve fitting. I'm hitting a problem where I can get the IV for the current session pretty close to BARCHART's which I use as a reference BUT in trying to get IV RANK and IV PERCENTILE I get the correct dates for IV MIN and IV MAX but the IV I calculate for the historic dates is WAY off. I'm wondering if I'm using the wrong RISK FREE rate. I think curve fitting would help A LOT. Thanks for ANY help you can offer. CP


 

I still need help, where do I get the??'Risk Free Interest Rate'?from?

Bruno indicated to pull it from online somewhere:?"I pull rates from the Internet (from overnight to 6 months or longer)"
I am guessing he was referring to the interest rate of the 0-6+ month us treasury bills?
And then calculates the Rate: "...fit a curve and I use the given rate for the expiration of interest."
I can handle the rate curve part once I get confirmation about the data source.

Can anyone help?

?


 

¿ªÔÆÌåÓý

I believe most people use the 3-month Treasury Bills for the risk free rate.? That data is available for free from many data sources including

US Treasury Dept:?

Federal Reserve:

Quandl:? Don't have the link in front of me but it used to be there.

Yahoo:

I'd start with whatever source you generally use for data and go from there. ??



On 6/15/2021 10:27 AM, Don (KN3N) wrote:

I still need help, where do I get the??'Risk Free Interest Rate'?from?

Bruno indicated to pull it from online somewhere:?"I pull rates from the Internet (from overnight to 6 months or longer)"
I am guessing he was referring to the interest rate of the 0-6+ month us treasury bills?
And then calculates the Rate: "...fit a curve and I use the given rate for the expiration of interest."
I can handle the rate curve part once I get confirmation about the data source.

Can anyone help?

?



 

Not sure what IB uses for risk free rates, however, industry standard is to create bootstrap a curve from various sources (LIBOR, futures, Swaps). This is how the Bloomberg Terminal creates their RFR curve for default option pricing.?

A decent alternative is just to pull treasury par yields from the??(they also have an XML public API), bootstrap a zero coupon curve from these rates, and finally interpolate on this curve for the given maturity of your the options being modeled.?

You will find, however, that rates are almost meaningless for many options, especially those with less than 6 months maturity. Depending on your product of choice, arguably a more important input than rates is a decently accurate, forward-looking dividend rate ?(discrete or continuous).?


 

Treasuries are too low. The best easy, cheap thing is Libor, but that also tends to be too low when the Fed is near zero. Probably most people just use Libor ... download for free, translate the Act/360 to continuously compounded rates, and interpolate linearly. Libor only goes to 12 months though, after that you need to bootstrap or just get the rates directly from the options chains.
?
You can also get the IB/TWS rates directly ... those used to be pretty good, but got kind of lousy after they sold Timber Hill.


Matthias Frener
 

Might be off-topic, but G-Money seems to be someone that might be able to ansert, so I'll ask... :D :P

> Not sure what IB uses for risk free rates, however, industry standard is to create bootstrap a curve from various sources (LIBOR, futures, Swaps). This is how the Bloomberg Terminal creates their RFR curve for default option pricing.?
> A decent alternative is just to pull treasury par yields from the??(they also have an XML public API), bootstrap a zero coupon curve from these rates, and finally interpolate on this curve for the given maturity of your the options being modeled.?

Where does the inflation rate come into this game, or is just irgnored? I mean.. for a risk free rate I want the (treasury rate) - (inflation rate), as inflation is a risk.
We should have negate RFRs since months already, but we have not. Don't really get why... I buy the 10T with 1.4 rate at 5% infltation, I'm lossing money (risk free rate is negative in relativ).

>??Depending on your product of choice, arguably a more important input than rates is a decently accurate, forward-looking dividend rate ?(discrete or continuous).?
I actually use the Future contract closes to the Opton expiry, to derive all that values all once, as it should be priced arround (spot price) + (risk free rate + forward-looking dividend rate) as long as market conditions or good and arbitragers do their job.








 

Inflation rate is irrelevant, all you want (ideally) for European options like SPX, RUT, NDX are the actual interest rates being used by the market makers and the actual PVDivs (present-value-of-dividends) for each contract. You can use futures as you are saying for the quarterlies, but using that data to infer other expirations involves ignoring the true PVDivs, which can be quite lumpy so it's essential to do them expiration-wise if you are serious.
?
But, accurate rates and PVDivs turn out to be secondary for European options ... your target is really the forwards, and you can get accurate forwards using rather poor interest rates (like Libor) and with no assumptions about, or knowledge of, dividends. Good forwards are 90% of the problem, after that you can worry about improving your interest rates for the discount factors if you want to.
?
For American options, accurate interest rates are more important as they are key to the early exercise boundary determination.? ?



 

Hi Don,
Here is an Excel spreadsheet where I pull treasury rates and calculate a few things, including IV (Raphson Newton)
It doesn't include the curve fitting for rates though.? In my main program, I retrieve rates for different maturities and either average itacross each segment (easy) or use the open source MathNet library to fit a polynomial (also easy).

The dividend yield cancellation is not too difficult either, but one needs to calculate a synthetic forward, estimate ATM Put and Call prices and plug it all in the Put-Call Parity formula.?
Of course only applicable to European options technically.

https://www.dropbox.com/s/6nj72v13ubcpkxj/Basic%20Black%20%26%20Scholes%20%28example%29.xlsm?dl=0