9

Two ways: Model the returns using an Ornstein-Uhlenbeck process You can control the variance of the residual noise in the process to your desired level of correlation. Conceptually you inject gaussian noise into the synthetic OU process to satisfy your requirement. For example, let's say you have time-series A which is what you are modelling. Time-series ...


5

Yes, this technique is called moment matching variance reduction and it may indeed lead to a form of variance reduction. The first and second order moments correspond to the mean and the variance of the distribution. You can extend to higher order moments, which is of course more difficult to implement and creates some extra overhead. The mean can be adjust ...


4

Wilmott Forums - "How can I simulate correlated random numbers?" Generating correlated normal variates Random Correlated Series Generator (using R) All found with a Google search for "how to generate random correlated series".


3

Actually there are many different approaches to prove randomness (academic) or disprove randomness (fund managers to persuade their clients or their bosses ;-) in financial markets. One approach I find especially interesting is based on algorithmic information theory. Basically what that does is to find an algorithm to compress financial data. The fewer ...


3

You have to distinguish (at least) two approaches: 1) derivatives pricing: Here you assume that there is a probability measure other than (but somehow tied to ) the real world measure - say $Q$. Under $Q$ your underlying is a martingale. Then pricing derivatives is calculating expectations. This measure $Q$ is linked to the principle of no-arbitrage. If ...


3

A useful decomposition is, in R's matrix notation, V = S %*% C %*% S, in which S is a matrix with the standard deviations on the main diagonal and zeros elsewhere, and C is the correlation matrix. (See this note on Matrix Multiplication with Diagonal Indices.) To get a meaningful V, you need to have C positive (semi)-definit. A simple way to achieve this is ...


3

Mersenne Twister is currently the most used PRNG in the quant world. It was even incorporated in C++11 so it can be considered standard nowadays. Any PRNG with reasonable statistical quality shall perform well (equivalently) for pricing, so that differences relate more to convenience (speed, parallelizability etc..). If the statistical quality is poor then ...


3

