- Sampling dimension = 1, which makes the option back to vanilla.
- Sampling dimension = 12, $ 0 = t_{0}<t_{1}<t_{2}<...<t_{d-1}<t_{d}=T $, $ t_{i+1} - t_{i} = \frac{T}{12} $.
- Geometric or Arithmetic.
To make things easy, I will split up a single class to three classes.
The main class: EuroCallOption
- This class deals with basic properties of the option.
- Spot
- Strike
- InterestRate
- DividendRate
- Volatility
- ExpirationDate
- And some settings
- nSAMPLE---- how many samples to generate when pricing this option in Monte Carlo manner
- nSTEP---- how many steps are there in a single random walk. ( This is not the sampling dimension, we can have 1,000 steps in a sample path while we only take the end point of this random walk into account.)
- Dimension---- this is the sampling dimension. Increasing nSTEP could lower the bias from discretization of the stochastic process. Increasing Dimension would only change the nature of this option.
- Geometric or Arithmetic---- To decide which method to use when calculating the payoff.
PayOff
- This class deals with the calculation of payoff given the random walk paths
- price
- And it will rely on another class's output----BrownianMotion
- Settings that PayOff reads from EuroCallOption
- Dimension
- Geo or Arith
BrownianMotion
- This class would generate sample paths according to settings.
- Allow stratified sampling along $W(t_{d})$.
- Allow use of Park-Miller random number generator
- Allow use of Sobol sequence generator
- And the settings that should be forwarded to this class when calling its functions include:
- nSAMPLE
- nSTEP
1, make an object call EuroCallOption
2, make a BrownianMotion based on EuroCallOption's setting
use this BM to generate random path according to requirements
3, make a PayOff class to read BM's sample paths, and calculate the price of this option according to requirements.
OK, let't get down to details:
1, how to stratify the sampling along the ending points $W(t_{d})$
2, how to generate the Brownian bridge based on known $W(t_{d})$
The first question:
Stratified sampling is to sample proportionally to the probability density function. Say if we draw 1,000 samples, of course we don't want all 1,000 ones to be extreme values. The most ideal scenario should be that about 600 ones are located within $[-1\sigma, 1\sigma]$, and 999 located inside $[-3\sigma, 3\sigma]$. And with stratified sampling, we are actually controlling how many samples to sample from each part of the whole distribution. So the sample distribution is much like the theoretical distribution.
1, generate stratified ending point. (I accomplished this by writing a STRATIFY.m)
2, generate intermediate values of each path based on conditional distribution ( working on it)
It's best that if we pack $2^{m}$ steps in a path. But if not, doesn't matter...
OK, let't get down to details:
1, how to stratify the sampling along the ending points $W(t_{d})$
2, how to generate the Brownian bridge based on known $W(t_{d})$
The first question:
Stratified sampling is to sample proportionally to the probability density function. Say if we draw 1,000 samples, of course we don't want all 1,000 ones to be extreme values. The most ideal scenario should be that about 600 ones are located within $[-1\sigma, 1\sigma]$, and 999 located inside $[-3\sigma, 3\sigma]$. And with stratified sampling, we are actually controlling how many samples to sample from each part of the whole distribution. So the sample distribution is much like the theoretical distribution.
1, generate stratified ending point. (I accomplished this by writing a STRATIFY.m)
2, generate intermediate values of each path based on conditional distribution ( working on it)
It's best that if we pack $2^{m}$ steps in a path. But if not, doesn't matter...
This comment has been removed by a blog administrator.
ReplyDeleteHi,
ReplyDeleteThese discussions are really a great source to learn new things.
Assignment Service Provider
Assignment Help and Writing Service