Tag Info

New answers tagged simulations

4

In addition to StackG's answer, here is a good introductory overview of several (approximate and semi-analytical) methods to price baskets in a Black-Scholes framework: Krekel et al - An analysis of pricing methods for basket options

8

I'm not completely certain from your question, but I'm going to assume you have a basket of $n$ stocks with prices $S_0(t)$ to $S_n(t)$, and you want to price an option with payoff at $C(\tau)$ at time $\tau$ equal to \begin{align} C(\tau) = \max\Bigl({\frac 1 n}\sum^n_{i=1} S_i - K, 0\Bigr) \end{align} where $K$ is the strike of the option I'm also going to ...

2

The time between two events in a poisson distribution has an exponential distribution, so the easiest thing to do is simulate a sequence of exponentially distributed variables and use these as the times between events, as discussed in this primer. To simulate variables given a uniform RNG, we need the reverse CDF of the distribution, which maps uniform ...

1

I worry that power prices are very unlikely to be stationary. It is possible the mean does not vary wildly over time, and the price process may not be integrated, i.e. prices may not require differencing. However, prices (or returns) almost surely require correcting for heteroskedasticity. If you have a powerstack function estimated, perhaps you could use ...

3

I will just clarify Point 2 in StackG excellent answer. (It's really a comment, but it's too long and has too much math symbols to fit in the comment field.) Suppose you're given a covariance matrix $C$ for the returns of $n$ assets. (1000 $\times$ 1000 is 1 million entries - should not be too large for modern computers to work with, but do be mindful of ...

0

I would use Numpy (a library of Python) to do it. There's a function called numpy.random.multivariate_normal. It takes in 2 main arguments, an array of means (expected returns of the stocks) and an array (matrix) of covariances of the stocks.

6

What does 'simulate a covariance matrix' mean? If the question means, generate an arbitrary correlation matrix for 1000 stocks, then we can choose any symmetric matrix with all 1s down the diagonal, so long as every element is between -1 and 1 and the matrix is positive semi-definite. The large size of the matrix means that putting random values in every ...

1

If i understand this correctly, you want to be able to infer a future volatility surface, given the current simulation parameters you have. What you're essentially trying to do it include the modelling of forward vol/skew in your MC. Getting the forward vol surface vaguely correct is quite important to price some types of derivative - i.e. anything that has ...

2

Based on Quantuple comments (thank you), I fixed many mistakes and I came up with the following code: import numpy as np import scipy.stats nb_simuls = 5_000_000 # parameters from https://file.scirp.org/pdf/JMF_2014050615380663.pdf Table 1 / cell 1 S1, S2, S3 = 50, 60, 150 v1, v2, v3 = 0.3, 0.3, 0.3 rho_12, rho_23, rho_13 = 0.40, 0.20, 0.80 K = 30.0 T = ...

Top 50 recent answers are included