5 bands 80 times the power of high-frequency tactics

Author: The grass, Created: 2020-11-04 15:18:03, Updated: 2023-09-26 20:52:21

img

In the last two months, a print money account has been very hot, gaining hundreds of times more in the Bitcoin futures, and you can often see his account earnings screenshots in various groups. The basically irreversible earnings curve has caused many to tear up and some to doubt its authenticity. But my experience of the 23-27 October 5 days has proven that high-frequency strategies in high-volatility markets are perfectly capable of earning such a distortion of returns.

My experience:

It took about two days to write the strategy, and after one day of adjustment, the 23rd is officially in operation in the binan perpetual contract. Starting from a top-up of 100 USDT, the 27th jumped to 8800 USDT, the yield is more than 80 times, during which there is almost no retraction. The total yield reached the 15th place in the binan historical earnings ranking.img img

A little experience:

Not all markets and times are suitable for high-frequency strategies, and the conditions for running high-frequency robots are demanding.

1.适合高频的市场

These five days were only in the FIL perpetual contract, the FIL just launched the market is very chaotic, the perpetual price and the difference in the spot at one time more than 30%, causing a gap in the FIL disagreement is very serious, the 16th opening price fell from 60 all the way to 26 began to rebound, and again fell 19 rebound to 37.

Similar opportunities existed in the early days of SUSHI/YFI/YFII/UNI, when both volatility and trading volume were high, and print ((money) also seized these opportunities. FILs reappeared when these coins could not continue to make money.

img

2.交易费率

High frequency strategies are very sensitive to handling fees, and the threshold of 2 parts per 100,000 is not high. Although the return is small, it can be understood as a free handling fee, a group of high frequency strategies can be resurrected in the age of the old cashless handling fee.

3.频率高

The most famous feature of the high frequency robot is the extremely high frequency, and when the market changes quickly, many of my strategies are completed in 100ms.

4.策略的胜率

High-frequency strategies require accurate judgments of short-term trends in the market, and the higher the win rate, the larger the volume of orders, and the larger the short-term volume of orders. FILs are highly accurate in predicting trends in a matter of seconds because of the large volume of trades and the frequency of trades. Likewise, high-frequency trading is intense, giving the maker the opportunity to establish a corresponding position and position. This is different from the earlier spot high-frequency, now the maker has a commission, but the taker still has a high transaction fee, so only the order can be listed.

When things are going well, my strategy has a win-win ratio of over 80% and a profit-loss ratio of over 1, when there is no obvious market trend, and a long-term win-win ratio of over 65% and a profit-loss ratio of less than 1.

5.高频策略的容量

The capacity of the high-frequency strategy is obviously not high, because of the sustained high leverage, 100u can also operate with funds above 2000u, so the high-frequency strategy can start with very small funds. But the overall net profit will not be too large. The specific capacity depends on the volume of transactions in the market.

6.策略的风险

There are risks with open positions, but the advantage of high frequency is that the number of trades is very high, one loss can also be quickly re-traded 10 times to make up for the loss, the longer the cycle is small. The greater the risk of holding, the greater the risk, so there can be no unlimited increase in holding, if there is a certain negative feedback mechanism, more positions will increase the flat position to reduce the opening position, guaranteeing a short holding time.

I'm not sure about my strategy.

The strategy is:

Get the most recent trades, depth and current positions, according to trades to judge the trend, according to the volume of trades to decide the size of the opening position, to judge the trend for the upward hanging more open, while flat, if at this time holding a blank position will be all flat. Judging the downward trend operation is the same.

The idea of the high-frequency strategy is very consistent, and my strategy draws on the ideas of the high-frequency strategy I previously published in 2014 and the OKCoin Spinach Reaper strategy. Both strategies can be found on FMZ.

The strategy structure:

The strategy uses an asynchronous architecture (refer to FMZ Community Progress Tutorials).There's no source code here, just a simple description of the function, not the full executable code, and it doesn't involve the core logic.The API uses the REST protocol and does not use a websocket. The server is in Tokyo, which allows for lower latency.

//设置交易对与杠杆
var pair = Symbol+'USDT'
exchange.SetCurrency(Symbol+'_USDT')
exchange.SetContractType("swap")
exchange.IO("api", "POST", "/fapi/v1/leverage", "symbol="+pair+"&leverage="+5+"&timestamp="+Date.now())

//基本的交易精度限制
var price_precision = null
var tick_size = null
var amount_precision = null 
var min_qty = null

var exchange_info = JSON.parse(HttpQuery('https://fapi.binance.com/fapi/v1/exchangeInfo'))
for (var i=0; i<exchange_info.symbols.length; i++){
   if(exchange_info.symbols[i].baseAsset == Symbol){
       tick_size = parseFloat(exchange_info.symbols[i].filters[0].tickSize)
       price_precision = exchange_info.symbols[i].filters[0].tickSize.length > 2 ? exchange_info.symbols[i].filters[0].tickSize.length-2 : 0
       amount_precision = exchange_info.symbols[i].filters[1].stepSize.length > 2 ? exchange_info.symbols[i].filters[1].stepSize.length-2 : 0
       min_qty = parseFloat(exchange_info.symbols[i].filters[1].minQty)
   }
}

function updatePosition(){//获取持仓,Symbol为交易对,加入交易对参数而不是返回全币种可以减少一次API占用
    position = exchange.IO("api", "GET","/fapi/v2/positionRisk","timestamp="+Date.now()+"&symbol="+Symbol+"USDT")
}
function updateTrades(){//获取最近成交
    trades = exchange.IO("api", "GET","/fapi/v1/trades","limit=200&timestamp="+Date.now()+"&symbol="+Symbol+"USDT")
}
function updateDepth(){//获取深度
    depth = exchange.IO("IO", "api", "GET","/fapi/v1/depth","timestamp="+Date.now()+"&symbol="+Symbol+"USDT")
}

function onTick(){
    updateDepth() 
    updateTrades() 
    updatePosition() 
    makeOrder() //计算下单价格、数量并下单
    updateStatus() //更新状态信息
}

//主循环,休眠时间100ms,策略的循环延时通常在在30ms以内。
function main() {
    while(true){
        if(Date.now() - update_loop_time > 100){
            onTick()
            update_loop_time = Date.now()
        }
        Sleep(1)
    }
}

This strategy is too demanding for the market, not profitable most of the time, and not very powerful. If you actively share this article on platforms such as Weibo and WeChat, and it reaches more than 100,000 readers, I will consider renting it to give you a real feel, and even publish the source code of the strategy in the future.


Related

More

xukittyPlease ask Grasshopper, what is the difference between the default routing of the easy high frequency robot in 2014 is 3500ms, and the default routing of the previously tested binary perpetual contract high frequency strategy is only 100ms?

HermitGrass God, why wasn't the Luna on the last few days?

HermitGrass God, why wasn't the Luna on the last few days?

The bone knifeA year later, when I look back, I see that the depth of understanding is different.

jun3761Highly skilled

jun3761Highly skilled

The steel bonesPraying for the Grass God to share the code

zdg4484Have you tested OKex?

17707250703Keep a record

hart0345Keep a record

hart0345Keep a record

zltimThat's great.

lianghua01Is the trend threshold set to 0 and automatically adjusted?

huqiangllIs it possible to rent?

scorpio2811Grasshopper, I'm down on bills, can this strategy work?

The slowly growing meHow to judge the volatility of a coin is suitable for this high-frequency strategy? I wrote a version myself. After running it is all maintenance fees. It is too cheap too fast, mainly if you wait for a while ((3-5s) to lose money, is there any advice from Grass God?

ssderIs that the thread of the cabbage harvesters judging the bulls and bears and then deciding to be a marketer just hanging out doing doping or doing nothing and clearing up the previous opposite position?

The King of Hip HopTry running it down, and optimize the code logic down, or the success rate is too low, don't know where the problem is.

xukittyThe God of Grass

KindomTeamGrasshopper, the article says that the bigger the hedge, the greater the risk, so you can't increase your holdings unlimitedly, you have to have a certain negative feedback mechanism. But the bottom line is, is it cheap in an instant, how can there be holdings?

ovelsThe tendency to judge the upside is to hang more than one hand, and at the same time flat multiple heads, if you hold the empty position at this time, then all of them will be flat.

lyfxxGrasshopper, do you need to set up a stop loss for the high frequency strategy?

CousinsReadership: 100,000... At current rates, it is estimated to be next year /upload/asset/3a943d036b2b085ed589.jpg

The bone knifeRental policy vx:l-21cm

The bride too.The threshold of 2 parts per 100,000 is not high. Is this a mistake?

a980483067Please contact me at q980483067

The bone knifeGa FMZ homepage WeChat -- please where is Ga?

The bone knifeLearning and Viewing

weixxWorshiping the Herb

hiquanterGod of the grass!

The bully plusWorship

Currency managementWe are fighting!

ClearlyWorshipping the grass!

The Air Force will never be a slave.The grass god is a bully!

jingfengzThe God of Weeds

lijingxfdjWhat about the negative fees mentioned by Grasshopper?

gillbates2I also don't know what to do. I'm 10 times better off than losing once.

The slowly growing meHa-ha, grass god. I absorbed a wave and the prediction came up. That's a lot less loss for you, for example, you bet 30 times, but it's better than losing once. Because, the market is always going to catch you once, how do you do your position?

bengbanBeyond the perception of management, you lower the rate of return, and then leave it to the knowledge of the fmz users.

Sadhu is down there.Is it possible to have a zero fee?

The grassIn addition, you must have a negative billing account.

The grassIt's a very active time of the year, and it's the best time for high-frequency trading.

The grassThe winning rate depends on the market, the trend is obviously high.

The grassI wrote my own judgement about the bulls and bears, there should be many ways.

The grassYes, try to hold as little as possible, after all, the big positions result in a lot of losses if you go in the wrong direction

resoryFind me a maid who can return the favor ~ WeChat plus me: Resory

resoryFind me and I'll go back to the maid.

The grassI don't feel the need.

The grassI've been told that the site was deleted, the complaint was not helpful, and the management thought it was too crazy.

CousinsGood. Yeah, you know, I wrote you a compliment, both sides adding 100,000 readers is fine.

The grassYou can also share it in a group, and if you want to share it in a group, you can share it in a group.

The bride too.I'm not good enough!

makebitI'm also curious, Binance USDT perpetual maker doesn't return the level of fees?

The grassBin An is a market trader

The bone knifeThank you.

The grass /upload/asset/1952059442bc9fdef6b.png