关于合约量化系统开发详细流程丨浅谈量化合约系统开发说明分析

简介: 关于合约量化系统开发详细流程丨浅谈量化合约系统开发说明分析

  量化合约指的是目标或任务具体明确,可以清晰度量。根据不同情况,表现为数量多少,具体的统计数字,范围衡量,时间长度等等。所谓量化就是把经过抽样得到的瞬时值将其幅度离散,即用一组规定的电平,把瞬时抽样值用最接近的电平值来表示。经过抽样的图像,只是在空间上被离散成为像素(样本)的阵列。而每个样本灰度值还是一个由无穷多个取值的连续变化量,必须将其转化为有限个离散值,赋予不同码字才能真正成为数字图像。这种转化称为量化。

  合约量化,就是系统根据设置,自动进行买卖交易,上涨到一定点数则卖出平仓,下跌至相应点数则进行加仓操作,等待价格回调则卖出。不断的操作,达到自动化交易,让交易者不用时时刻刻紧盯市场,使用自动化交易,摈弃了用户的个人主观情绪,让交易变得更为“理智”。

  At present,the specific cash withdrawal of contract quantification is"quantitative system","quantitative software","quantitative robot,etc.",each of which is slightly different,but most of the core principle is the Martin multiple investment strategy,which comes from the spot market,but it is still reasonable to apply it to the contract.

  交易策略是一套规则,包括进出条件、资金管理和风险控制等。有简单的策略也有复杂的策略。简单策略通常使用技术指标和价格行为,而复杂策略使用高阶数学和统计模型。通常我们认为复杂模型更好,但实证分析和学术研究表明,复杂模型往往过度挖掘历史数据,无法适应剧烈的市场变化,相反,简单模型从长期来看更稳定。

  交易策略可以分为三个部分:指标、信号和规则。

  1.指标用于产生交易信号。指标的计算方法有很多,It can be economic data or valuation indicators(such as PE and EBITDA),technical indicators(such as MACD,RSI,MA)to develop or time series models(ARIMA,GARCH).Technical indicators are widely used in foreign exchange transactions.They are functions of price or trading volume,which are mainly used to detect the direction of the trend,measure the overbought and oversold state,and judge the reversal of the trend.

  2.价格和指数之间的相互作用形成了一个信号。Take the moving average crossing as an example.Buy when the 5-day moving average crosses the 10-day moving average,and sell when the 5-day moving average crosses the 10-day moving average.Signals are not limited to trading,but also include sieves,whose main function is to eliminate noise.In the moving average crossing,traders can add a trend screen:only when the price is higher than the 200 day moving average(upward trend)and the 5-day moving average crosses the 10 day moving average,if the price is lower than the 200 day moving average,the gold crossing is regarded as a false signal.Famous sieves include trend sieves,time sieves,turnover sieves and fluctuation sieves,which are important components of signals.

  3.规则是如何回应信号。它们是交易策略的核心。例如,When a buy signal is generated,traders need to decide when to go long,what orders to use,and how large positions to use.Novices tend to focus on market timing,while experienced experts will focus on risk control and fund management.The secret of long-term stable profits lies in the use of simple models and excellent fund management and risk control systems.

  量化交易的主要特点:

  买卖双方不再是由人们的主观判断决定的,改为由定量模型决定的。定量交易是一套科学的方法,它有严格的分析和计算,是由数据和模型决定的。即使是一种简单的低市盈率投资方法,只要能严格执行,也能获得巨额利润。

  using UnityEngine;

  public class GameObjectBrush:MonoBehaviou

  {

  [SerializeField]private float width=0.1f;

  [SerializeField]private Color color=Color.grey;

  private LineRenderer currentLR;

  private Vector2 previousPoint;

  private void Update()

  {

  if(Input.GetMouseButtonDown(0))

  {

  //线条渲染

  currentLR=new GameObject("LineRenderer").AddComponent<LineRenderer>();

  currentLR.material=new Material(Shader.Find("Sprites/Default")){color=color};

  currentLR.widthMultiplier=width;

  currentLR.useWorldSpace=false;

  currentLR.positionCount=1;

  currentLR.SetPosition(0,(Vector2)Camera.main.ScreenToWorldPoint(Input.mousePosition));

  //更新数据

  previousPoint=(Vector2)Camera.main.ScreenToWorldPoint(Input.mousePosition);

  }

  else if(Input.GetMouseButton(0))

  {

  if(previousPoint!=(Vector2)Camera.main.ScreenToWorldPoint(Input.mousePosition))

  {

  //线条渲染

  currentLR.positionCount++;

  currentLR.SetPosition(currentLR.positionCount-1,(Vector2)Camera.main.ScreenToWorldPoint(Input.mousePosition));

  //碰撞器

  BoxCollider2D collider=new GameObject("BoxCollider2D").AddComponent<BoxCollider2D>();

  collider.transform.parent=currentLR.transform;

  Vector2 latestPoint=(Vector2)Camera.main.代码开发+V:StPv888,ScreenToWorldPoint(Input.mousePosition);

  collider.transform.position=(previousPoint+latestPoint)*0.5f;

  float angle=Mathf.Atan2((latestPoint-previousPoint).y,(latestPoint-previousPoint).x)*Mathf.Rad2Deg;

  collider.transform.eulerAngles=new Vector3(0,0,angle);

  collider.size=new Vector2(Vector2.Distance(latestPoint,previousPoint),width);

  //更新数据

  previousPoint=(Vector2)Camera.main.ScreenToWorldPoint(Input.mousePosition);

  }

  }

  else if(Input.GetMouseButtonUp(0))

  {

  if(currentLR.transform.childCount>0)

  {

  currentLR.gameObject.AddComponent<Rigidbody2D>().useAutoMass=true;

  }

  }

  }

  }

