Skip to content
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

[New strategy for BitMex] Funding scalping #976

Open
Camille92 opened this issue Aug 5, 2019 · 7 comments
Open

[New strategy for BitMex] Funding scalping #976

Camille92 opened this issue Aug 5, 2019 · 7 comments

Comments

@Camille92
Copy link
Contributor

Hi all, I'm back,

I think no one thought about that before, but I think it can be an awesome low-risk/high reward strategy.

BitMex funding is calculated every 8 hours and is paid peer-to-peer depending on the side the future market is going in comparison to the "real" exchange market.
If BitMex price is above the exchange price, a fee will be paid from btc borrowers to btc lenders (longs to shorts). If BitMex price is under the exchange price, the contrary occurs.

The rate varies between 0.03% and 0.3% per day, and you make 0.025% on all maker trades. And that's without leverage.

I think we can hack that system for our own profit 😈.

If we buy 2-3 minutes before the 8 hours mark and sell 1mn after, we take a very small risk of being exposed only a few minutes to the market and make a bit of money each time.

With a bit of leverage like 3-5, this strategy on its own starts to be very interesting.

Anyone looking to incorporate it?

Have a nice day,

Camille

@asfbhero
Copy link

asfbhero commented Aug 5, 2019

Seems interesting, I'd give it a try.

@Camille92
Copy link
Contributor Author

Camille92 commented Aug 6, 2019

Nice, keep me updated of your advance.

We need to get the funding for ETH/USD or for BTC/USD it's displayed on the website.

It's on the API under "funding", and set a time in minutes before funding for when to start the action.

If funding is positive, TBP = -1
Is funding is negative, TBP= 1.

I think there's already a feature about leverage no ?

@Camille92 Camille92 reopened this Aug 6, 2019
@asfbhero
Copy link

asfbhero commented Aug 6, 2019

Yeah, leverage is already in there, and works. The problem is that the bot still doesn't know the difference between pings and pongs on bitmex. I'm pretty sure what's happening is that the FV is wrong, and I can't figure out how to fix it. I can't make the FV get in between the bid and the ask, which results in the account getting emptied in any kind of trend.

When the FV is at the bid you will buy until there is nothing left in the account, when the FV is at the ask you will sell until there is nothing left in the account. I think we need to fix this before working on anything else.

@Camille92
Copy link
Contributor Author

Ok that's something to fix, it sounds like a rounding error, was it not fixed there? #971

In this particular case, you don't really need FV or to play with pings and pongs. Just need to set TBP to -1 or 1, with a pdiv of 0.
A width of 0.0001, best width check-on should do the trick.

The bot should only buy (or sell) a few minutes before the funding and sell (or buy back)everything just after.

@asfbhero
Copy link

asfbhero commented Aug 7, 2019 via email

@Camille92
Copy link
Contributor Author

I'm on holidays so I didn't try it myself, but this strategy can only work for ETH/USD and BTC/USD at BitMex. Is FV having a problem for those pairs?

@asfbhero
Copy link

asfbhero commented Aug 7, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants