Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BinomialTreeModel for Option Pricing by Feature/binomial tree models #1

Merged
merged 3 commits into from
Jul 27, 2024

Conversation

Liberxue
Copy link
Owner

@Liberxue Liberxue commented Jul 27, 2024

Add BinomialTreeModel for Option Pricing

Description:

This PR introduces the BinomialTreeModel for option pricing.

The implementation is based on the following references:

Binomial Models by Kent University

Binomial Option Pricing by the University of Leicester

Changes:

  • Added BinomialTreeModel struct with steps parameter.
  • Implemented the OptionPricingModel trait for BinomialTreeModel.
  • Calculated call and put option prices using the binomial tree method.
  • Calculated Greeks (Delta, Gamma, Theta, Vega, Rho) for the options.
  • Testing:
  • Included unit tests for call and put option pricing.
  • Added tests for the calculation of Greeks.

Notes:

The model uses a default of 100 steps in the binomial tree, which can be customized.
Calculations are performed using the risk-neutral probability method described in the references.

@Liberxue Liberxue changed the title Feature/binomial tree models Add BinomialTreeModel for Option Pricing by Feature/binomial tree models Jul 27, 2024
@Liberxue Liberxue merged commit 54f7e45 into dev Jul 27, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant