The Option-Graph Project Option-Graph.com

Add Fields for Interest Rate and Dividends

     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 Panel control.

     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.

In the form Design View, add the following controls and Properties:

 

Control: Panel

Properties:

  • BackColor : LightBlue
  • Size : 718,32

    Control: Label

Properties:

  • Text : Risk Free
  • Location : 3,2

Control: Label

Properties:

  • Text : Interest Rate
  • Location : 3,16

    Control: NumericUpDown

Properties:

  • Name : InterestRate
  • Location : 73,7
  • DecimalPlaces: 3
  • Minimum: .005
  • Maximum: 30
  • Value: .005
  • Control: Label

Properties:

  • Text : $ per share Dividend
  • Location : 144,2

Control: Label

Properties:

  • Text : Payout in 1 Year
  • Location : 145,16
  • Control: NumericUpDown

Properties:

  • Name : Dividends
  • Location : 252,7
  • DecimalPlaces: 2
  • Maximum: 500

Control: TextBox

Properties:

  • Name: Messages
  • Text : Sample Message
  • Location : 317,6
  • Size: 398,20
  • ForeColor: Red

Save your project.

Home Page Downloads
Previous Step: Add Titles
Next Step: Add Price and Implied Volatility Buttons

Copyright 2017 option-info.com Privacy Policy

Questions, corrections, suggestions, comments to: this contact

Want to learn options, find strategies? Visit www.option-info.com