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 區(qū)塊鏈?zhǔn)且粋去中心化計算協(xié)議,本文由V_StPv888整理發(fā)布,約定了不同的利益主體如何分散的創(chuàng)建和維護一個分布式的計算基礎(chǔ)設(shè)施,從而實現(xiàn)“基礎(chǔ)設(shè)施管理權(quán)”與“用戶數(shù)據(jù)控制權(quán)”之間的分離,防止單一平臺通過計算基礎(chǔ)設(shè)施管理權(quán)力,實現(xiàn)對用戶數(shù)據(jù)、用戶資產(chǎn)和用戶身份的控制。區(qū)塊鏈還是一個透明可信的權(quán)利確認(rèn)與追溯系統(tǒng),一份權(quán)利一旦數(shù)字化為區(qū)塊鏈上的通證,可以得到可靠的確權(quán),并且可全程追蹤其流轉(zhuǎn)、交易、轉(zhuǎn)換、變形的全過程。區(qū)塊鏈?zhǔn)菂f(xié)議創(chuàng)造和自動執(zhí)行平臺。智能合約是這一能力的集中體現(xiàn)。通過智能合約,權(quán)利與價值的分配協(xié)議可以無需借助可信第三方,即得到高效、準(zhǔn)確、可信的執(zhí)行,并且全過程可審計。 進行“買入平空”操作,撮合成功后將減少空頭倉位。 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) 合約量化的因素有那些呢? 應(yīng)該具備如下要素: 1,大數(shù)據(jù) 2,算法模型 3,入場擇時 4,倉位管理 5,風(fēng)險控制 6,檢驗策略,策略的歷史數(shù)據(jù)回測等數(shù)據(jù)進行檢驗 合約量化策略類型及玩法詳細(xì)講解 交易類型分為兩類,開倉和平倉。開倉和平倉,又分買入和賣出兩個方向: 買入開多(看漲)是指當(dāng)用戶對指數(shù)看多、看漲時,新買入一定數(shù)量的某種合約。進行“買入開多”操作,撮合成功后將增加多頭倉位。 賣出平多(多單平倉)是指用戶對未來指數(shù)行情不再看漲而補回的賣出合約,與當(dāng)前持有的買入合約對沖抵消退出市場。進行“賣出平多”操作,撮合成功后將減少多頭倉位。 賣出開空(看跌)是指當(dāng)用戶對指數(shù)看空、看跌時,新賣出一定數(shù)量的某種合約。進行“賣出開空”操作,撮合成功后將增加空頭倉位。 買入平空(空單平倉)是指用戶對未來指數(shù)行情不再看跌而補回的買入合約,與當(dāng)前持有的賣出合約對沖抵消退出市場。
|