yuriak / RLQuant

Applying Reinforcement Learning in Quantitative Trading
333 stars 103 forks source link

Pairs Trading Forex Question #1

Closed cTatu closed 6 years ago

cTatu commented 6 years ago

Hello, Can I still use the PairsTradingTutorial.ipynb to trade some other dataset? I have a dataset of a forex pair which contains O H L C prices and Volume (I can add also some indicators), and I wonder if the example that you're giving in thtat jupyter notebook will work for this dataset.

Thank you!

yuriak commented 6 years ago

Hello @cTatu , Sorry for the delay. I think it will work, but be careful that two assets in your dataset should better have cointegration relations. You can use the lib statsmodels to do a cointegration test. If the p-value<0.05, it is more appropriate to do pairs trading.

Then, just simply modify the code block of loading data. Good luck :)

cTatu commented 6 years ago

My dataset looks like this, so I only have one assets which is the EUR/USD. image I need one more assets to use this model?

yuriak commented 6 years ago

@cTatu I think one asset is also OK, you can treat it as the spread of two different assets. However, you may need to modify the generate_tech_data function and only generate technical indicators for one asset.