-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pairs Trading #104
Comments
@kernc any ideas? |
Most simply, until #20 is properly addressed, you could prepare the Assuming you always enter trades on the two instruments in parallel (buy one, sell the other), this is equivalent to buying Thus, you can prepare your data (assuming the two instruments' data frames have the same, appropriately named columns): data = df_instrument1 / df_instrument2 |
Yes, I had Initially thought about this approach but this highly restricts the kind of algo that can be developed. If I come across a solution .. I will add a PR |
Besides always entering trades on the two instruments simultaneously (buying one–selling the other, or vice versa), how does it restrict it? |
its not about just making trades. Its about the analysis that you want to perform it indicators or other things. That would be restricted. with the data already a ratio. |
Note, the passed in |
yes true that is possible, yea this definitely solves the issue to some extent. but still, how can we accurately calculate the stats? |
You're trying to buy low and sell high just like usual. I think the stats will be fine as-is? 🤔 Maybe account for double the spread/commission as you're simulating entering trades on two separate instruments. |
I will try and let you know how it goes and If I face issues I will put it up here. |
Any updates on the following? |
Hello. I will also add my voice for the implementation of work with several assets. Arguments:
|
So currently the Library can only support a single instrument. I would like to extend it for pairs Trading (Two instruments) Buying one selling other.
Any advice will be helpful.
The text was updated successfully, but these errors were encountered: