2025-05-13 03:40:24
Although C++ is the primary language commonly used for pricing options, the team decided to use Python entirely for learning purposes. This not only provides an opportunity for the team to practice their Python skills but also allows for easy integration of the library with the website.
This library is temporarily named PyQuant, which currently has limited functionality, consisting of two main parts:
In the future, there will be additional financial options with closed formulas to be used for result verification. However, for now, the team is primarily focused on developing the Monte Carlo solver.
The closed-form calculation relies on two statistical functions:
You can see the numerical approximation method of CNDF in [1]. Once you have the NPDF and CNDF, you can calculate the prices of Vanilla Call and Put options, as well as various Greek values, such as:
Additionally, the closing formula can also be used to calculate the price of Digital Options.
The Monte Carlo approach works differently. The library will have a module that stores pay-off objects for each type of option, such as Call, Put, Forward, Digital Call, etc. Another module stores the option objects, which for Vanilla Options require specifying the expiration time and pay-off structure. The strike price is stored in the pay-off object for flexibility in code reuse.
The final module is the Monte Carlo Engine, which calculates numerous stock price paths according to the Geometric Brownian Motion process and uses these to estimate the expected payoff of the option. This return will be discounted using the risk-free rate to obtain the present value of the option.
In the current stage Re-running the Monte Carlo simulator every time there is a change in the input data takes a lot of computation time. There are two improvement approaches:
Reference: Options Pricing in Python
From https://www.quantstart.com/articles/Options-Pricing-in-Python/
2025-01-10 10:12:01
2024-05-31 03:06:49
2024-05-28 03:09:25
There are many other interesting articles, try selecting them from below.
2023-10-20 09:37:23
2023-10-11 05:59:48
2024-03-08 04:53:01
2024-05-02 05:54:22
2025-05-13 09:11:14
2025-01-21 02:41:00
2024-04-26 03:25:28
2024-09-17 01:19:29