0
点赞
收藏
分享

微信扫一扫

量化合约系统开发(成品说明),合约量化系统开发(源码分析)

Contractual transaction refers to the transaction between the buyer and the seller in an agreement that a certain amount of certain assets will be received at a specified price at a certain time in the future. The trading object of contract trading is the standardized contract uniformly formulated by the Exchange, which stipulates the standardized information such as the type of commodity, trading time and quantity. The contract represents the rights and obligations of both parties.

简单点说就是现在约好未来某个时间地点交易一定数量的某种商品。合约交易是一种金融衍生品,相对于现货市场的交易,用户可以在期货合约交易中通过判断涨跌,选择买入做多或卖出做空合约,来获得价格上涨或者下跌带来的收益。量化交易程序代码如下:

  import pandas as pd

  from aip import AipOcr

  import pyautogui

  import pywinauto

  import time

  import ddddocr

  import PIL

  import akshare as ak

  from PIL import Image,ImageDraw

  import pyttsx3

  from finta import TA

  import quantstats as qs

  import yagmail

  import requests

  from bs4 import BeautifulSoup

  from lxml import etree

  import schedule

  import matplotlib.pyplot as plt

  import mplfinance as mpf

  app_id='252342421225'

  api_key='grc71324214ewewlsl8zXo'

  secret_key='ny8ClwdaLIDNaondoAINDOLH5jP9s6RbyG3'




  #登录​​同花顺​​期货通

  def featurns_log():

  '''

  登录​​同花顺​​期货通,手动启动程序可以不用调用这个函数

  识别验证码自动登录

  '''

  import time

  pywinauto.application.Application(backend='uia').start(r'E:​​同花顺​​期货通binhapp.exe')

  pyttsx3.speak('运用启动成功')

  #等待程序

  time.sleep(1)

  #最大化窗口

  pyautogui.click(x=1379,y=18)

  time.sleep(1)

  #点击交易

  pyautogui.click(x=941,y=17)

  #选择模拟交易

  pyautogui.click(x=1065,y=53)

  time.sleep(1)

  pyautogui.click(x=1155,y=85)

  #等待程序响应

  time.sleep(3)

  #验证码区域截图

  pyautogui.screenshot(imageFilename=r'C:UsersAdministratorDesktop期货交易验证码.png',region=(1042,611,1099-1042,641-611))

  #识别验证码

  time.sleep(1)

  ocr=ddddocr.DdddOcr()

  with open(r'C:UsersAdministratorDesktop期货交易验证码.png','rb')as f:

举报

相关推荐

0 条评论