Documentation
¶
Index ¶
- Constants
- Variables
- func CollectOptLog(args *config.CmdArgs) *errs.Error
- func CompareExgBTOrders(args []string)
- func DescGroups(items []*OptInfo) ([]*OptInfo, []*OptInfo)
- func RunBTOverOpt(args *config.CmdArgs) *errs.Error
- func RunOptimize(args *config.CmdArgs) *errs.Error
- func RunRollBTPicker(args *config.CmdArgs) *errs.Error
- type BTResult
- type BackTest
- type FnCalcOptBest
- type FuncOptTask
- type GroupScore
- type OptGroup
- type OptInfo
- type PlotData
- type RowItem
- type RowPart
- type ValItem
Constants ¶
const (
ShowNum = 600
)
Variables ¶
var ( MapCalcOptBest = map[string]FnCalcOptBest{ "score": getBestByScore, "good3": optGood3, "good0t3": optGood0t3, "goodAvg": optGoodMa, "good1t4": optGood1t4, "good4": optGood4, "good2": optGood2, "good5": optGood5, "good7": optGood7, "good2t5": optGood2t5, "good3t7": optGood3t7, "good0t7": optGood0t7, "good3t10": optGood3t10, } DefCalcOptBest = "good3" )
Functions ¶
func CollectOptLog ¶
CollectOptLog Collect and analyze the logs generated by RunOptimize Sorts all policy tasks in reverse score order of output. 收集分析RunOptimize生成的日志 将所有策略任务按分数倒序排列输出。
func CompareExgBTOrders ¶
func CompareExgBTOrders(args []string)
CompareExgBTOrders Compare the exchange export order records with the backtest order records. 对比交易所导出订单记录和回测订单记录。
func DescGroups ¶ added in v0.1.7
DescGroups Divide the parameter group into profit and loss groups, both in descending order of scores; Return: Profit group, loss group 将参数组划分为盈利和亏损两组,都按分数降序;返回:盈利组,亏损组
func RunBTOverOpt ¶
RunBTOverOpt Backtesting mode based on continuous parameter tuning. Approach the real situation and avoid using future information to adjust parameters for backtesting. 基于持续调参的回测模式。接近实盘情况,避免使用未来信息调参回测。
Types ¶
type BTResult ¶
type BTResult struct {
MaxOpenOrders int
MinReal float64
MaxReal float64 // Maximum Assets 最大资产
MaxDrawDownPct float64 // Maximum drawdown percentage 最大回撤百分比
ShowDrawDownPct float64 // Displays the maximum drawdown percentage 显示最大回撤百分比
BarNum int
TimeNum int
OrderNum int
Plots *PlotData
StartMS int64
EndMS int64
PlotEvery int
TotalInvest float64
OutDir string
PairGrps []*RowItem
TotProfit float64
TotCost float64
TotFee float64
TotProfitPct float64
SharpeRatio float64
SortinoRatio float64
// contains filtered or unexported fields
}
func NewBTResult ¶
func NewBTResult() *BTResult
type BackTest ¶
func NewBackTest ¶
type FnCalcOptBest ¶ added in v0.1.7
type GroupScore ¶
type GroupScore struct {
Items []*config.RunPolicyConfig
Score float64
}
type OptInfo ¶
func AvgGoodDesc ¶ added in v0.1.7
AvgGoodDesc For profitable groups, cut the specified range in descending order of scores and take the average of the parameters 对盈利的组,按分数降序,截取指定范围,取参数平均值