Basic VBA code

Attached a spreadsheet with the VBA code, please note this is aimed at the South African market and should be considered a beta version:

  • SpotLinearInterpolation – VBA code to determine the rate from today to a date in the future.
  • ForwardLinearInterpolation – VBA code to find the forward rate between the Start & End date relative to today.

 

  • BondPrice – VBA code to calculate the clean or dirty price of South African bonds.
  • bondRpP, bondDuration & bondDelta – VBA code to calculate the 1st derivative of the bond price.
  • bondConvexity – VBA code to calculate the 2nd derivative of the bond price.

 

  • OptionPrice – VBA code to price an option using Black-Scholes.
  • OptionDelta, OptionGamma,  OptionVega, OptionTheta, OptionRho, OptionITM – VBA code to price some of the option’s “greeks”.

Excel Calculator

About alundarwood

I am involved in market risk and performance analytics in the financial services industry. My expertise includes portfolio management, fixed income analysis, advanced derivative pricing and building software valuation models.
This entry was posted in Financial modelling. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.