技术图文:数字资产量化中的三角套利策略

资讯 2024-07-13 阅读:19 评论:0
美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

我们在前面的图文中介绍了一种跨市场的套利策略:

A arbitrage strategy of cross-market arbitrage is described in the previous graphs #xff1a;

该策略俗称搬砖,只要两个交易所对于同一种数字资产出现价差,就可以进行套利。

The strategy is commonly known as brick removal & #xff0c; arbitrage is possible as long as there is a price difference between two exchanges for the same digital asset & #xff0c.

三角套利就是利用三种数字资产之间的价格差来获利

Triangular arbitrage takes advantage of the price differential between the three digital assets .

三角套利的过程就是规划三角路径的过程,三角路径无外乎两种:

Triangular arbitrage is the process of planning the triangular path xff0c; the triangular path is no more than two xff1a;

  • 第一种:买入 -> 卖出 -> 卖出
  • 第二种:卖出 -> 买入 -> 买入

比如 BigOne 交易所有 ONE-USDT、ONE-EOS、EOS-USDT 交易对。

For example, Bigone deals all OE-USDT, OE-EOS, EOS-USDT transactions.

如果你手中拥有 USDT,可以通过第一种路径进行套利。即用 A 数量的 USDT 买入 ONE,然后把买入的 ONE 换成 EOS,最后卖出EOS 换回 USDT。在刨除手续费之后,如果最后换回的 USDT 数量超过 A,我们就可以依赖这个路径进行套利。

If you have USDT, in your hand; you can arbitrage through the first path. That is, buy ONE& #xff0c in the number of USDTs; then replace the purchased ONE with EOS, and finally sell the EOS back to USDT. After the fee is cut xff0c; if the last number of USDTs is more than Aff0c; we can rely on this path for arbitrage.

如果你手中拥有 ONE,可以通过第二种路径进行套利。即卖出 A 数量的 ONE 得到 USDT,然后用该 USDT 买入 EOS,最后用这些 EOS 换回 ONE。 在刨除手续费之后,如果最后换回的 ONE 数量超过 A,我们就可以依赖这个路径进行套利。

If you have ONE& #xff0c in your hand; arbitrage can be done through the second path. That is, if the number of ONEs sold is a quantity of ONEs gets USDT, then buys EOS, with the USDT; then trades these EOs back with ONEs. xff0c after the fee is cut; if the number of ONEs finally switched is more than A#xff0c; we can rely on this path for arbitrage.

详细的流程图如下:

Detailed flowcharts xff1a below;

流程图

flowchart


以先买入后卖出的方式构造三角套利的路径

Constructs the triangular arbitrage path & #xff1a by buying it and selling it;

价格表

price table

假设:USDT 起始数量为 A,交易手续费为:0.1%

Assumptions xff1a; USDT starting at Axff0c; transaction fees at xff1a; 0.1%

Step1:USDT -> ONE

以Q1的价格买入ONE。

Buy it for Q1.

  • OneAmount = A ÷ Q1
  • RealOneAmount = OneAmount × 0.999

Step2:ONE -> EOS

以 Q2 的价格卖出 ONE 得到 EOS

Sell ONE for Q2 to get EOS

  • EOSAmount = RealOneAmount × Q2
  • RealEOSAmount = EosAmount × 0.999

Step3:EOS -> USDT

以 Q3 的价格卖出 EOS 得到 USDT

Sell EOS for USDT at Q3

  • UsdtAmount = RealEOSAmount × Q3
  • RealUsdtAmount = UsdtAmount × 0.999

如果想获得盈利,则需要 即可。

If you want to get a profit #xff0c; need it.

经过简单的推导,我们可以发现该三角套利路径的盈利条件是:

After simple deduction xff0c; we can find a profit condition for the triangle arbitrage path xff1a;

(Q2 × Q3 × 0.999^3) ÷ Q1 > 1.0

以先卖出后买入的方式构造三角套利的路径

Constructs a tripod of triangular arbitrage & #xff1a by selling it first and buying it;

价格表

price table

假设:ONE 起始数量为 A,交易手续费为:0.1%

Assumption xff1a; ONE starting at Axff0c; transaction fees at xff1a; 0.1%

Step1:ONE -> USDT

以 P1 的价格卖出 ONE。

Sell ONE at P1 prices.

  • UsdtAmount = A × P1
  • RealUsdtAmount = UsdtAmount × 0.999

Step2:USDT -> EOS

以 P2 的价格买入 EOS。

Buy EOS at P2 prices.

  • EosAmount = RealUsdtAmount ÷ P2
  • RealEosAmount = EosAmount × 0.999

Step3:EOS -> ONE

以 P3 的价格买入 ONE

Buy ONE for P3

  • OneAmount = RealEosAmount ÷ P3
  • RealOneAmount = OneAmount × 0.999

如果想获得盈利,则需要 即可。

If you want to get a profit #xff0c; need it.

