American Option pricing with Bayesian Monte Carlo Path (2024)

You are now following this Submission

  • You will see updates in your followed content feed
  • You may receive emails, depending on your communication preferences

Version 29.0.0.1 (194 KB) by Chondrally

Density Functional American Option pricing with Bayesian Monte Carlo Path Int & MUSIC w/ Kelly Criterion

Follow

  • Share
  • Open in MATLAB Online

  • Download

  • Overview
  • Functions
  • Version History
  • Reviews (1)
  • Discussions (0)

Multipath computation of American option prices and confidence limits based on statistics
A probability distribution is calculated from a past stock chart and the fat tails are estimated. The distribution , unique to every stock chart, is used to generate an arbitrary number of paths into the future (3000 by default) and 50% and 80% and 98% confidence intervals are calculated and displayed. A computation of the most probable call to put ratio is calculated and used to generate a Most Probable Win percentage per day. The final absolute probability of winning at the 98% level is used to calculate the Kelly Criterion multiplied by 0.92 in the Risk Analysis section of the figure. This simulation differs significantly from Black Scholes and is more accurate. Every stock has its own probability distribution in the past. Care should be taken to note that market conditions can change abruptly in the future and distributions can be significantly altered over a short time frame by global market events, Intra-day distributions can be remarkably different from end of day distributions, so the results may vary from real world trading but it is probably the most accurate look ahead in stable markets that we are going to get with a mathematical approach. Care and attention to liquidity , volume and volatility should be observed.
Stock Forecasting and American Option pricing compared to Black- Scholes(BS) using Bayesian Markov Monte Carlo Simulation and Wavelet or Fourier or Neural Network Extrapolation with Indicators..http://library.wolfram.com/infocenter/MathSource/9086/ for more information!
If you use the alternate program as well, Bayesian Markov Stochastic Monte Carlo Valuation of Integrated Price Volume Action with Kelly Criterion, the kelly values from that program should be more accurate as an assessment of volume trends are also incorporated and we all know how important liquidity is. An expert using both programs will be a better judge just before an earnings announcement. A Fourier extrapolation is also carried out, but is only valid if it is supported in the range by the Statistical look ahead! The extrapolation is important for assessment of trends and cycles!

Cite As

