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”.