经过简单的推导,我们可以发现该三角套利路径的盈利条件是:

After simple deduction xff0c; we can find a profit condition for the triangle arbitrage path xff1a;

(P1 × 0.999^3) ÷ (P2 × P3) > 1.0


检验是否具有套利机会

Test for arbitrage

 

运行先买入后卖出的套利模型

runs a arbitrage model sold after buying it

 

检验是否具有获利机会

Test for profit

 

运行先卖出后买入的套利模型

runs a arbitrage model that sells first and buys later

 

到此为止,有关于三角套利的模型以及具体实现就介绍完了。

So far xff0c; models on triangulation and actual realization are available.

运行窗口

run window

由于市场中做市商的存在,这样的套利机会虽然很多,但转瞬即逝。通过手工挂单的方式已经很难满足速度要求了。如果要用该种方式套利,需要写程序让计算机来执行。我上面的代码大家可以作为参考啊。今天就到这里吧!See You!

Because of the presence of market agents xff0c; such arbitrage opportunities are many xff0c; but they are instantaneous. It is difficult to meet speed requirements by way of a manual billing. If you want to apply xff0c; you need to write a program to be carried out by a computer. The code above me can be used as a reference. Let's go here today xff01; See You xff01;


相关图文

(a) with relevant graphs and #xff1a;

美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址
文字格式和图片示例

注册有任何问题请添加 微信:MVIP619 拉你进入群

弹窗与图片大小一致 文章转载注明

分享:

扫一扫在手机阅读、分享本文

发表评论
平台列表
美化布局示例

欧易(OKX)

  全球官网 大陆官网

币安(Binance)

  官网

火币(HTX)

  官网

Gate.io

  官网

Bitget

  官网

deepcoin

  官网
热门文章
  • 0.00003374个比特币等于多少人民币/美金

    0.00003374个比特币等于多少人民币/美金
    0.00003374比特币等于多少人民币?根据比特币对人民币的最新汇率,0.00003374比特币等于2.2826 1222美元/16.5261124728人民币。比特币(BTC)美元(USDT)人民币(CNY)0.00003374克洛克-0/22216.5261124728比特币对人民币的最新汇率为:489807.72 CNY(1比特币=489807.72人民币)(1美元=7.24人民币)(0.00003374USDT=0.0002442776 CNY)。汇率更新于2024...
  • 0.00006694个比特币等于多少人民币/美金

    0.00006694个比特币等于多少人民币/美金
    0.00006694比特币等于多少人民币?根据比特币对人民币的最新汇率,0.00006694比特币等于4.53424784美元/32.5436 16人民币。比特币(BTC)美元(USDT)人民币(CNY)0.000066944.53424784【比特币密码】32.82795436 16比特币对人民币的最新汇率为:490408.64 CNY(1比特币=490408.64人民币)(1美元=7.24人民币)(0.00006694USDT=0.0004846456 CNY)汇率更新时...
  • 0.00015693个比特币等于多少人民币/美金

    0.00015693个比特币等于多少人民币/美金
    0.000 15693比特币等于多少人民币?根据比特币对人民币的最新汇率,0.000 15693比特币等于10.6 1678529美元/76.86554996人民币。比特币(BTC)【比特币价格翻倍】美元(USDT)人民币(CNY)0.000/克洛克-0/5693【数字货币矿机】10.6 167852976.8655254996比特币对人民币的最新汇率为:489,807.72 CNY(1比特币= 489,807.72人民币)(1美元=7.24人民币)(0.00015693 U...
  • 币圈院士:5.20比特币(BTC)以太坊(ETH)行情分析

    币圈院士:5.20比特币(BTC)以太坊(ETH)行情分析
    利空出尽?华尔街多头坚信美股将摆脱泥潭 经济衰退风险被夸大A lot of people on Wall Street believe that beauty will escape the quagmire; the risk of recession is exaggerated. 从目前美国经济的情况加上美股先有的走势来判断,确信通胀已经或即将见顶,这为价格压力回落铺平了道路,这最终将使美联储得以放缓...
  • 2000年美国GDP占世界的304%,中国GDP仅占35%,现在呢?

    2000年美国GDP占世界的304%,中国GDP仅占35%,现在呢?
    GDP作为全球公认的实力基准,就像是一个大国实力的代言人,它是布雷顿森林体系下全球团结的声音。它不仅仅是数字的累积,更是大国综合实力的人格化,默默诉说着每个国家的辉煌与荣耀。虽然GDP不是衡量一个国家综合实力的唯一标准,但无疑是最关键的指标之一。作为一面镜子,它反映了国家的经济实力和发展水平,是国家综合实力的重要体现,不容忽视。2000年,中国GDP迈过/克洛克-0/万亿美元的重要门槛,达到/克洛克-0/。2/克洛克-0/万亿美元(折合人民币7。7万亿元)。然而,在全球经济的...
标签列表