vbnumericalmethods.com | download free finance excel vba code for option pricing, bond pricing and much more.
VB Numerical Methods - Excel VBA Finance and Math Code
HOME FINANCE VBA MATH VBA BOOKS CONTACT
  Search Site :  

FINANCIAL CODE ORDER BY - Times Downloaded - Date Posted


Title: GARCH (simple) Posted on 08/28/2004 01:35 PM
Descriptions: This is a simple implementation of the GARCH(1,1) model. This is done in EXCEL and uses SOLVER. The data for the S&P 500 quotes are historical quotes from finance.yahoo.com.
Functions: No functions
Code: Download   (17334 downloads)
Author: GregV



Title: Binomial Option Pricing Posted on 08/28/2004 01:35 PM
Descriptions: The binomial pricing procedure programmed in VBA. The example uses the blackscholes() function.
Functions: binCall(S, K, T, rf, sigma, n)
Code: Download   (12180 downloads)
Author: GregV



Title: Black Scholes Function Posted on 08/27/2004 01:35 PM
Descriptions: Simple function to calculate the Black Scholes call price.
Functions: BlackScholes(Underlying, Strike, RiskFree, expTime, Volatility)
Code: Download   (11467 downloads)
Author: GregV



Title: Super Black Scholes Posted on 10/19/2004 02:11 PM
Descriptions: This black scholes function also can return the greeks (delta, gamma, theta, vega and rho).
Functions: option_e(Put_Call As String, S As Double, e As Double, Tmt As Double, r As Double, q As Double, sigma As Double, Command As String) As Double
Code: Download   (10181 downloads)
Author: JMS



Title: Black Scholes Implied Volatility Posted on 10/19/2004 02:04 PM
Descriptions: Calculates the implied volatility of an european option. This function uses the super black scholes function.
Functions: option_e_implvola(Put_Call As String, S As Double, e As Double, Tmt As Double, r As Double, q As Double, O As Double) As Double
Code: Download   (9034 downloads)
Author: JMS



Title: Forward Rate Posted on 10/21/2004 11:30 PM
Descriptions: Computes the forward rate with given dates and present values.
Functions: forward_r(Date_v As Object, PV_v As Object, Sett_d As Date, Eff_d As Date, Life As Long) As Double
Code: Download   (7240 downloads)
Author: JMS



Title: Bond Price Curve Posted on 10/21/2004 11:26 PM
Descriptions: Calculates the Bond Price Curve for a given coupon, given dates and gives present values.
Functions: B_Price_Curve(Sett_d As Date, Mat_d As Double, Cpn As Double, Date_v As Object, PV_v As Object) As Double
Code: Download   (6430 downloads)
Author: JMS



Title: Sharpe Ratio Posted on 11/10/2004 01:41 PM
Descriptions: A ratio developed by Bill Sharpe to measure risk-adjusted performance. It is calculated by subtracting the risk free rate from the rate of return for a portfolio and dividing the result by the standard deviation of the portfolio returns.
Functions: ratio_sharpe(ptf As Range, bench As Range)
Code: Download   (6235 downloads)
Author: Jack



Title: GARCH (with Variance Targeting) Posted on 08/28/2004 01:35 PM
Descriptions: This is an implementation of GARCH(1,1) that only optimizes 2 parameters by employing variance targeting techniques. This is done in EXCEL and uses SOLVER. The data for the S&P 500 quotes are historical quotes from finance.yahoo.com.
Functions: No functions
Code: Download   (5599 downloads)
Author: GregV



Title: Interest Rate Risk Calculation Posted on 10/25/2004 01:42 AM
Descriptions: Computes the interest risk of a bond (change in price per % change in interest)
Functions: EuroFutIR(SettDate As Date, StartDate As Date, MatDate As Date, Buckets As Object, DateVec As Object, PVFact As Object) As Variant
Code: Download   (5316 downloads)
Author: JMS



