1
$\begingroup$

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

$\endgroup$
2
  • $\begingroup$ This is too broad, you are basically asking for someone to give you the whole recipe for time series analysis. 1. show us some data, 2. tell us of a specific problem you have, 3. show us what you have done. $\endgroup$ Commented Feb 22, 2022 at 8:50
  • $\begingroup$ ok i need some time for that $\endgroup$
    – mr.T
    Commented Feb 22, 2022 at 8:52

1 Answer 1

0
$\begingroup$

A general way to generate time series data based on an already existing dataset, is implemented by the Synthetic Data Vault, an ecosystem of libraries that allows one to learn single-table, multi-table and timeseries datasets to later on generate new Synthetic Data that has the same format and statistical properties as the original dataset: https://sdv.dev/SDV/. As a caveat, it is not exclusively focused on on finance/trading strategies.

However, the tutorial page of the PAR model (https://sdv.dev/SDV/user_guides/timeseries/par.html) uses a dataset consisting of financial time series similar to the ones given in the question.

A detailed technical breakdown of the methods used can be found in the published paper: https://dai.lids.mit.edu/wp-content/uploads/2018/03/SDV.pdf

$\endgroup$
3
  • 2
    $\begingroup$ Please explain at least a little about what the SDV is, & how it could be used to answer the OP's question. $\endgroup$ Commented Feb 22, 2022 at 14:11
  • $\begingroup$ Is the extended answer sufficient or is there specific information that you would like to see mentioned? $\endgroup$ Commented Feb 22, 2022 at 14:56
  • $\begingroup$ It would be great to see an example in R $\endgroup$
    – mr.T
    Commented Feb 22, 2022 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.