查看: 43416|回復: 0
打印 上一主題 下一主題

區塊鏈合約量化系統開(kāi)發(fā)技術(shù)方案丨量化合約系統開(kāi)發(fā)技術(shù)原理

[復制鏈接]
跳轉到指定樓層
樓主
發(fā)表于 2022-11-18 10:48:43 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
  Features of Quantitative Trading Robot:
  1.The most obvious feature of quantitative trading is to reduce the impact of investor sentiment fluctuations and avoid making irrational investment decisions in the case of extreme market fanaticism or pessimism,while quantitative trading robots avoid subjective assumptions and use programs to turn their ideas into quantifiable strategies,using only computing strategies and trading strategies through computers;
  2.History back test,realized by computer program,can verify the rationality of trading strategy by quantifying trading ideas;
  3.It can ensure the execution of transactions/profits,especially the quantitative analysis of medium and low frequency,without the need to mark the market
  區塊鏈是一個(gè)去中心化計算協(xié)議,本文由V_StPv888整理發(fā)布,約定了不同的利益主體如何分散的創(chuàng )建和維護一個(gè)分布式的計算基礎設施,從而實(shí)現“基礎設施管理權”與“用戶(hù)數據控制權”之間的分離,防止單一平臺通過(guò)計算基礎設施管理權力,實(shí)現對用戶(hù)數據、用戶(hù)資產(chǎn)和用戶(hù)身份的控制。區塊鏈還是一個(gè)透明可信的權利確認與追溯系統,一份權利一旦數字化為區塊鏈上的通證,可以得到可靠的確權,并且可全程追蹤其流轉、交易、轉換、變形的全過(guò)程。區塊鏈是協(xié)議創(chuàng )造和自動(dòng)執行平臺。智能合約是這一能力的集中體現。通過(guò)智能合約,權利與價(jià)值的分配協(xié)議可以無(wú)需借助可信第三方,即得到高效、準確、可信的執行,并且全過(guò)程可審計。
  進(jìn)行“買(mǎi)入平空”操作,撮合成功后將減少空頭倉位。
  import quandl
  import pandas as pd
  import numpy as np
  import matplotlib.pyplot as plt
  quandl.ApiConfig.api_key='INSERT YOUR API KEY HERE'
  selected=['CNP','F','WMT','GE','TSLA']
  data=quandl.get_table('WIKI/PRICES',ticker=selected,
  qopts={'columns':['date','ticker','adj_close']},
  date={'gte':'2011-1-1','lte':'2021-07-31'},paginate=True)
  clean=data.set_index('date')
  table=clean.pivot(columns='ticker')
  returns_daily=table.pct_change()
  returns_annual=returns_daily.mean()*250
  cov_daily=returns_daily.cov()
  cov_annual=cov_daily*250
  port_returns=[]
  port_volatility=[]
  sharpe_ratio=[]
  stock_weights=[]
  num_assets=len(selected)
  num_portfolios=90000
  np.random.seed(101)
  for single_portfolio in range(num_portfolios):
  weights=np.random.random(num_assets)
  weights/=np.sum(weights)
  returns=np.dot(weights,returns_annual)
  volatility=np.sqrt(np.dot(weights.T,np.dot(cov_annual,weights)))
  sharpe=returns/volatility
  sharpe_ratio.append(sharpe)
  port_returns.append(returns)
  port_volatility.append(volatility)
  stock_weights.append(weights)
  合約量化的因素有那些呢?
  應該具備如下要素:
  1,大數據
  2,算法模型
  3,入場(chǎng)擇時(shí)
  4,倉位管理
  5,風(fēng)險控制
  6,檢驗策略,策略的歷史數據回測等數據進(jìn)行檢驗
  合約量化策略類(lèi)型及玩法詳細講解
  交易類(lèi)型分為兩類(lèi),開(kāi)倉和平倉。開(kāi)倉和平倉,又分買(mǎi)入和賣(mài)出兩個(gè)方向:
  買(mǎi)入開(kāi)多(看漲)是指當用戶(hù)對指數看多、看漲時(shí),新買(mǎi)入一定數量的某種合約。進(jìn)行“買(mǎi)入開(kāi)多”操作,撮合成功后將增加多頭倉位。
  賣(mài)出平多(多單平倉)是指用戶(hù)對未來(lái)指數行情不再看漲而補回的賣(mài)出合約,與當前持有的買(mǎi)入合約對沖抵消退出市場(chǎng)。進(jìn)行“賣(mài)出平多”操作,撮合成功后將減少多頭倉位。
  賣(mài)出開(kāi)空(看跌)是指當用戶(hù)對指數看空、看跌時(shí),新賣(mài)出一定數量的某種合約。進(jìn)行“賣(mài)出開(kāi)空”操作,撮合成功后將增加空頭倉位。
  買(mǎi)入平空(空單平倉)是指用戶(hù)對未來(lái)指數行情不再看跌而補回的買(mǎi)入合約,與當前持有的賣(mài)出合約對沖抵消退出市場(chǎng)。

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

關(guān)于我們  -  服務(wù)條款  -  使用指南  -  站點(diǎn)地圖  -  友情鏈接  -  聯(lián)系我們
電子工程網(wǎng) © 版權所有   京ICP備16069177號 | 京公網(wǎng)安備11010502021702
快速回復 返回頂部 返回列表
午夜高清国产拍精品福利|亚洲色精品88色婷婷七月丁香|91久久精品无码一区|99久久国语露脸精品|动漫卡通亚洲综合专区48页