当前位置:网站首页>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 .
边栏推荐
- C # implementation defines a set of SQL statements that can be executed across databases in the middle of SQL (detailed explanation of the case)
- Pytest 可视化测试报告之 Allure
- 2022-07-04: what is the output of the following go language code? A:true; B:false; C: Compilation error. package main import 'fmt' func
- Wechat reading notes of "work, consumerism and the new poor"
- 【uniapp】uniapp开发app在线预览pdf文件
- 正则替换【JS,正则表达式】
- 使用canal配合rocketmq监听mysql的binlog日志
- Generate XML elements
- Learning path PHP -- phpstudy "hosts file does not exist or is blocked from opening" when creating the project
- Shell 编程核心技术《三》
猜你喜欢
随机推荐
启牛开的证券账户安全吗?
大div中有多个div,这些div在同一行显示,溢出后产生滚动条而不换行
Detailed explanation of issues related to SSL certificate renewal
小发猫物联网平台搭建与应用模型
Scala basic tutorial -- 12 -- Reading and writing data
LM10丨余弦波动顺势网格策略
[opencv introduction to mastery 9] opencv video capture, image and video conversion
IBM WebSphere MQ检索邮件
《看完就懂系列》字符串截取方法substr() 、 slice() 和 substring()之间的区别和用法
信息学奥赛一本通 1336:【例3-1】找树根和孩子
资料下载 丨首届腾讯技术开放日课程精华!
测试工程师如何“攻城”(下)
正则替换【JS,正则表达式】
2022 ByteDance daily practice experience (Tiktok)
完善的js事件委托
奥迪AUDI EDI INVOIC发票报文详解
建立自己的网站(15)
1672. Total assets of the richest customers
The 300th weekly match of leetcode (20220703)
数组中的第K个最大元素






![[uniapp] uniapp development app online Preview PDF file](/img/11/d640338c626249057f7ad616b55c4f.png)