This looks to me like a range accrual. Let $t_1, \ldots, t_n$, where $0 < t_1 < \cdots < t_n$ be business days that are being considered. We compute \begin{align*} E\left(\sum_{i=1}^n \pmb{1}_{b_1 < S_{t_i} < b_2} \right) &=\sum_{i=1}^n E\left(\pmb{1}_{b_1 < S_{t_i} < b_2} \right)\\ &=\sum_{i=1}^n \left[E\big(\pmb{1}_{S_{t_i} >...


3

You could create a rescaled stochastic indicator from your randomly generated, correlated series. 1) use whatever software/methodology you want to create your random series with 0.85 correlation to the original data. 2) find the maximum and minimum values of this new series and rescale the series to range between 0 and 1 using this formula; (series_value - ...


3

Exact Discretization of the Solution to the Geometric Brownian Motion Stochastic Differential Equation Let $P_{t}$ represent the time series of market prices of the underlying, $\mu$ be its mean continuous log-return, $\sigma$ be its instantaneous volatility and $W_{t}$ be a Wiener process. Here is the stochastic differential equation for the geometric ...


3

I assume, this is not for real-time display, so you can use the price from future. If this is not the case, this answer is irrelevant. I don't know about a standard technique, but this is my suggestion: $p_{noise} = p_{current} + \nu * (p_{future} - p_{current})$ where $p_{future}$ is future price for some horizon, and $\nu$ is a zero-mean Gaussian noise.


3

Here is one recipe, in case you can live with Spearman rank correlation. (Which you should: linear correlation is often not appropriate in the non-normal case. And in the normal case, there is almost no difference between the two correlation types.) Generate samples of your $k$ features with all the desired attributes. These samples may be random or ...


2

I have seen a technique which uses frequency domain and does pretty much what (I think) you are trying to do. The author does not give the complete details, so you might have to contact him for that, or take a look at the (free) software he has developed. Link here: http://blog.quantumfading.com/2009/08/24/historical-data-randomization-using-the-frequency-...


2

First I provide a brief description of Halton sequences. A Halton sequence is a deterministic sequence of numbers that provides well-spaced 'draws' from an interval and provides negative correlation between simulated probability for individuals. Generation is based on a prime number Sequence is constructed based on finer and finer prime-based divisions of ...


2

I haven't heard of a method to do it your way. Usually, you start with covariance matrix and do Cholesky in order to be able to generate random draws from the multinomial normal distribution with given covariance matrix. Maybe that is what you want? In any case, if you need precisely specify the variances, see: Hirschberger, M., Y. Qi, & R. E. Steuer ...


2

You approach sounds good, but there is no need to compute the inverse Fourier transform. The characteristic function of a Levy-distributed random variable with parameter $c$ is given by \begin{equation} \phi(\omega; c) = \exp \left\{ -\sqrt{-2 \mathrm{i} c t} \right\}. \end{equation} Thus, the characteristic function of the sum of two i.i.d. Levy-...


2

Much of what follows can be found in Glasserman (2003), Chapter 5, Monte Carlo methods in financial engineering. The reason for using low discrepancy numbers is because they are somewhat "equidistributed", meaning that you can guarantee that they fill the unit interval in a regular fashion without having large gaps. (the same is true for the unit square, or ...


2

Cholesky (or SVD or any other approach based on matrix multiplication) only works for normal distributions, which your features cannot be, given that they have values within finite intervals. To see why Cholesky does not work, assume two additional features, which are independent uniform $(U_1,U_2)$. Now you want to create features with correlation $\rho$ ...


2

Throw in correlation as the additional variable. Similarly, volofvol could be another candidate to play with. A spread option could have a larger volatility than either of the two underliers.


2

Let $X_1$ and $X_2$ be your two assets and $C$ your financial product. For now we only assume products which are a linear combination of $X_1$ and $X_2$ with no shorting allowed, hence: $$\begin{align} & C=\alpha X_1 + (1-\alpha)X_2 \\ & 0\leq \alpha \leq 1 \end{align}$$ Letting $\rho$ be the correlation between returns $r_1$ and $r_2$, we have: $$\...


2

They are independent. The point is that $y$ is derived from your easily sampled distribution $g$ randomly. Now you have a random test (via $v$) that decides whether to accept $y$ or not as part of the random sample of the harder to sample $f$. The procedure uses $M$ in the accept-reject method and whilst you can derive conservative estimates with $M$ quite ...


1

Since the correlation matrix $C=LL^{\top}$ is also $C=U^{\top}U$, where $U$ is the upper triangular matrix, rather than $L$ the lower triangular matrix, you can transform an uncorrelated features matrix $F$ containing features 1, 2 and 3 in its columns by multiplying this $F$ matrix with $U$, giving the correlated features matrix $F_c$: $$F_c = F U $$ In ...


1

Think of it this way, $\Omega$ elements are the states of the world. This means the set of {macroeconomic data, geopolitic situation, weather, fundamentals of the firms, sentiment of market participants, etc.} and anything else that might have any influence on the stocks prices... As Ezy explained, what makes probability theory useful is that it allows us ...


1

In probability theory $\Omega$ is called the « sample space » of possible outcomes. It does not have an actual representation and it does not matter much since the only thing that really matters is the probability measure $P$. More details here: https://en.m.wikipedia.org/wiki/Probability_space


1

The process you describe of random sampling from a distribution is correct. Calculate a uniform random variable $u$ and then convert that to a value $x$ by requiring that $x$ is the minimum value for which $F(x) \geq u$. Then $x$ can be said to be sampled from $f(x)$. You are right that in practice this can be hard depending upon the underlying $f(x)$. Take, ...


1

I posted a free self contained excerpt of my book Modern Computational Finance that explains Sobol's sequence and in particular its Latin Hypercube property, meaning that each axis is sampled evenly but in a different order for different axes, as long as the number of samples is a power of 2 minus 1. I hope it helps: https://medium.com/@antoine_savine/sobol-...


1

It is not entirely clear to me what you really want but the following approach might help. I assume you can generate (samples of) "variances in a certain range". So let $\sigma_1^2,\ldots,\sigma_n^2$ be an (instance of) such variances. Your problem then is to find a way to generate random symmetric matrices with eigenvalues $\sigma_1^2,\ldots,\sigma_n^2$. ...


1

Computer programmers use the NIST test Suite to evaluate the quality of pseudo-random number generators. I've been interested in using it to test market data for periods of stability (represented by high randomness) and periods of state transition (represented by low randomness). Multiple implementations exist. A discussion of using the NIST suite to test ...


Only top voted, non community-wiki answers of a minimum length are eligible