Loading ...

Perpetual Contract Multi-symbol Grid Strategy

Author: 张超, Date: 2022-06-27 09:57:00
Tags:

FMZ quantitative trading platform use teaching

https://www.youtube.com/watch?v=hlkvrRqEHTE

Perpetual Contract Multi-symbol Grid Strategy Video Guide:

https://www.youtube.com/watch?v=lw56O8aRpuw&t=314s

The grid strategy introduction:

Trading on futures stable coin based perpetual contracts, you can go short without holding any spot value, and all trading and profit are count with stable coin. Therefore, compared with the spot grid strategy, the perpetual contract grid strategy is more convenient and simple, and of course it also increases the risk of liquidation.

The strategy needs to set two main parameters: grid trade value, grid pct. If the grid pct is set to 0.01 and the trading value is set to 500, then the strategy will short 500 USDT for very 1% increase in the price of the trading symbol, and the same will be done if the price falls. The grid strategy rely on volatility to make profits. If the price back to the initial price in the future, all grid profits will be realized. If there is an obvious independent market, such as a 100% increase in one day, the grid will produce obvious floating losses, and if the trading value is too large, there is a risk of liquidation. In addition, trading pairs need to be active to trade frequently and increase profits.

Risk:

  1. The risk of liquidation in a big drop. the position amount will continue to increase and it is likely to be liquidated. However, if the leverage is lower than 1, the risk of liquidation will be controllable, and there is no risk of liquidation in the balance strategy w**hen the price go up.
  2. API error, if the return of API access is delayed or the data is wrong, it will cause a strategy exception.
  3. Funding fee loss, there is little risk in this respect. Generally, the fee will be positive when the price go up. If the funding fee is too high, you can close the position in advance.

More

afanxingzhou 平仓问题:运行时平某个币种,提示已平,策略停止,但实际交易所上交易对没有平。

afanxingzhou 调整收益问题:我向交易账户划转500u,填写-500,结果持仓收益加了500,为了保证数据准确,就给划回去了,期间改参数都重启过。看文档,提现100填写100,划进来不就是充值,感觉我填的没问题。

肥仔 如果可以动态调整,吃单间隔,比如插针行情时,币价>Boll 上轨时,可以将买单间隔加大,这样在急速上涨或下跌时,不仅可以吃到对应的收益,同时减少了,急速回落时的落差问题,当然这样在最后总体收益时会有一定的差异,但按这种方式,也会降低回落带来的风险

maobear 1.求开针对组合内单币种及总账户的止损止盈选项。 2. 多币种涉及到需要手动调整币种,当前的默认设定是只要不用策略平仓,策略会一直记住某个币的第一次启动价格。若某个币手动删除后重新加进去,成本价依然是第一次启动时,导致策略出现连续单边买入卖出多笔。应该改为每次加入任何新币种,都按当下最新设置的初始价格重置成本价,不要用回上一次的数据。

qyf666 现在的网格,买入委托和卖出委托只挂有一个单,出现快速波动或插针的行情,且网格间距比较近的时候,部分波动会吃不到,这样会浪费波动率,建议增加委托订单数,最好可以后台设置

maobear 这种没有初始仓位的中性网格策略,最大的风险其实是短时间内连续暴涨或者暴跌,导致不断累积多头或空头的仓位。 那降低这种风险的做法之一,就是控制网格运行的时间,使策略无法在一个方向上累积过多的仓位。 有如下两个建议: 比如可以设定时间自动定期按币种现价重启一次,每12/24小时就自动平仓重启,这样策略累积的仓位就不会大。 允许根据某些简单的条件排序所有合约币种,定期自动换币,比如按12小时跌幅、12小时成交额之类的,自动更新币种并重启网格,这样也能起到控制策略仓位累积的效果。 有办法能够在这个版本的策略上实现上面两个路径不?

maobear 加了作者微信,求通过下

张超 我测试一下

afanxingzhou 不过也算不上啥大问题,反正平仓策略会停,自己手动去app上停了也来得及

afanxingzhou okx,我购买了遇到了

张超 哪个交易所

张超 修复过了

张超 循环可以开到0.1秒,避免这种情况出现,这种行情很少出现

稻草人 这种模式盈利效果不如网格,测试过

maobear 是网格啊,只是现在的网格策略需要你手动选择要网格的币种。 我这个建议是希望策略能够根据一些简单的条件,自动选择要做的币种以及自动按既定条件平仓重启网格策略,运行依然是网格。

张超 你这不是网格了呀