To calculate an option price, the program
needs to know the current "risk-free" interest rate, and the dividend
yield on the underlying stock, if any.
These inputs do not necessarily change
for every option price you calculate, so we will put them on a separate
The risk-free interest rate can be something
like the current Fed Funds rate, which at the time of this writing is
"near zero", but in testing the calculator it seems like a
minimum value of .005 matches reality, so that is the minimum and the
default value for the control.
If a stock pays a dividend, the dividend
will affect option prices. When using the calculator, put the total
dollar amount of yearly dividends per share in this field. For instance,
if the stock pays .21 per share quarterly, put .84 in the field. Then
behind the scenes our code will translate that into the dividend yield
by the calculation:
dividendyield = yearlydividend / stockprice
We will also add a message area, so
the program can communicate things like error messages to the user.