Chondrally (2024). American Option pricing with Bayesian Monte Carlo Path (https://www.mathworks.com/matlabcentral/fileexchange/56352-american-option-pricing-with-bayesian-monte-carlo-path), MATLAB Central File Exchange. Retrieved .

Requires
  • MATLAB
  • Curve Fitting Toolbox
  • Database Toolbox
  • Financial Toolbox
  • Optimization Toolbox
  • Signal Processing Toolbox
  • Statistics and Machine Learning Toolbox
  • Wavelet Toolbox

run optionprices.m after loading this file. Make sure the path points to the folder containing these files.. A zero for the strike price will calculate options AT THE MONEY.need 4GB memory and at least a 2GHz processor

MATLAB Release Compatibility

Created with R2016b

Compatible with any release

Platform Compatibility

Windows macOS Linux

Categories
  • AI, Data Science, and Statistics > Curve Fitting Toolbox > Fit Postprocessing >
  • Computational Finance > Financial Toolbox > Price and Analyze Financial Instruments >
  • Computational Finance > Financial Toolbox > Stochastic Differential Equation (SDE) Models >

Find more on Fit Postprocessing in Help Center and MATLAB Answers

Tags Add Tags

application data exploration data import finance graphics modeling signal processing statistics

Acknowledgements

Inspired: Bayesian Monte Carlo Valuation of Price Volume Action

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.

Learn About Live Editor

  • calculateconflevels
  • calculatefuturevalues
  • generatemagphase
  • generateTemperatures
  • getdata
  • getdist
  • getintegrate2
  • getpdf5
  • getpercenterrorcubic
  • getpercenterrorlinear
  • getPercentErrorLinear3
  • googleprices
  • MusicFinal
  • optionprices.m
Version Published Release Notes
29.0.0.1

Updated to reflect correct Toolbox dependencies

Download

29.0.0.0

changed title

Download

28.0.0.0

updated coeffs in generateTemperatures, to reflect proper linear trend into future
and updated offset at end of program in MusicFinal. adjusted getpercenterrorlinear and optionprices.m
so coefficients would be passed without error....
updated to R2016b

Download

27.0.0.0

updated description
updated MusicFinal.m to correct initial prediction value to be correct value based on last data point of original data

Download

26.0.0.0

updated tiltle to include Density functional , i use a probabilty density functional to compute the path integral

Download

25.0.0.0

updated expiration date

Download

24.0.0.0

updated all kelly criterion formulas with error checking

Download

23.0.0.0

updated musicfinal
updated MusicFinal to make it more accurate added Matrix G=conj(transpose(eigvecs matrix)).(eigvecs matrix)

Download

22.0.0.0

added two profit graphs, one for most probable profit and one for fourier path profit
added edit boxes for all 4 legs of a sophisticated option strategy
updated the code to calculate the complete kelly criterion

Download

21.0.0.0

updated optionprices, musicfinal and kelly criterion calculation included plot of fourier fit to data

Download

20.0.0.0

updated musicfinal and added getpercenterrorlinear3 to fix scaling of fourier output

Download

19.0.0.0

updated kelly criterion and figure
updated summary

Download

18.0.0.0

added one last line to MusicFinal y = y - y(N2)+s0 to fix discontinuity at boundary

Download

17.0.0.0

u[pdated MusicFinal to fix discontinuity at boundary condition
updated call and put present value plots with magenta fourier information
updated figure to include fourier call and put option values

Download

16.0.0.0

updated title
updated title
sign change in fourier trend analysis
modified equation

Download

15.0.0.0

introduced MUSICFINAL subroutine and corrected fourier trend analysis

Download

14.0.0.0

fixed volatility presentation and updated figure display

Download

13.0.0.0

updated color of calculate plots button to make it more noticeable
added EMA40 Volume indicator as a measure of recent liquidity

Download

12.0.0.0

changed default number of paths to 3000

Download

11.0.0.0

updated kelly call and kelly put criterion

Download

10.0.0.0

updated figure

Download

9.0.0.0

added edit box to figure and matlab code to calculate the ratio of EMA 40 days to EMA 200 days, a critical ratio for trading.

Download

8.0.0.0

updated magnitude calculation of spectral components
forget most recent zip file

Download

7.0.0.0

corrected magnitude of spectral components in rootmusic fourier so that amplitudes of black time series would be commensurate with data spectral components.

Download

5.0.0.0

added phase to rootmusic fourier so that timing of trend in stock chart will continue appropriately

Download

4.0.0.0

forgot to add new zip file last time, updated black rootmusic fourier mag and phase
updated requirements.... needs curve fitting toolbox, financial toolbox, signal processing toolbox and matlab
added rootmusic fourier mag and phase of extended time series to most probable path plot

Download

3.0.0.0

updated documentation
updated kelly criterion to represent absolute percent win probability
updated kelly criterion description in documentation

Download

2.0.0.0

Changed way risk analysis is reported to make it more intuitive

Download

1.0.0.0

included a more realistic description of real markets
made a mistake about what matlab products were required. Only the financial toolbox and matlab R2016a are required.
corrected volatility calculation
corrected volatility calculation
a note about functionality
changed volatility calculation from cubPCR1 cubic interpolation volatility to black scholes volatility
adding photo

got rid of unnecessary required toolboxes

Download

American Option pricing with Bayesian Monte Carlo Path (2)

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom(English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

American Option pricing with Bayesian Monte Carlo Path (2024)

References

Top Articles
Latest Posts
Article information

Author: Fredrick Kertzmann

Last Updated:

Views: 5811

Rating: 4.6 / 5 (46 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Fredrick Kertzmann

Birthday: 2000-04-29

Address: Apt. 203 613 Huels Gateway, Ralphtown, LA 40204

Phone: +2135150832870

Job: Regional Design Producer

Hobby: Nordic skating, Lacemaking, Mountain biking, Rowing, Gardening, Water sports, role-playing games

Introduction: My name is Fredrick Kertzmann, I am a gleaming, encouraging, inexpensive, thankful, tender, quaint, precious person who loves writing and wants to share my knowledge and understanding with you.