量化合約系統(tǒng)開發(fā)(策略及分析)丨量化合約系統(tǒng)開發(fā)(功能詳細)
量化交易是一種市場策略,它依靠數(shù)學(xué)和統(tǒng)計模型來識別并執(zhí)行機會。這些模型由定量分析驅(qū)動,這就是該策略的名稱。它通常也被稱為“定量交易”,有時也稱為“定價”。 量化分析研究和測量將行為的復(fù)雜模式分解為數(shù)值。它忽略了定性分析,該定性分析基于諸如管理專業(yè)知識或品牌實力之類的主觀因素來評估機會。 量化交易系統(tǒng)軟件的優(yōu)勢 1、指定的交易策略,持倉派:智能機器人內(nèi)嵌有多種的設(shè)置的交易策略,從保守到激進的形式,由于每一種的交易方式風(fēng)險不同,設(shè)置好相關(guān)的策略后軟件就會智能化的每次進單持倉和標準,嚴格按照指定策略進行執(zhí)行。 2、共同監(jiān)督多個買賣:可適用于多個的買賣一起運作執(zhí)行策略,每個種類都有自己的單獨的進程,全自動的實現(xiàn)監(jiān)控報價。監(jiān)控系統(tǒng)的買賣標準,保證買賣交易的及時性 3、智能跟蹤,及時止損:設(shè)定開啟標準,盈利占比超過一定的標準后,智能機器人會開啟全自動的跟蹤止損。價格持續(xù)的上漲時,盈利占比持續(xù)攻克大值交易,價格下降時開啟強制平倉標準,止盈止損。 def handle_bar(context,bar_dict): ... if newPrice>=context.nextSellPrice: logger.info("執(zhí)行高拋交易,對應(yīng)價格:{}".format(newPrice)) amount=context.portfolio.positions[context.s1].quantity if amount>=context.tradeNumber:開發(fā)細節(jié)I35功能7O98源碼O7I8 logger.info("執(zhí)行高拋交易,對應(yīng)數(shù)量:{}".format(context.tradeNumber)) order_shares(context.s1,-context.tradeNumber) plot("S",newPrice) elif amount>=100: logger.info("執(zhí)行高拋交易,對應(yīng)數(shù)量:{}".format(amount)) order_shares(context.s1,-amount) plot("S",newPrice) calc_next_trade_price(context,newPrice) obj={開發(fā)流程:MrsFu123 "nextSellPrice":context.nextSellPrice, "nextBuyPrice":context.nextBuyPrice, "curTradePrice":context.curTradePrice } context.buyTradeList.append(obj) if newPrice<=context.nextBuyPrice: logger.info("執(zhí)行低吸交易,對應(yīng)價格:{}".format(newPrice)) amount=int(context.portfolio.cash/newPrice/100.0)*100 if amount>=context.tradeNumber: logger.info("執(zhí)行低吸交易,對應(yīng)數(shù)量:{}".format(context.tradeNumber)) order_shares(context.s1,context.tradeNumber) plot("B",newPrice) calc_next_trade_price(context,newPrice) obj={ "nextSellPrice":context.nextSellPrice, "nextBuyPrice":context.nextBuyPrice, "curTradePrice":context.curTradePrice } context.sellTradeList.append(obj)