当前位置:网站首页>Lm10 cosine wave homeopathic grid strategy
Lm10 cosine wave homeopathic grid strategy
2022-07-04 19:27:00 【Squirrel kuanke】
Quantitative strategy development , High quality community , Trading ideas sharing and other related contents
『 Text 』
ˇ
Hello everyone , Today we share heterogeneity CTA The first 10 piece , The first of the grid inversion oscillation series 3 Strategy content .
In this article, we examine the strategy construction from the perspective of risk control , In the first two articles, we constructed pure price grid shocks and reversals , And the oscillation and inversion of Fisher inverse transform index . But through the near 2 Months of observation found , The hidden risk of this strategy is not small , Although the overall back test is upward , But it is not difficult to see from the details ,“ Scalp extraction ” The risk of the strategy breaking out at a certain time point is very confusing to Xiaobai . As shown in the figure below :
Today, what we want to solve is the time point risk outbreak of this scalp pulling strategy , We adopt the idea of trend mode and cycle mode , Combined with the phase theory in trigonometric function , Integrate into the transformation cycle 、 Trend oscillation algorithm .
One 、 Strategy background
There is a cycle in the trend , The cycle deducts one trend by one . The market in the ideal world is probably like this . All we have to do is find the trend in the cycle to do . Here are the trends in the real world + Cycle period , As shown in the figure below :
secondly , Is the phase in the trigonometric function , The source is the Fourier series , Because Fourier series uses trigonometric functions , Trigonometric function is to generate signals , This signal is not a signal for us to open and close positions , It's a wave in physics , Or electromagnetic waves , Because electromagnetic waves use trigonometric functions . And the core of what we have to do —— Fuse the signal into the opening and closing position signal . therefore , These are used behind the scenes .
Phase occurs in periodic motion , The most direct understanding of phase is angle , This angle exists in circular motion .( I won't talk about Fourier series , These are all Fourier series )
As shown in the figure above , Suppose a moment T, Simple harmonic motion in large P spot , The corresponding circular motion is the small one in the figure p spot , Connecting with the dot is OP, The included angle is θ, That is, phase .
Phase formula :θ = wt+φ;
When T=0 That is, the initial moment , that θ = φ. Big P Do simple harmonic motion , Small p The displacement is above the circumference . The coordinates can also be calculated according to the above formula . Simply speaking ,w It's the frequency ,t Is time , the last one φ Is the initial phase angle ( namely t=0 When , Only φ). Phase is (ωt+φ).w be equal to 2π Divided by the period T.
If we tile the trajectory of the circle on the time axis , Now what you get is a sine function , As shown in the figure below :
All the above are high school students 、 College knowledge , Those who don't understand Baidu first , Ask me if you still don't understand .
After the above picture comes out , You know what I'm going to say , Look at the sine function and the phase evolution , Plus the picture I mentioned above .
Two 、 Policy code
A brief explanation , This beta In fact, it can be seen as w,delta Represents the bandwidth of the filter , In direct proportion to . The advantage is that the filter price will be more responsive , Relatively in the rapid change of the cycle .
And then , We filter the processed signal with a low-order filter , As shown in the figure below :
The above logic has been quantitatively studied in heterogeneous communities 14 Share in . Members of the group can browse the original translation documents , Look up and understand the logic .
The logic of the appearance is SF37 Of Krange Adaptive appearance , Part of the code is shown in the figure below :
3、 ... and 、 visualization
national debt +LPG
The above only tests the national debt (T、TF) and LPG Three varieties , Because of the time problem, we can take it to the work area and test it by ourselves .
Let's take a look at the visualization of several transaction records , As shown in the figure below :
T short
T long
Lpg long
summary :
1、 This strategy is routine CTA Exit logic , There is no heterogeneity , It can be modified here
2、 The policy algorithm has a certain period 、 The case that the series of a group of parameters is not convergent , This kind of optimization must be observed visually . for example :VNPY Running directly is fruitless , To optimize , Because the default parameter probability is divergent .
3、 This strategy, especially treasury bonds, is used to follow LM09 For combination , The aim is to avoid unilateral risks , So the strategy heterogeneity lies in two points : The first is to enter the site , But the entry heterogeneity . The second is to follow LM09 Fisher inverse transform oscillation algorithm inversion combination used together .
4、 Good reversal 、 It's hard to have a good variety of trends , National debt is one of them . National debt is used by everyone 20 The cycle moving average is profitable in each cycle , It shows that it has periodic momentum , But the national debt “ Mean reversion ” It's also very strong , Late entry of trend strategy will be beaten , Enter the market early, stop the loss on the left and come out . Therefore, in this strategy, we suggest that we mainly anchor the national debt as a portfolio .
Due to the differences of various platforms , Back test performance to TBQ The version shall prevail !!!
This strategy is only used for learning and communication , The investor is personally responsible for the profit and loss of the firm offer .
边栏推荐
- Scala basic tutorial -- 19 -- actor
- 26. 删除有序数组中的重复项 C#解答
- 基于lex和yacc的词法分析器+语法分析器
- 英特尔集成光电研究最新进展推动共封装光学和光互连技术进步
- Esp32-c3 introductory tutorial questions ⑫ - undefined reference to ROM_ temp_ to_ power, in function phy_ get_ romfunc_ addr
- Hough Transform 霍夫变换原理
- 联想首次详解绿色智城数字孪生平台 破解城市双碳升级难点
- repeat_P1002 [NOIP2002 普及组] 过河卒_dp
- 2022CoCa: Contrastive Captioners are Image-Text Fountion Models
- Unity给自己的脚本添加类似编辑器扩展的功能案例ContextMenu的使用
猜你喜欢
随机推荐
The 300th weekly match of leetcode (20220703)
更安全、更智能、更精致,长安Lumin完虐宏光MINI EV?
Scala basic tutorial -- 20 -- akka
函数式接口
Shell 编程核心技术《二》
Process of manually encrypt the mass-producing firmware and programming ESP devices
在线SQL转Excel(xls/xlsx)工具
物联网应用技术的就业前景和现状
Send and receive IBM WebSphere MQ messages
建立自己的网站(15)
模板_大整数减法_无论大小关系
To sort out messy header files, I use include what you use
反射(一)
repeat_P1002 [NOIP2002 普及组] 过河卒_dp
Generate XML elements
6.26cf simulation match B: solution to array reduction problem
26. Delete the duplicate item C solution in the ordered array
Unity给自己的脚本添加类似编辑器扩展的功能案例ContextMenu的使用
2022健康展,北京健博会,中国健康展,大健康展11月13日
每日一题(2022-07-02)——最低加油次数