n-dimensional correlated Brownian motions

버전 1.0.2 (3.09 KB) 작성자: Gregor Fabjan
Generate a matrix of increments from a multidimensional Brownian motion with a given vector of means and a Variance-Covariance matrix.
다운로드 수: 239
업데이트 날짜: 2022/9/19
Functions generate a matrix of increments from a multidimensional Brownian motion with a given vector of means and a Variance-Covariance matrix.
Problem
Often when using for example multifactor models, the model requires correlated sources of noise. A popular choice is to use a multidimensional Brownian motion.
Solution
The proposed algorithm uses the fact that increments of a BM are normally distributed as well as the fact that assuming n independent BM's whose increments are generated from a standard normal distribution (denoted , a derived process has its increments distributed as where mu is the vector of desired means and L is the square root of the desired Variance-Covariance matrix (denoted E).
Inputs
  • Vector of means for each BM `mu`
  • Variance-Covariance matrix whose diagonal elements describe the volatility of each BM and the off-diagonal elements describe the covariance `E`
  • Number of samples needed `sampleSize`
Output
  • Matrix of samples where each column represents a BM and each row a new increment
Getting started
The user is interested in generating samples from 2 Brownian motions with a correlation of 0.8. Additionally, the first BM has a mean of 1 and a variance of 1.5. The second BM has a mean of 0 and a variance of 2. The user is interested in 480 samples.
Example of use
mu = [1; 0];
VarCovar = [1.5, 0.8; 0.8, 2];
sampleSize = 480;
CorBrownian(mu, VarCovar, sampleSize)

인용 양식

Gregor Fabjan (2024). n-dimensional correlated Brownian motions (https://github.com/qnity/correlated_brownian_motion_matlab), GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2021b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!

GitHub 디폴트 브랜치를 사용하는 버전은 다운로드할 수 없음

버전 게시됨 릴리스 정보
1.0.2

Project now has a website

1.0.1

Link to GitHub

1.0.0

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.