# Simulating two correlated time series using GBM [duplicate]

My situation is the following: I have two time series TS1 and TS2, whereas TS1 is a stock price. According to literature, TS2 is positively correlated to TS1. Furthermore, since TS1 is a stock price, it can be modelled to follow a Geometric Brownian Motion. I have the histrocial data of both series available ranging back a few years.

My goal is to simulate sample paths of both series in Python, taking into account the correlation. Since I have the historical data of TS1 available, simulating TS1 in Python is no problem. I can get the input parameters for the GBM simulation from the historical data and then create multiple GBM sample paths. My question is, how do I proceed to simulate TS2?

I already used the Pearson correlation coefficient between the historical data of both time series and I got a value of 0.5 which confirms the suggestion in literature. As a result, I guess I should model TS2 to also follow a GBM. But how do I take into account the correlation between both time series in my simulation? How can I find out what the correlation exactly is between both time series, since the Pearson correlation coefficient only tells me that there exists a correlation.

• Hi @Willart, are you familiar with the Cholesky decomposition of a symmetric matrix (en.wikipedia.org/wiki/Cholesky_decomposition) ? You can simultaneously simulate $N$ correlated stochastic processes with it, see Wiki article. Commented Nov 9, 2020 at 9:27
• @Kermittfrog I'm not familiar with it, thank you for the suggestion. However, I still don't get how I can find out the relation between the two time series, i.e. what the correlation is. Commented Nov 10, 2020 at 9:24
• @develarist I'm not sure this helps, there are two answers with two different formulas and approaches. Also, this doesn't seem to answer hot to find out the correlation from historical data. I only know that there is a correlation, but how can I find out what it is exactly? Commented Nov 10, 2020 at 9:24
• To clarify: Are both, TS1 and TS2 time series of historical stock prices? Are they observed at the same observation dates? If yes to both, then section 5.1 of this source should get you far: columbia.edu/~mh2078/MonteCarlo/MCS_Generate_RVars.pdf Commented Nov 10, 2020 at 9:46