Title: Max Drawdown Posted on 11/10/2004 01:37 PM
Descriptions: Calculates the max drawdown. The peak to trough decline during a specific record period of an investment or fund. It is usually quoted as the percentage between the peak to the trough.
Functions: max_drawdown(matrice As Range)
Code: Download   (5184 downloads)
Author: Jack



Title: Theoretical Implied Volatility of an Index Option Posted on 09/27/2004 01:35 PM
Descriptions: Here is a code that calculates the theoretical implied volatility of an index option from the implied vols of the options of the index members. It can be used for the set up of dispersion trades.
Functions: TheorMWImpliedVol(Wgt As Object, SingleVols As Object, CorrMat As Object) As Double
Code: Download   (4814 downloads)
Author: JMS



Title: Payer Swaption Price (basis points) Posted on 10/25/2004 01:35 AM
Descriptions: Calcualtes the price of a payer swaption (bp)
Functions: swaption_P_bp(Date_v As Object, PV_v As Object, Sett_d As Date, Eff_d As Date, swap_life As Long, exp_d As Date, strike_r As Double, vola As Double) As Double
Code: Download   (4401 downloads)
Author: JMS



Title: GARCH (with leverage effect) Posted on 08/28/2004 01:35 PM
Descriptions: This is an implementation of a GARCH(1,1) with a leverage effect. This is done in EXCEL and uses SOLVER. The data for the S&P 500 quotes are historical quotes from finance.yahoo.com.
Functions: No functions
Code: Download   (4393 downloads)
Author: GregV



Title: Yield Coupon Bond (ISMA) Posted on 10/21/2004 11:29 PM
Descriptions: Calculates the yield of a coupon bearing bond (ISMA)
Functions: B_Yield_ISMA(Sett_d As Date, Mat_d As Date, Cpn As Double, Price As Double) As Double
Code: Download   (4221 downloads)
Author: JMS



Title: Future and Option Settelment Date Calculation Posted on 10/12/2004 01:54 AM
Descriptions: This file contains all the functions necessary in calculation future and option settelment dates. Third friday of the month expiration calculation, by month, quarter and year. You can also calculate previous and next settlement dates.
Functions: vbaThirdFriday(ByVal aDate As Date) As Date
vbaNextSettlement(ByVal aDate As Date) As Date
vbaPrevSettlement(ByVal aDate As Date) As Date
Code: Download   (4142 downloads)
Author: JMS



Title: Rainbow Option Price Posted on 10/19/2004 02:08 PM
Descriptions: Calculates the price of a (two-coloured rainbow) option delivering the best of two risky assets or cash.
Functions: rainbow_2colour(S1, S2, K, t, r, q1, q2, v1, v2, rho)
rainbow_bestof2(S1, S2, t, q1, q2, v1, v2, rho)
Code: Download   (4073 downloads)
Author: JMS



Title: Caplet Valuation Posted on 10/25/2004 01:38 AM
Descriptions: Valuation of caplets (given dates and PVs)
Functions: caplet(Sett_d As Date, from_d As Date, to_d As Date, Strike As Double, vola As Double, Date_v As Object, PV_v As Object, underrate As Double) As Double
Code: Download   (3840 downloads)
Author: JMS



Title: Information Ratio Posted on 11/10/2004 01:38 PM
Descriptions: In investing terminology, the ratio of expected return to risk, as measured by standard deviation. Usually, this statistical technique is used to measure a manager's performance against a benchmark.
Functions: ratio_info(ptf As Range, bench As Range)
Code: Download   (3700 downloads)
Author: Jack



Title: Caps Valuation Posted on 10/25/2004 01:39 AM
Descriptions: Valuation of caps
Functions: cap(Sett_d As Date, last_fix_d As Date, base_rate As Double, factor As Double, prev_d As Date, next_d As Date, Mat_d As Date, vola As Double, Date_v As Object, PV_v As Object) As Double
Code: Download   (3677 downloads)
Author: JMS



