Suppose I have several time series (these are financial series, prices, indicators) with the same time. There may be two or more.

I don’t know what relationships there are between the series, correlations, cointegrations, non-linear relationships, or there are no relationships at all ...

  1. I would like to automatically find out if there are connections and what
  2. I would like to simulate these series with connections

UPD=======

Here is an example of the data I am using

library(quantmod)
 getFX("EUR/USD")
 getFX("GBP/USD")
eu <- as.vector(EURUSD$EUR.USD)
gb <- as.vector(GBPUSD$GBP.USD)
library(TTR)
roll.cor <- TTR::runCor(eu,gb , n = 5)
rsi <- TTR::RSI(eu,n = 5)
mydata <- cbind(eu,gb,roll.cor,rsi)

> mydata
             eu       gb    roll.cor        rsi
  [1,] 1.177237 1.372932          NA         NA
  [2,] 1.179440 1.376770          NA         NA
  [3,] 1.179474 1.376679          NA         NA
  [4,] 1.179910 1.376033          NA         NA
  [5,] 1.181616 1.376859  0.83911455         NA
  [6,] 1.182466 1.376244 -0.15342956 100.000000
  [7,] 1.185494 1.380270  0.84880800 100.000000
  [8,] 1.188066 1.384948  0.95413564 100.000000
  [9,] 1.187910 1.386290  0.97020360  97.715547
 [10,] 1.187945 1.386288  0.98141920  97.730090
 [11,] 1.186888 1.384056  0.95570036  78.794634
 [12,] 1.186068 1.380795  0.93082598  66.331768
 [13,] 1.182712 1.377056  0.97051123  36.664213
 [14,] 1.182410 1.381155  0.82146557  34.907988

I have a trading strategy that works on this historical data, I would like to simulate many hundreds of years of similar data in order to test the strategy better and also find more optimal parameters...

I'm wondering if this can be done and how to do it