相关文章
|
搜索推荐 安全 UED
浅谈AARRR模型
浅谈AARRR模型
|
机器学习/深度学习 人工智能 自然语言处理
揭秘Google Gemini:AI界的多模态革命者与ChatGPT-4的较量
揭秘Google Gemini:AI界的多模态革命者与ChatGPT-4的较量
1352 0
|
C语言 数据安全/隐私保护
【初阶C语言】学会使用库函数getchar和putchar
【初阶C语言】学会使用库函数getchar和putchar getchar函数 该函数的作用是接收一个字符,然后把该字符转化对应的ASCII值
2156 0
|
11月前
|
API
快递查询-物流查询-快递物流查询API接口
本API提供快递物流轨迹实时查询服务,支持顺丰、中通、京东等1000+家快递公司,数据与官网同步。
1571 0
|
存储 人工智能 搜索推荐
详解MySQL字符集和Collation
MySQL支持了很多Charset与Collation,并且允许用户在连接、Server、库、表、列、字面量多个层次上进行精细化配置,这有时会让用户眼花缭乱。本文对相关概念、语法、系统变量、影响范围都进行了详细介绍,并且列举了有可能让字符串发生字符集转换的情况,以及来自不同字符集的字符串进行比较等操作时遵循的规则。对于最常用的基于Unicode的字符集,本文介绍了Unicode标准与MySQL中各个字符集的关系,尤其详细介绍了当前版本(8.0.34)默认字符集utf8mb4。
3487 82
|
机器学习/深度学习 边缘计算 文字识别
基于YOLOv8的汽车车牌位置实时检测项目【完整源码数据集+PyQt5界面+完整训练流程+开箱即用!】
本项目基于YOLOv8与PyQt5,打造开箱即用的汽车车牌位置实时检测系统。包含完整源码、2万张带标注数据集、预训练权重及详细教程,支持图片、视频、摄像头等多种输入方式。通过直观GUI实现一键检测,适合快速部署与二次开发。未来可扩展OCR模块、多目标识别等功能,助力智能交通管理。附带训练代码与流程文档,助你轻松上手深度学习车牌检测任务。
基于YOLOv8的汽车车牌位置实时检测项目【完整源码数据集+PyQt5界面+完整训练流程+开箱即用!】
|
人工智能 自然语言处理 安全
Claude怎么使用?claude中文官网才是最佳选择!
Claude AI 是由 Anthropic 公司潜心研发的划时代 AI 助手,致力于打造更安全、更友好、更可靠的 AI 系统,引领智能交互进入全新时代。
|
缓存 Unix 应用服务中间件
Nginx,最强单体之一
Nginx是一款高性能的HTTP Web服务器、反向代理、内容缓存及负载均衡器,由伊戈尔·赛索耶夫开发并开源。它采用多进程和I/O多路复用技术,支持高并发和高效处理请求,广泛应用于各大互联网公司。Nginx不仅具备基本的HTTP服务功能,如静态文件处理、反向代理和负载均衡,还支持高级特性如SSL、HTTP/2、动静分离等。其架构设计使其在性能、可靠性、扩展性等方面表现出色,成为Web技术学习和应用的首选工具之一。本文将分两部分介绍Nginx的架构及其原生常用功能。
1346 25
Nginx,最强单体之一
|
人工智能 安全 机器人
快手封号人工解封?是真吗
一、平台封禁机制的技术原理 快手采用"AI识别+人工复核"的双层审核体系:
|
存储 安全 API
亚马逊SP-API入门:海外电商接口调用与国内平台的差异化
亚马逊 SP-API 与国内电商 API 在技术架构、安全机制及开发流程上差异显著。本文对比京东、淘宝等平台,分析接口设计、地域适配、权限管理等核心差异,并结合实战经验提供开发建议,助力开发者高效接入 SP-API,实现全球电商业务拓展。