Title: Black Scholes Probability of Surpassing a Frontier Posted on 10/19/2004 02:10 PM
Descriptions: Calculates the probability of a black scholes options to go above a certain frontier.
Functions: prob_above(S As Double, X As Double, t As Double, r As Double, q As Double, v As Double) As Double
Code: Download   (3533 downloads)
Author: JMS



Title: Money Market Forward Rate Posted on 10/25/2004 01:38 AM
Descriptions: Computes the money market forward rate
Functions: mmforw(Sett_d As Date, from_d As Date, to_d As Date, Date_v As Object, PV_v As Object) As Double
Code: Download   (3518 downloads)
Author: JMS



Title: Compute Interest Rate Risk of a Bond Posted on 10/25/2004 01:40 AM
Descriptions: Computes the interest risk of a bond (change in price per % change in interest)
Functions: BondIR(SettDate As Date, StartDate As Date, MatDate As Date, Cpn As Double, CpnsPerYear As Long, Buckets As Object, DateVec As Object, PVFact As Object) As Variant
Code: Download   (3500 downloads)
Author: JMS



Title: Valuation of Floors Posted on 10/25/2004 01:40 AM
Descriptions: Valuation of floors (given dates and PVs)
Functions: floor(Sett_d As Date, strike_r As Double, first_fixing_d As Date, last_payment_d As Date, vola As Double, Date_v As Object, PV_v As Object) As Double
Code: Download   (3358 downloads)
Author: JMS



Title: Receiver Swaption Price (basis points) Posted on 10/25/2004 01:36 AM
Descriptions: Calcualtes the price of a receiver swaption (bp)
Functions: swaption_R_bp(Date_v As Object, PV_v As Object, Sett_d As Date, Eff_d As Date, swap_life As Long, exp_d As Date, strike_r As Double, vola As Double) As Double
Code: Download   (3264 downloads)
Author: JMS



Title: Yield Coupon Bond (Braess) Posted on 10/21/2004 11:30 PM
Descriptions: Calculates the yield of a coupon bearing bond (Braess).
Functions: B_Yield_Braess(Sett_d As Date, Mat_d As Date, Cpn As Double, Price As Double) As Double
Code: Download   (3186 downloads)
Author: JMS



Title: Implied Dividend Yield Posted on 10/25/2004 01:34 AM
Descriptions: Calculates the implied dividend yield from a given price and a given dividend
Functions: ImplDivYield(Maturity As Double, DiscountedDiv As Double, Ref As Double) As Double
Code: Download   (3111 downloads)
Author: JMS



Title: Outperformance Options Price Posted on 10/19/2004 02:05 PM
Descriptions: Computes the price of an outperformance option
Functions: outperf(S_ref, S_out, t, q_ref, q_out, v_ref, v_out, rho) As Double
Code: Download   (3082 downloads)
Author: JMS



Title: Leland and Toft 96 Structural Model of Debt Posted on 10/01/2004 12:50 AM
Descriptions: A function that solves for Debt, Value of the Firm, Equity and Leverage for the Leland and Toft (1996) structural model of debt in EXCEL-VBA.
Functions: getDebt(c, p, bV, sigma, rho, r, delta, tau, alpha, T, ret)
SetCoupon()
Code: Download   (3058 downloads)
Author: GregV



Title: Worst to Deliver Option Greeks Posted on 10/19/2004 02:13 PM
Descriptions: These functions calculate the worst to deliver option greeks (delta, gamma, vega, theta and rho). These functions use the worst to deliver option function.
Functions: rainbow_worseof2_delta(S1, S2, t, q1, q2, v1, v2, rho, take_12)
rainbow_worseof2_gamma(S1, S2, t, q1, q2, v1, v2, rho, take_12)
rainbow_worseof2_vega(S1, S2, t, q1, q2, v1, v2, rho, take_12)
rainbow_worseof2_theta(S1, S2, t, q1, q2, v1, v2, rho)
Code: Download   (2995 downloads)
Author: JMS



