Serving the Quantitative Finance Community

 
User avatar
learnbyosmosis
Topic Author
Posts: 0
Joined: February 7th, 2006, 5:38 am

How?: Binomial Tree for pricing European options.

February 7th, 2006, 8:52 pm

Hi everyone.I'm new to this forum, and I would like to throw out a question to all you seasoned quants. How much work is it to code a binomial tree for pricing european options? Are there any good books out there that teach you how to implement the code? Something for beginners would be nice.Thanks!
 
User avatar
Collector
Posts: 2572
Joined: August 21st, 2001, 12:37 pm
Location: Bahamas
Contact:

How?: Binomial Tree for pricing European options.

February 7th, 2006, 9:36 pm

here is one way to do it in VBAPublic Function EuropeanBinomialPlainVanilla(CallPutFlag As String, S As Double, X As Double, T As Double, r As Double, b As Double, v As Double, n As Long) As Double Dim u As Double, d As Double, p As Double Dim Sum As Double, dt As Double, A As Double Dim j As Long dt = T / n u = Exp(v * Sqr(dt)) d = 1 / u p = (Exp(b * dt) - d) / (u - d) A = Int(Log(X / (S * d ^ n)) / Log(u / d)) + 1 Sum = 0 If CallPutFlag = "c" Then For j = A To n Sum = Sum + Application.Combin(n, j) * p ^ j * (1 - p) ^ (n - j) * (S * u ^ j * d ^ (n - j) - X) Next ElseIf CallPutFlag = "p" Then For j = 0 To A - 1 Sum = Sum + Application.Combin(n, j) * p ^ j * (1 - p) ^ (n - j) * (X - S * u ^ j * d ^ (n - j)) Next End If EuropeanBinomialPlainVanilla = Exp(-r * T) * SumEnd Function
 
User avatar
PaperCut
Posts: 0
Joined: May 14th, 2004, 6:45 pm

How?: Binomial Tree for pricing European options.

February 8th, 2006, 2:38 am

Collector -Good to see you again.
 
User avatar
jomni
Posts: 0
Joined: January 26th, 2005, 11:36 pm

How?: Binomial Tree for pricing European options.

February 8th, 2006, 4:44 am

Get a hold of: Financial Modelling in Excel and VBA by Jackson and StauntonLearned a lot from that book.
 
User avatar
rmax
Posts: 374
Joined: December 8th, 2005, 9:31 am

How?: Binomial Tree for pricing European options.

February 8th, 2006, 12:42 pm

Another good one: Implementing Derivative Models Les Clewlow, Chris Strickland
 
User avatar
ppauper
Posts: 11729
Joined: November 15th, 2001, 1:29 pm

How?: Binomial Tree for pricing European options.

February 8th, 2006, 1:20 pm

QuoteOriginally posted by: PaperCutCollector -Good to see you again.For those who don't know, the collector's book is:The Complete Guide to Option Pricing Formulas by Espen Gaarder HaugPublisher: McGraw-Hill ProfessionalPublished: 1997Format: Disk + Hb
 
User avatar
learnbyosmosis
Topic Author
Posts: 0
Joined: February 7th, 2006, 5:38 am

How?: Binomial Tree for pricing European options.

February 9th, 2006, 4:00 pm

Collector,Thanks for the detailed answer. Do you have any other recommendations in terms of good books?
 
User avatar
learnbyosmosis
Topic Author
Posts: 0
Joined: February 7th, 2006, 5:38 am

How?: Binomial Tree for pricing European options.

February 9th, 2006, 4:02 pm

Thanks everyone for your help.What are the 3 most widely used books that deal with numerical/computational methods for derivative securities?I prefer books that are in C++ if they have to be language specific.
 
User avatar
damel
Posts: 3
Joined: January 8th, 2006, 12:02 pm

How?: Binomial Tree for pricing European options.

February 10th, 2006, 7:10 am

Modeling Derivatives in C++Justin LondonISBN: 0-471-65464-7link to wiley siteit's a good book with a wide view on the all the topics