Giter VIP home page Giter VIP logo

pontazaricardo / finance_european_double-barrier_knock-out_call Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 2.6 MB

This program calculates the price of European double-barrier knock-out calls by the use of binomial trees and Monte Carlo Simulations.

License: Mozilla Public License 2.0

MATLAB 100.00%
bonds bond-pricing monte-carlo-simulation barrier price binomial-trees knock-out double-barrier call bond

finance_european_double-barrier_knock-out_call's Introduction

Finance_European_double-barrier_knock-out_call

This program calculates the price of European double-barrier knock-out calls by the use of binomial trees and Monte Carlo Simulations.

demo

Inputs and Outputs

For this program, we have:

  1. Inputs: S (stock price), X (strike price), H (high barrier), L (low barrier), t (year), s (volatility in %), r (continuously compounded interest rate in %), and n (number of periods).
  2. Output: Prices given by both the binomial tree and the Monte Carlo simulation.

Notes

We need to assume L < S < H, i.e., the stock price is always between the lower and high barrier.

Usage

In MatLab, just run the given file.

Example

Suppose S = 95, X = 100, H = 140, L = 90, t = 1 (year), s = 25 (%), r = 10 (%), and n = 1000: 1. The price given by the tree is 1.457 2. The price given by the 1.94 (varies depending on the amount of paths of the Monte Carlo simulation).

demo

Because the second value is given by a Monte Carlo simulation, it will vary from run to run, as seen when comparing the image above with the image below.

demo2

In the previous two images we can see that the value of the Monte Carlo simulations shifted from 1.9460 to 1.5205.

finance_european_double-barrier_knock-out_call's People

Contributors

pontazaricardo avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.