Title: Payer Swaption Price (ticks) Posted on 10/25/2004 01:36 AM
Descriptions: Calcualtes the price of a payer swaption (ticks)
Functions: swaption_P_tick(Date_v As Object, PV_v As Object, Sett_d As Date, Eff_d As Date, swap_life As Long, exp_d As Date, strike_r As Double, vola As Double, freq As Long) As Double
Code: Download   (2962 downloads)
Author: JMS



Title: Outperformance Option Greeks Posted on 10/19/2004 02:08 PM
Descriptions: These functions return the greeks (delta, gamma, vega, theta) of an outperformance options. These functions use the outperformance option functions.
Functions: outperf_delta(S1, S2, t, q1, q2, v1, v2, rho, take_12)
outperf_gamma(S1, S2, t, q1, q2, v1, v2, rho, take_12)
outperf_vega(S1, S2, t, q1, q2, v1, v2, rho, take_12)
outperf_theta(S1, S2, t, q1, q2, v1, v2, rho)
Code: Download   (2938 downloads)
Author: JMS



Title: Cheapest to Deliver Option Posted on 10/19/2004 02:00 PM
Descriptions: Calculates the price of a cheapest to deliver option. This function uses the outperformance option functions.
Functions: CTD(S1, S2, t, q1, q2, v1, v2, rho)
Code: Download   (2938 downloads)
Author: JMS



Title: Price of Coupon Bearing Bond (ISMA) Posted on 10/21/2004 11:27 PM
Descriptions: Calculates the price of a coupon bearing bond (ISMA adjusted).
Functions: B_Price_ISMA(Sett_d As Date, Mat_d As Double, Cpn As Double, Yield As Double) As Double
Code: Download   (2928 downloads)
Author: JMS



Title: Coupon Bearing Bond (Braess) Posted on 10/21/2004 11:29 PM
Descriptions: Calculates the price of a coupon bearing bond (Braess).
Functions: B_Price_Braess(Sett_d As Date, Mat_d As Date, Cpn As Double, Yield As Double) As Double
Code: Download   (2908 downloads)
Author: JMS



Title: Cheapest to Deliver Option Greeks Posted on 10/19/2004 02:03 PM
Descriptions: Calculates the Greeks (Delta, Gamma, Vega, Theta) of the cheapest to deliver option. This function uses the cheapest to deliver option and outperformance option functions.
Functions: CTD_delta(S1, S2, t, q1, q2, v1, v2, rho, take_12)
CTD_gamma(S1, S2, t, q1, q2, v1, v2, rho, take_12)
CTD_vega(S1, S2, t, q1, q2, v1, v2, rho, take_12)
CTD_theta(S1, S2, t, q1, q2, v1, v2, rho)
Code: Download   (2904 downloads)
Author: JMS



Title: Receiver Swaption Price (ticks) Posted on 10/25/2004 01:37 AM
Descriptions: Calcualtes the price of a receiver swaption (ticks)
Functions: swaption_R_tick(Date_v As Object, PV_v As Object, Sett_d As Date, Eff_d As Date, swap_life As Long, exp_d As Date, strike_r As Double, vola As Double, freq As Long)
Code: Download   (2898 downloads)
Author: JMS



Title: Worst to Deliver Option Posted on 10/19/2004 02:11 PM
Descriptions: Calculates the price of a worst to deliver option.
Functions: rainbow_worseof2(S1, S2, t, q1, q2, v1, v2, rho)
Code: Download   (2894 downloads)
Author: JMS



Title: Leland 94 Structural Model Posted on 08/28/2004 01:35 PM
Descriptions: VB function to return the total value of the firm, the value of debt and the value of equity using the Leland 94 structural model.
Functions: Leland(V, C, tau, alpha, r, sigma, tRet)
Code: Download   (2891 downloads)
Author: GregV


Navigate: Home, Finance VBA, Math VBA, Books, Finance and Math VBA Links, Contact
Interesting Links: Add-ins, Excel Best Practices, Anthony VBA, Excel Business Templates, Spinnaker Add-ins