{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from datetime import datetime\n", "\n", "from vnpy.trader.optimize import OptimizationSetting\n", "from vnpy_ctastrategy.backtesting import BacktestingEngine\n", "#from vnpy_ctastrategy.strategies.vip13 import vip13\n", "from vip15 import vip15" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "engine = BacktestingEngine()\n", "engine.set_parameters(\n", " vt_symbol=\"rb888.SHFE\",\n", " interval=\"1h\",\n", " start=datetime(2020, 1, 1),\n", " end=datetime(2024, 3, 21),\n", " rate=1.5/10000,\n", " slippage=1,\n", " size=10,\n", " pricetick=1,\n", " capital=1_000_000,\n", ")\n", "engine.add_strategy(vip15, {})" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "scrolled": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2024-09-29 22:34:33.788661\t开始加载历史数据\n", "2024-09-29 22:34:33.788661\t加载进度:# [0%]\n", "2024-09-29 22:34:33.853620\t加载进度:# [10%]\n", "2024-09-29 22:34:33.853620\t加载进度:## [20%]\n", "2024-09-29 22:34:33.854618\t加载进度:### [30%]\n", "2024-09-29 22:34:33.855628\t加载进度:#### [40%]\n", "2024-09-29 22:34:33.866613\t加载进度:##### [50%]\n", "2024-09-29 22:34:33.909587\t加载进度:###### [60%]\n", "2024-09-29 22:34:33.977511\t加载进度:####### [70%]\n", "2024-09-29 22:34:34.018482\t加载进度:######## [80%]\n", "2024-09-29 22:34:34.061343\t加载进度:######### [90%]\n", "2024-09-29 22:34:34.102180\t加载进度:########## [100%]\n", "2024-09-29 22:34:34.103216\t历史数据加载完成,数据量:3715\n", "2024-09-29 22:34:34.104221\t策略初始化完成\n", "2024-09-29 22:34:34.104221\t开始回放历史数据\n", "2024-09-29 22:34:34.135183\t回放进度:= [0%]\n", "2024-09-29 22:34:34.207123\t回放进度:== [10%]\n", "2024-09-29 22:34:34.282082\t回放进度:=== [20%]\n", "2024-09-29 22:34:34.354018\t回放进度:==== [30%]\n", "2024-09-29 22:34:34.425928\t回放进度:===== [40%]\n", "2024-09-29 22:34:34.497910\t回放进度:====== [50%]\n", "2024-09-29 22:34:34.568851\t回放进度:======= [60%]\n", "2024-09-29 22:34:34.640947\t回放进度:======== [70%]\n", "2024-09-29 22:34:34.712557\t回放进度:========= [80%]\n", "2024-09-29 22:34:34.785462\t回放进度:========== [90%]\n", "2024-09-29 22:34:34.786504\t回放进度:=========== [100%]\n", "2024-09-29 22:34:34.786504\t历史数据回放结束\n", "2024-09-29 22:34:34.787461\t开始计算逐日盯市盈亏\n", "2024-09-29 22:34:34.793493\t逐日盯市盈亏计算完成\n", "2024-09-29 22:34:34.794456\t开始计算策略统计指标\n", "2024-09-29 22:34:34.802487\t------------------------------\n", "2024-09-29 22:34:34.802487\t首个交易日:\t2022-01-18\n", "2024-09-29 22:34:34.802487\t最后交易日:\t2024-03-20\n", "2024-09-29 22:34:34.802487\t总交易日:\t525\n", "2024-09-29 22:34:34.802487\t盈利交易日:\t26\n", "2024-09-29 22:34:34.802487\t亏损交易日:\t34\n", "2024-09-29 22:34:34.802487\t起始资金:\t1,000,000.00\n", "2024-09-29 22:34:34.802487\t结束资金:\t1,006,013.98\n", "2024-09-29 22:34:34.802487\t总收益率:\t0.60%\n", "2024-09-29 22:34:34.802487\t年化收益:\t0.27%\n", "2024-09-29 22:34:34.802487\t最大回撤: \t-2,484.98\n", "2024-09-29 22:34:34.802487\t百分比最大回撤: -0.25%\n", "2024-09-29 22:34:34.802487\t最长回撤天数: \t139\n", "2024-09-29 22:34:34.802487\t总盈亏:\t6,013.98\n", "2024-09-29 22:34:34.802487\t总手续费:\t376.02\n", "2024-09-29 22:34:34.802487\t总滑点:\t600.00\n", "2024-09-29 22:34:34.802487\t总成交金额:\t2,506,830.00\n", "2024-09-29 22:34:34.802487\t总成交笔数:\t58\n", "2024-09-29 22:34:34.802487\t日均盈亏:\t11.46\n", "2024-09-29 22:34:34.802487\t日均手续费:\t0.72\n", "2024-09-29 22:34:34.802487\t日均滑点:\t1.14\n", "2024-09-29 22:34:34.802487\t日均成交金额:\t4,774.91\n", "2024-09-29 22:34:34.802487\t日均成交笔数:\t0.11047619047619048\n", "2024-09-29 22:34:34.802487\t日均收益率:\t0.00%\n", "2024-09-29 22:34:34.802487\t收益标准差:\t0.02%\n", "2024-09-29 22:34:34.802487\tSharpe Ratio:\t1.07\n", "2024-09-29 22:34:34.802487\t收益回撤比:\t2.43\n", "2024-09-29 22:34:34.803487\t策略统计指标计算完成\n" ] }, { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "mode": "lines", "name": "Balance", "type": "scatter", "x": [ "2022-01-18", "2022-01-19", "2022-01-20", "2022-01-21", "2022-01-24", "2022-01-25", "2022-01-26", "2022-01-27", "2022-01-28", "2022-02-07", "2022-02-08", "2022-02-09", "2022-02-10", "2022-02-11", "2022-02-14", "2022-02-15", "2022-02-16", "2022-02-17", "2022-02-18", "2022-02-21", "2022-02-22", "2022-02-23", "2022-02-24", "2022-02-25", "2022-02-28", "2022-03-01", "2022-03-02", "2022-03-03", "2022-03-04", "2022-03-07", "2022-03-08", "2022-03-09", "2022-03-10", "2022-03-11", "2022-03-14", "2022-03-15", "2022-03-16", "2022-03-17", "2022-03-18", "2022-03-21", "2022-03-22", "2022-03-23", "2022-03-24", "2022-03-25", "2022-03-28", "2022-03-29", "2022-03-30", "2022-03-31", "2022-04-01", "2022-04-06", "2022-04-07", "2022-04-08", "2022-04-11", "2022-04-12", "2022-04-13", "2022-04-14", "2022-04-15", "2022-04-18", "2022-04-19", "2022-04-20", "2022-04-21", "2022-04-22", "2022-04-25", "2022-04-26", "2022-04-27", "2022-04-28", "2022-04-29", "2022-05-05", "2022-05-06", "2022-05-09", "2022-05-10", "2022-05-11", "2022-05-12", "2022-05-13", "2022-05-16", "2022-05-17", "2022-05-18", "2022-05-19", "2022-05-20", "2022-05-23", "2022-05-24", "2022-05-25", "2022-05-26", "2022-05-27", "2022-05-30", "2022-05-31", "2022-06-01", "2022-06-02", "2022-06-06", "2022-06-07", "2022-06-08", "2022-06-09", "2022-06-10", "2022-06-13", "2022-06-14", "2022-06-15", "2022-06-16", "2022-06-17", "2022-06-20", "2022-06-21", "2022-06-22", "2022-06-23", "2022-06-24", "2022-06-27", "2022-06-28", "2022-06-29", "2022-06-30", "2022-07-01", "2022-07-04", "2022-07-05", "2022-07-06", "2022-07-07", "2022-07-08", "2022-07-11", "2022-07-12", "2022-07-13", "2022-07-14", "2022-07-15", "2022-07-18", "2022-07-19", "2022-07-20", "2022-07-21", "2022-07-22", "2022-07-25", "2022-07-26", "2022-07-27", "2022-07-28", "2022-07-29", "2022-08-01", "2022-08-02", "2022-08-03", "2022-08-04", "2022-08-05", "2022-08-08", "2022-08-09", "2022-08-10", "2022-08-11", "2022-08-12", "2022-08-15", "2022-08-16", "2022-08-17", "2022-08-18", "2022-08-19", "2022-08-22", "2022-08-23", "2022-08-24", "2022-08-25", "2022-08-26", "2022-08-29", "2022-08-30", "2022-08-31", "2022-09-01", "2022-09-02", "2022-09-05", "2022-09-06", "2022-09-07", "2022-09-08", "2022-09-09", "2022-09-13", "2022-09-14", "2022-09-15", "2022-09-16", "2022-09-19", "2022-09-20", "2022-09-21", "2022-09-22", "2022-09-23", "2022-09-26", "2022-09-27", "2022-09-28", "2022-09-29", "2022-09-30", "2022-10-10", "2022-10-11", "2022-10-12", "2022-10-13", "2022-10-14", "2022-10-17", "2022-10-18", "2022-10-19", "2022-10-20", "2022-10-21", "2022-10-24", "2022-10-25", "2022-10-26", "2022-10-27", "2022-10-28", "2022-10-31", "2022-11-01", "2022-11-02", "2022-11-03", "2022-11-04", "2022-11-07", "2022-11-08", "2022-11-09", "2022-11-10", "2022-11-11", "2022-11-14", "2022-11-15", "2022-11-16", "2022-11-17", "2022-11-18", "2022-11-21", "2022-11-22", "2022-11-23", "2022-11-24", "2022-11-25", "2022-11-28", "2022-11-29", "2022-11-30", "2022-12-01", "2022-12-02", "2022-12-05", "2022-12-06", "2022-12-07", "2022-12-08", "2022-12-09", "2022-12-12", "2022-12-13", "2022-12-14", "2022-12-15", "2022-12-16", "2022-12-19", "2022-12-20", "2022-12-21", "2022-12-22", "2022-12-23", "2022-12-26", "2022-12-27", "2022-12-28", "2022-12-29", "2022-12-30", "2023-01-03", "2023-01-04", "2023-01-05", "2023-01-06", "2023-01-09", "2023-01-10", "2023-01-11", "2023-01-12", "2023-01-13", "2023-01-16", "2023-01-17", "2023-01-18", "2023-01-19", "2023-01-20", "2023-01-30", "2023-01-31", "2023-02-01", "2023-02-02", "2023-02-03", "2023-02-06", "2023-02-07", "2023-02-08", "2023-02-09", "2023-02-10", "2023-02-13", "2023-02-14", "2023-02-15", "2023-02-16", "2023-02-17", "2023-02-20", "2023-02-21", "2023-02-22", "2023-02-23", "2023-02-24", "2023-02-27", "2023-02-28", "2023-03-01", "2023-03-02", "2023-03-03", "2023-03-06", "2023-03-07", "2023-03-08", "2023-03-09", "2023-03-10", "2023-03-13", "2023-03-14", "2023-03-15", "2023-03-16", "2023-03-17", "2023-03-20", "2023-03-21", "2023-03-22", "2023-03-23", "2023-03-24", "2023-03-27", "2023-03-28", "2023-03-29", "2023-03-30", "2023-03-31", "2023-04-03", "2023-04-04", "2023-04-06", "2023-04-07", "2023-04-10", "2023-04-11", "2023-04-12", "2023-04-13", "2023-04-14", "2023-04-17", "2023-04-18", "2023-04-19", "2023-04-20", "2023-04-21", "2023-04-24", "2023-04-25", "2023-04-26", "2023-04-27", "2023-04-28", "2023-05-04", "2023-05-05", "2023-05-08", "2023-05-09", "2023-05-10", "2023-05-11", "2023-05-12", "2023-05-15", "2023-05-16", "2023-05-17", "2023-05-18", "2023-05-19", "2023-05-22", "2023-05-23", "2023-05-24", "2023-05-25", "2023-05-26", "2023-05-29", "2023-05-30", "2023-05-31", "2023-06-01", "2023-06-02", "2023-06-05", "2023-06-06", "2023-06-07", "2023-06-08", "2023-06-09", "2023-06-12", "2023-06-13", "2023-06-14", "2023-06-15", "2023-06-16", "2023-06-19", "2023-06-20", "2023-06-21", "2023-06-26", "2023-06-27", "2023-06-28", "2023-06-29", "2023-06-30", "2023-07-03", "2023-07-04", "2023-07-05", "2023-07-06", "2023-07-07", "2023-07-10", "2023-07-11", "2023-07-12", "2023-07-13", "2023-07-14", "2023-07-17", "2023-07-18", "2023-07-19", "2023-07-20", "2023-07-21", "2023-07-24", "2023-07-25", "2023-07-26", "2023-07-27", "2023-07-28", "2023-07-31", "2023-08-01", "2023-08-02", "2023-08-03", "2023-08-04", "2023-08-07", "2023-08-08", "2023-08-09", "2023-08-10", "2023-08-11", "2023-08-14", "2023-08-15", "2023-08-16", "2023-08-17", "2023-08-18", "2023-08-21", "2023-08-22", "2023-08-23", "2023-08-24", "2023-08-25", "2023-08-28", "2023-08-29", "2023-08-30", "2023-08-31", "2023-09-01", "2023-09-04", "2023-09-05", "2023-09-06", "2023-09-07", "2023-09-08", "2023-09-11", "2023-09-12", "2023-09-13", "2023-09-14", "2023-09-15", "2023-09-18", "2023-09-19", "2023-09-20", "2023-09-21", "2023-09-22", "2023-09-25", "2023-09-26", "2023-09-27", "2023-09-28", "2023-10-09", "2023-10-10", "2023-10-11", "2023-10-12", "2023-10-13", "2023-10-16", "2023-10-17", "2023-10-18", "2023-10-19", "2023-10-20", "2023-10-23", "2023-10-24", "2023-10-25", "2023-10-26", "2023-10-27", "2023-10-30", "2023-10-31", "2023-11-01", "2023-11-02", "2023-11-03", "2023-11-06", "2023-11-07", "2023-11-08", "2023-11-09", "2023-11-10", "2023-11-13", "2023-11-14", "2023-11-15", "2023-11-16", "2023-11-17", "2023-11-20", "2023-11-21", "2023-11-22", "2023-11-23", "2023-11-24", "2023-11-27", "2023-11-28", "2023-11-29", "2023-11-30", "2023-12-01", "2023-12-04", "2023-12-05", "2023-12-06", "2023-12-07", "2023-12-08", "2023-12-11", "2023-12-12", "2023-12-13", "2023-12-14", "2023-12-15", "2023-12-18", "2023-12-19", "2023-12-20", "2023-12-21", "2023-12-22", "2023-12-25", "2023-12-26", "2023-12-27", "2023-12-28", "2023-12-29", "2024-01-02", "2024-01-03", "2024-01-04", "2024-01-05", "2024-01-08", "2024-01-09", "2024-01-10", "2024-01-11", "2024-01-12", "2024-01-15", "2024-01-16", "2024-01-17", "2024-01-18", "2024-01-19", "2024-01-22", "2024-01-23", "2024-01-24", "2024-01-25", "2024-01-26", "2024-01-29", "2024-01-30", "2024-01-31", "2024-02-01", "2024-02-02", "2024-02-05", "2024-02-06", "2024-02-07", "2024-02-08", "2024-02-19", "2024-02-20", "2024-02-21", "2024-02-22", "2024-02-23", "2024-02-26", "2024-02-27", "2024-02-28", "2024-02-29", "2024-03-01", "2024-03-04", "2024-03-05", "2024-03-06", "2024-03-07", "2024-03-08", "2024-03-11", "2024-03-12", "2024-03-13", "2024-03-14", "2024-03-15", "2024-03-18", "2024-03-19", "2024-03-20" ], "xaxis": "x", "y": [ 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000622.443, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000124.91, 1000007.8105, 1000423.6265, 1000096.47, 1000096.47, 1000096.47, 1000096.47, 1000096.47, 1000096.47, 1000096.47, 1000096.47, 1000949.6885, 1002199.6885, 1003413.4095, 1003413.4095, 1003413.4095, 1003413.4095, 1003413.4095, 1003413.4095, 1003413.4095, 1003413.4095, 1003790.262, 1003790.262, 1003790.262, 1003790.262, 1003790.262, 1003790.262, 1003790.262, 1003790.262, 1003790.262, 1003594.4435, 1003276.9295, 1003276.9295, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1003025.6015, 1002793.3795, 1002793.3795, 1002793.3795, 1002793.3795, 1002471.63, 1002471.63, 1002471.63, 1002471.63, 1002471.63, 1002471.63, 1002471.63, 1002471.63, 1002471.63, 1002471.63, 1002471.63, 1002471.63, 1002471.63, 1002471.63, 1002471.63, 1002471.63, 1002471.63, 1002471.63, 1002435.5205, 1002279.435, 1002279.435, 1002623.3315, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001717.1485, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1001305.2865, 1002118.6475, 1002188.6475, 1002041.893, 1002041.893, 1002041.893, 1002041.893, 1002041.893, 1002041.893, 1002041.893, 1002041.893, 1002041.893, 1002041.893, 1002041.893, 1002041.893, 1002041.893, 1002041.893, 1002041.893, 1002844.9285, 1003514.9285, 1003318.1605, 1003318.1605, 1003318.1605, 1003318.1605, 1003318.1605, 1003318.1605, 1003318.1605, 1003318.1605, 1003318.1605, 1003318.1605, 1003541.52, 1004461.52, 1004821.52, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004555.07, 1004412.7205, 1004314.2585, 1004844.2585, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1004578.206, 1005272.1625, 1005182.1625, 1004946.179, 1004946.179, 1004946.179, 1004946.179, 1004946.179, 1004946.179, 1004946.179, 1004946.179, 1004946.179, 1004946.179, 1004523.9255, 1004523.9255, 1004523.9255, 1004523.9255, 1004523.9255, 1004523.9255, 1004523.9255, 1004523.9255, 1004523.9255, 1004523.9255, 1004523.9255, 1004523.9255, 1004523.9255, 1004523.9255, 1004523.9255, 1004428.023, 1004152.0695, 1004152.0695, 1004010.338, 1004010.338, 1004010.338, 1004010.338, 1004010.338, 1004010.338, 1004010.338, 1004010.338, 1004010.338, 1004010.338, 1004010.338, 1004010.338, 1004010.338, 1004010.338, 1004010.338, 1003858.374, 1004298.374, 1004258.374, 1005038.374, 1006138.374, 1005640.047, 1005940.047, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005183.8745, 1005157.627, 1005147.627, 1005257.627, 1005757.627, 1005837.627, 1005981.255, 1005981.255, 1005981.255, 1005981.255, 1005981.255, 1005981.255, 1005981.255, 1005981.255, 1005981.255, 1005981.255, 1005981.255, 1005981.255, 1005981.255, 1005981.255, 1005981.255, 1005981.255, 1005981.255, 1005981.255, 1005981.255, 1005981.255, 1005981.255, 1006648.73, 1006468.73, 1006768.73, 1006448.73, 1006396.133, 1006396.133, 1006396.133, 1006396.133, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755, 1006013.9755 ], "yaxis": "y" }, { "fill": "tozeroy", "fillcolor": "red", "mode": "lines", "name": "Drawdown", "type": "scatter", "x": [ "2022-01-18", "2022-01-19", "2022-01-20", "2022-01-21", "2022-01-24", "2022-01-25", "2022-01-26", "2022-01-27", "2022-01-28", "2022-02-07", "2022-02-08", "2022-02-09", "2022-02-10", "2022-02-11", "2022-02-14", "2022-02-15", "2022-02-16", "2022-02-17", "2022-02-18", "2022-02-21", "2022-02-22", "2022-02-23", "2022-02-24", "2022-02-25", "2022-02-28", "2022-03-01", "2022-03-02", "2022-03-03", "2022-03-04", "2022-03-07", "2022-03-08", "2022-03-09", "2022-03-10", "2022-03-11", "2022-03-14", "2022-03-15", "2022-03-16", "2022-03-17", "2022-03-18", "2022-03-21", "2022-03-22", "2022-03-23", "2022-03-24", "2022-03-25", "2022-03-28", "2022-03-29", "2022-03-30", "2022-03-31", "2022-04-01", "2022-04-06", "2022-04-07", "2022-04-08", "2022-04-11", "2022-04-12", "2022-04-13", "2022-04-14", "2022-04-15", "2022-04-18", "2022-04-19", "2022-04-20", "2022-04-21", "2022-04-22", "2022-04-25", "2022-04-26", "2022-04-27", "2022-04-28", "2022-04-29", "2022-05-05", "2022-05-06", "2022-05-09", "2022-05-10", "2022-05-11", "2022-05-12", "2022-05-13", "2022-05-16", "2022-05-17", "2022-05-18", "2022-05-19", "2022-05-20", "2022-05-23", "2022-05-24", "2022-05-25", "2022-05-26", "2022-05-27", "2022-05-30", "2022-05-31", "2022-06-01", "2022-06-02", "2022-06-06", "2022-06-07", "2022-06-08", "2022-06-09", "2022-06-10", "2022-06-13", "2022-06-14", "2022-06-15", "2022-06-16", "2022-06-17", "2022-06-20", "2022-06-21", "2022-06-22", "2022-06-23", "2022-06-24", "2022-06-27", "2022-06-28", "2022-06-29", "2022-06-30", "2022-07-01", "2022-07-04", "2022-07-05", "2022-07-06", "2022-07-07", "2022-07-08", "2022-07-11", "2022-07-12", "2022-07-13", "2022-07-14", "2022-07-15", "2022-07-18", "2022-07-19", "2022-07-20", "2022-07-21", "2022-07-22", "2022-07-25", "2022-07-26", "2022-07-27", "2022-07-28", "2022-07-29", "2022-08-01", "2022-08-02", "2022-08-03", "2022-08-04", "2022-08-05", "2022-08-08", "2022-08-09", "2022-08-10", "2022-08-11", "2022-08-12", "2022-08-15", "2022-08-16", "2022-08-17", "2022-08-18", "2022-08-19", "2022-08-22", "2022-08-23", "2022-08-24", "2022-08-25", "2022-08-26", "2022-08-29", "2022-08-30", "2022-08-31", "2022-09-01", "2022-09-02", "2022-09-05", "2022-09-06", "2022-09-07", "2022-09-08", "2022-09-09", "2022-09-13", "2022-09-14", "2022-09-15", "2022-09-16", "2022-09-19", "2022-09-20", "2022-09-21", "2022-09-22", "2022-09-23", "2022-09-26", "2022-09-27", "2022-09-28", "2022-09-29", "2022-09-30", "2022-10-10", "2022-10-11", "2022-10-12", "2022-10-13", "2022-10-14", "2022-10-17", "2022-10-18", "2022-10-19", "2022-10-20", "2022-10-21", "2022-10-24", "2022-10-25", "2022-10-26", "2022-10-27", "2022-10-28", "2022-10-31", "2022-11-01", "2022-11-02", "2022-11-03", "2022-11-04", "2022-11-07", "2022-11-08", "2022-11-09", "2022-11-10", "2022-11-11", "2022-11-14", "2022-11-15", "2022-11-16", "2022-11-17", "2022-11-18", "2022-11-21", "2022-11-22", "2022-11-23", "2022-11-24", "2022-11-25", "2022-11-28", "2022-11-29", "2022-11-30", "2022-12-01", "2022-12-02", "2022-12-05", "2022-12-06", "2022-12-07", "2022-12-08", "2022-12-09", "2022-12-12", "2022-12-13", "2022-12-14", "2022-12-15", "2022-12-16", "2022-12-19", "2022-12-20", "2022-12-21", "2022-12-22", "2022-12-23", "2022-12-26", "2022-12-27", "2022-12-28", "2022-12-29", "2022-12-30", "2023-01-03", "2023-01-04", "2023-01-05", "2023-01-06", "2023-01-09", "2023-01-10", "2023-01-11", "2023-01-12", "2023-01-13", "2023-01-16", "2023-01-17", "2023-01-18", "2023-01-19", "2023-01-20", "2023-01-30", "2023-01-31", "2023-02-01", "2023-02-02", "2023-02-03", "2023-02-06", "2023-02-07", "2023-02-08", "2023-02-09", "2023-02-10", "2023-02-13", "2023-02-14", "2023-02-15", "2023-02-16", "2023-02-17", "2023-02-20", "2023-02-21", "2023-02-22", "2023-02-23", "2023-02-24", "2023-02-27", "2023-02-28", "2023-03-01", "2023-03-02", "2023-03-03", "2023-03-06", "2023-03-07", "2023-03-08", "2023-03-09", "2023-03-10", "2023-03-13", "2023-03-14", "2023-03-15", "2023-03-16", "2023-03-17", "2023-03-20", "2023-03-21", "2023-03-22", "2023-03-23", "2023-03-24", "2023-03-27", "2023-03-28", "2023-03-29", "2023-03-30", "2023-03-31", "2023-04-03", "2023-04-04", "2023-04-06", "2023-04-07", "2023-04-10", "2023-04-11", "2023-04-12", "2023-04-13", "2023-04-14", "2023-04-17", "2023-04-18", "2023-04-19", "2023-04-20", "2023-04-21", "2023-04-24", "2023-04-25", "2023-04-26", "2023-04-27", "2023-04-28", "2023-05-04", "2023-05-05", "2023-05-08", "2023-05-09", "2023-05-10", "2023-05-11", "2023-05-12", "2023-05-15", "2023-05-16", "2023-05-17", "2023-05-18", "2023-05-19", "2023-05-22", "2023-05-23", "2023-05-24", "2023-05-25", "2023-05-26", "2023-05-29", "2023-05-30", "2023-05-31", "2023-06-01", "2023-06-02", "2023-06-05", "2023-06-06", "2023-06-07", "2023-06-08", "2023-06-09", "2023-06-12", "2023-06-13", "2023-06-14", "2023-06-15", "2023-06-16", "2023-06-19", "2023-06-20", "2023-06-21", "2023-06-26", "2023-06-27", "2023-06-28", "2023-06-29", "2023-06-30", "2023-07-03", "2023-07-04", "2023-07-05", "2023-07-06", "2023-07-07", "2023-07-10", "2023-07-11", "2023-07-12", "2023-07-13", "2023-07-14", "2023-07-17", "2023-07-18", "2023-07-19", "2023-07-20", "2023-07-21", "2023-07-24", "2023-07-25", "2023-07-26", "2023-07-27", "2023-07-28", "2023-07-31", "2023-08-01", "2023-08-02", "2023-08-03", "2023-08-04", "2023-08-07", "2023-08-08", "2023-08-09", "2023-08-10", "2023-08-11", "2023-08-14", "2023-08-15", "2023-08-16", "2023-08-17", "2023-08-18", "2023-08-21", "2023-08-22", "2023-08-23", "2023-08-24", "2023-08-25", "2023-08-28", "2023-08-29", "2023-08-30", "2023-08-31", "2023-09-01", "2023-09-04", "2023-09-05", "2023-09-06", "2023-09-07", "2023-09-08", "2023-09-11", "2023-09-12", "2023-09-13", "2023-09-14", "2023-09-15", "2023-09-18", "2023-09-19", "2023-09-20", "2023-09-21", "2023-09-22", "2023-09-25", "2023-09-26", "2023-09-27", "2023-09-28", "2023-10-09", "2023-10-10", "2023-10-11", "2023-10-12", "2023-10-13", "2023-10-16", "2023-10-17", "2023-10-18", "2023-10-19", "2023-10-20", "2023-10-23", "2023-10-24", "2023-10-25", "2023-10-26", "2023-10-27", "2023-10-30", "2023-10-31", "2023-11-01", "2023-11-02", "2023-11-03", "2023-11-06", "2023-11-07", "2023-11-08", "2023-11-09", "2023-11-10", "2023-11-13", "2023-11-14", "2023-11-15", "2023-11-16", "2023-11-17", "2023-11-20", "2023-11-21", "2023-11-22", "2023-11-23", "2023-11-24", "2023-11-27", "2023-11-28", "2023-11-29", "2023-11-30", "2023-12-01", "2023-12-04", "2023-12-05", "2023-12-06", "2023-12-07", "2023-12-08", "2023-12-11", "2023-12-12", "2023-12-13", "2023-12-14", "2023-12-15", "2023-12-18", "2023-12-19", "2023-12-20", "2023-12-21", "2023-12-22", "2023-12-25", "2023-12-26", "2023-12-27", "2023-12-28", "2023-12-29", "2024-01-02", "2024-01-03", "2024-01-04", "2024-01-05", "2024-01-08", "2024-01-09", "2024-01-10", "2024-01-11", "2024-01-12", "2024-01-15", "2024-01-16", "2024-01-17", "2024-01-18", "2024-01-19", "2024-01-22", "2024-01-23", "2024-01-24", "2024-01-25", "2024-01-26", "2024-01-29", "2024-01-30", "2024-01-31", "2024-02-01", "2024-02-02", "2024-02-05", "2024-02-06", "2024-02-07", "2024-02-08", "2024-02-19", "2024-02-20", "2024-02-21", "2024-02-22", "2024-02-23", "2024-02-26", "2024-02-27", "2024-02-28", "2024-02-29", "2024-03-01", "2024-03-04", "2024-03-05", "2024-03-06", "2024-03-07", "2024-03-08", "2024-03-11", "2024-03-12", "2024-03-13", "2024-03-14", "2024-03-15", "2024-03-18", "2024-03-19", "2024-03-20" ], "xaxis": "x2", "y": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -497.5329999999376, -614.6324999999488, -198.81649999995716, -525.9729999999981, -525.9729999999981, -525.9729999999981, -525.9729999999981, -525.9729999999981, -525.9729999999981, -525.9729999999981, -525.9729999999981, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -195.81849999993574, -513.3325000000186, -513.3325000000186, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -764.6604999999981, -996.8824999999488, -996.8824999999488, -996.8824999999488, -996.8824999999488, -1318.6319999999832, -1318.6319999999832, -1318.6319999999832, -1318.6319999999832, -1318.6319999999832, -1318.6319999999832, -1318.6319999999832, -1318.6319999999832, -1318.6319999999832, -1318.6319999999832, -1318.6319999999832, -1318.6319999999832, -1318.6319999999832, -1318.6319999999832, -1318.6319999999832, -1318.6319999999832, -1318.6319999999832, -1318.6319999999832, -1354.7415000000037, -1510.826999999932, -1510.826999999932, -1166.9305000000168, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2073.1134999999776, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -2484.9754999999423, -1671.6145000000251, -1601.6145000000251, -1748.3689999999478, -1748.3689999999478, -1748.3689999999478, -1748.3689999999478, -1748.3689999999478, -1748.3689999999478, -1748.3689999999478, -1748.3689999999478, -1748.3689999999478, -1748.3689999999478, -1748.3689999999478, -1748.3689999999478, -1748.3689999999478, -1748.3689999999478, -1748.3689999999478, -945.3334999999497, -275.3334999999497, -472.10149999998976, -472.10149999998976, -472.10149999998976, -472.10149999998976, -472.10149999998976, -472.10149999998976, -472.10149999998976, -472.10149999998976, -472.10149999998976, -472.10149999998976, -248.74199999996927, 0, 0, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -266.45000000006985, -408.7994999999646, -507.26150000002235, 0, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, -266.0524999999907, 0, -90, -325.983499999973, -325.983499999973, -325.983499999973, -325.983499999973, -325.983499999973, -325.983499999973, -325.983499999973, -325.983499999973, -325.983499999973, -325.983499999973, -748.2369999999646, -748.2369999999646, -748.2369999999646, -748.2369999999646, -748.2369999999646, -748.2369999999646, -748.2369999999646, -748.2369999999646, -748.2369999999646, -748.2369999999646, -748.2369999999646, -748.2369999999646, -748.2369999999646, -748.2369999999646, -748.2369999999646, -844.139499999932, -1120.0929999999935, -1120.0929999999935, -1261.824499999988, -1261.824499999988, -1261.824499999988, -1261.824499999988, -1261.824499999988, -1261.824499999988, -1261.824499999988, -1261.824499999988, -1261.824499999988, -1261.824499999988, -1261.824499999988, -1261.824499999988, -1261.824499999988, -1261.824499999988, -1261.824499999988, -1413.7885000000242, -973.7885000000242, -1013.7885000000242, -233.78850000002421, 0, -498.326999999932, -198.326999999932, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -954.499499999918, -980.7469999999739, -990.7469999999739, -880.7469999999739, -380.7469999999739, -300.7469999999739, -157.11899999994785, -157.11899999994785, -157.11899999994785, -157.11899999994785, -157.11899999994785, -157.11899999994785, -157.11899999994785, -157.11899999994785, -157.11899999994785, -157.11899999994785, -157.11899999994785, -157.11899999994785, -157.11899999994785, -157.11899999994785, -157.11899999994785, -157.11899999994785, -157.11899999994785, -157.11899999994785, -157.11899999994785, -157.11899999994785, -157.11899999994785, 0, -180, 0, -320, -372.59699999995064, -372.59699999995064, -372.59699999995064, -372.59699999995064, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391, -754.7545000000391 ], "yaxis": "y2" }, { "name": "Daily Pnl", "type": "bar", "xaxis": "x3", "y": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 622.443, -497.533, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -117.0995, 415.816, -327.1565, 0, 0, 0, 0, 0, 0, 0, 853.2185, 1250, 1213.721, 0, 0, 0, 0, 0, 0, 0, 376.8525, 0, 0, 0, 0, 0, 0, 0, 0, -195.8185, -317.514, 0, -251.328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -232.222, 0, 0, 0, -321.7495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -36.1095, -156.0855, 0, 343.8965, -906.183, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -411.862, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 813.361, 70, -146.7545, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 803.0355, 670, -196.768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223.3595, 920, 360, -266.45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -142.3495, -98.462, 530, -266.0525, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 693.9565, -90, -235.9835, 0, 0, 0, 0, 0, 0, 0, 0, 0, -422.2535, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -95.9025, -275.9535, 0, -141.73149999999998, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -151.964, 440, -40, 780, 1100, -498.327, 300, -756.1725, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -26.2475, -10, 110, 500, 80, 143.62800000000001, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 667.475, -180, 300, -320, -52.597, 0, 0, 0, -382.1575, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], "yaxis": "y3" }, { "name": "Days", "nbinsx": 100, "type": "histogram", "x": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 622.443, -497.533, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -117.0995, 415.816, -327.1565, 0, 0, 0, 0, 0, 0, 0, 853.2185, 1250, 1213.721, 0, 0, 0, 0, 0, 0, 0, 376.8525, 0, 0, 0, 0, 0, 0, 0, 0, -195.8185, -317.514, 0, -251.328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -232.222, 0, 0, 0, -321.7495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -36.1095, -156.0855, 0, 343.8965, -906.183, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -411.862, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 813.361, 70, -146.7545, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 803.0355, 670, -196.768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223.3595, 920, 360, -266.45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -142.3495, -98.462, 530, -266.0525, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 693.9565, -90, -235.9835, 0, 0, 0, 0, 0, 0, 0, 0, 0, -422.2535, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -95.9025, -275.9535, 0, -141.73149999999998, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -151.964, 440, -40, 780, 1100, -498.327, 300, -756.1725, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -26.2475, -10, 110, 500, 80, 143.62800000000001, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 667.475, -180, 300, -320, -52.597, 0, 0, 0, -382.1575, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], "xaxis": "x4", "yaxis": "y4" } ], "layout": { "annotations": [ { "font": { "size": 16 }, "showarrow": false, "text": "Balance", "x": 0.5, "xanchor": "center", "xref": "paper", "y": 1, "yanchor": "bottom", "yref": "paper" }, { "font": { "size": 16 }, "showarrow": false, "text": "Drawdown", "x": 0.5, "xanchor": "center", "xref": "paper", "y": 0.7350000000000001, "yanchor": "bottom", "yref": "paper" }, { "font": { "size": 16 }, "showarrow": false, "text": "Daily Pnl", "x": 0.5, "xanchor": "center", "xref": "paper", "y": 0.47000000000000003, "yanchor": "bottom", "yref": "paper" }, { "font": { "size": 16 }, "showarrow": false, "text": "Pnl Distribution", "x": 0.5, "xanchor": "center", "xref": "paper", "y": 0.20500000000000002, "yanchor": "bottom", "yref": "paper" } ], "height": 1000, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } }, "width": 1000, "xaxis": { "anchor": "y", "domain": [ 0, 1 ] }, "xaxis2": { "anchor": "y2", "domain": [ 0, 1 ] }, "xaxis3": { "anchor": "y3", "domain": [ 0, 1 ] }, "xaxis4": { "anchor": "y4", "domain": [ 0, 1 ] }, "yaxis": { "anchor": "x", "domain": [ 0.7949999999999999, 1 ] }, "yaxis2": { "anchor": "x2", "domain": [ 0.53, 0.7350000000000001 ] }, "yaxis3": { "anchor": "x3", "domain": [ 0.265, 0.47000000000000003 ] }, "yaxis4": { "anchor": "x4", "domain": [ 0, 0.20500000000000002 ] } } } }, "metadata": {}, "output_type": "display_data" } ], "source": [ "engine.load_data()\n", "engine.run_backtesting()\n", "df = engine.calculate_result()\n", "engine.calculate_statistics()\n", "engine.show_chart()" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "scrolled": false }, "outputs": [ { "data": { "text/plain": [ "'用于参数优化'" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "'''用于参数优化'''\n", "# setting = OptimizationSetting()\n", "# setting.set_target(\"sharpe_ratio\")\n", "# setting.add_parameter(\"period\", 5, 100, 5)\n", "# setting.add_parameter(\"pds\", 2,50, 2)\n", "# setting.add_parameter(\"trailing_stop_rate\", 5, 100, 5)\n", "# from multiprocessing import cpu_count\n", "# # 获取 CPU 核心数量\n", "# num_cores = cpu_count()\n", "# print(f\"获取 CPU 核心数量:\",round(num_cores/2))\n", "# engine.run_ga_optimization(setting, max_workers=round(num_cores/2))" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "scrolled": false }, "outputs": [], "source": [ "# engine.run_bf_optimization(setting)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.9 (heads/new_nsis-dirty:06eefe2, Jan 11 2023, 23:06:02) [MSC v.1934 64 bit (AMD64)]" }, "vscode": { "interpreter": { "hash": "1b43cb0bd93d5abbadd54afed8252f711d4681fe6223ad6b67ffaee289648f85" } } }, "nbformat": 4, "nbformat_minor": 2 }