当前位置:网站首页>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 .
边栏推荐
- 在线SQL转Excel(xls/xlsx)工具
- [mathematical basis of machine learning] (I) linear algebra (Part 1 +)
- 其他InterSystems %Net工具
- The CDC of sqlserver can read the data for the first time, but it can't read the data after adding, deleting and modifying. What's the reason
- [uniapp] uniapp development app online Preview PDF file
- Shell 編程核心技術《四》
- 2021 Hefei informatics competition primary school group
- A method of using tree LSTM reinforcement learning for connection sequence selection
- 2022健康展,北京健博会,中国健康展,大健康展11月13日
- Guys, for help, I use MySQL CDC 2.2.1 (Flink 1.14.5) to write Kafka and set
猜你喜欢
千万不要只学 Oracle、MySQL!
用实际例子详细探究OpenCV的轮廓绘制函数drawContours()
小发猫物联网平台搭建与应用模型
Build your own website (15)
Safer, smarter and more refined, Chang'an Lumin Wanmei Hongguang Mini EV?
LeetCode第300场周赛(20220703)
[发布] 一个测试 WebService 和数据库连接的工具 - DBTest v1.0
Scala basic tutorial -- 17 -- Collection
A method of using tree LSTM reinforcement learning for connection sequence selection
从实时应用角度谈通信总线仲裁机制和网络流控
随机推荐
性能优化之关键渲染路径
Is the securities account opened by qiniu safe?
2022CoCa: Contrastive Captioners are Image-Text Fountion Models
Using FTP
与二值化阈值处理相关的OpenCV函数、方法汇总,便于对比和拿来使用
在线文本行固定长度填充工具
Wireshark网络抓包
Torchdrug tutorial
指定输出的字符集
读写关闭的channel是啥后果?
The CDC of sqlserver can read the data for the first time, but it can't read the data after adding, deleting and modifying. What's the reason
测试工程师如何“攻城”(下)
2021 Hefei informatics competition primary school group
redis分布式锁的8大坑总结梳理
The latest progress of Intel Integrated Optoelectronics Research promotes the progress of CO packaging optics and optical interconnection technology
从实时应用角度谈通信总线仲裁机制和网络流控
Wechat reading notes of "work, consumerism and the new poor"
Is Guoyuan futures a regular platform? Is it safe to open an account in Guoyuan futures?
node_exporter部署
每日一题(2022-07-02)——最低加油次数