当前位置:网站首页>Lm09 Fisher inverse transform inversion mesh strategy
Lm09 Fisher inverse transform inversion mesh strategy
2022-07-02 04:41:00 【Squirrel kuanke】
Quantitative strategy development , High quality community , Trading ideas sharing and other related contents
Hello everyone , Heterogeneity in current period CTA( Alternative communities ) The community continues to bring a series of grid strategies .
There were a lot of materials in the last issue ( grid ) The study of , Released LM08 Grid reversal strategy of grid series . In this issue, we continue to publish the grid strategy content of the previous research grid , In this issue, we have abandoned the grid logic of price , Instead, try to use the logic of periodic fluctuation index . What do you mean by that ? As shown in the figure below :
The content of this strategy comes from the heterogeneous community “ Quantitative research on heterogeneous communities ” One of the contents . As we can see from the picture above , The index algorithm is a kind of oscillation index similar to mean regression ( Later, try to use it for arbitrage and so on ), And RSI and KD The logic of moving average and price difference is completely different .
One 、 Strategic logic
The strategy logic consists of three parts :
1、 Take the derivative of the data to whiten the spectrum .
2、 Limit the amplitude swing of the derivative , Glass volatility from time composition
3、 Integrate the limited waveform , Smoothing filter , Act as an integrator . Then the integral recreates the data waveform , As a zero mean with smoothing index .
Did you listen a little confused ? Today I will tell you something about academic , A official account in Sichuan Province is always full of strange things , Dislike that we have too much dry goods , Too little academic .
Spectral albinism (Spectral Whitening) It is a common method of seismic exploration data processing , It can broaden the spectrum of the signal and improve the signal resolution , It's a kind of “ Pure amplitude ” Filtering process .
The above sentence is : Noise reduction 、 wave filtering
So why do you do this ? From the perspective of machine learning , The purpose of whitening is to remove the redundant information of input data . Suppose the training data is an image , Due to the strong correlation between adjacent pixels in the image , So the input is redundant for training ; The purpose of whitening is to reduce the redundancy of input .
Input data set X, After whitening , The new data X' It satisfies two properties :
(1) The correlation between features is low ;
(2) All features have the same variance .
We all know PCA For dimensionality reduction . Actually PCA You can also find eigenvectors , And then the data X Map to the new feature space , Such a mapping process , In fact, it satisfies the first property of our albinism : Remove correlation between features . Therefore, the implementation process of whitening algorithm , The first step is PCA, Find... In the new feature space X The new coordinates of , Then, the variance of the new coordinates is normalized .
The mathematical derivation is as follows :
For example, for any matrix X, Find the covariance , The resulting covariance matrix cov(X) Not necessarily a unit matrix ( Diagonal matrix );( Be careful : Covariance matrix is a symmetric matrix , But not necessarily a diagonal matrix )
Matrix whitening is to find a transformation matrix P, bring Y=PX The covariance matrix of cov(Y) It's a unit array ( Diagonal matrix ). Because after whitening the matrix , Covariance is a diagonal matrix ( Unit matrix ), So it represents the matrix Y Each vector of ( Whether a vector is a column vector or a row vector depends on the covariance cov(X)=XXT still XTX To judge ) There is no correlation between them . Or say , The purpose of matrix whitening is to make the variance of the transformed matrix vector the same after transformation ( Because it's a unit matrix ) So how do I find this transformation matrix P Well ?
For matrices X, Its covariance matrix cov(X)=XXT
Not necessarily a diagonal matrix , But for the real symmetric covariance matrix, there can be the following eigenvalue decomposition : See 【 Eigenvalue decomposition 】
cov(X)=QΛQT
Among them Λ
Is a diagonal matrix composed of eigenvalues ,Q Is the corresponding eigenvector , It's an orthogonal matrix . Now we have to find the linear transformation matrix P, bring Y=PX
The covariance matrix of can be a unit matrix , namely
cov(Y)=YYT=PX(PX)T=PXXTPT=Pcov(X)PT=E( Unit matrix )
Now make P=Λ−1/2QT( The open root of a matrix is the open root of each element ), So there are
cov(Y) =Pcov(x)PT
=Λ−1/2QTQΛQT(Λ−1/2QT)T
=Λ−1/2QTQΛQTQΛ−1/2
=Λ−1/2ΛΛ−1/2=E
( because Q It's an orthogonal matrix , namely QQT=E)
So when P=Λ−1/2QT when , You can make Y=PX The covariance matrix of is the unit matrix ( Diagonal matrix ).
therefore , After whitening , matrix Y Each vector of ( Column vector or row vector is determined according to the above ) There is no correlation between them .
In the third step , We're talking about integrating restricted waveforms … Then the integral recreates the data waveform ,ZCA Albinism is in PCA On the basis of albinism , Another operation for processing . The specific implementation is to put the above PCA The result of albinism , And then change to the coordinates under the original coordinate system :
The code is as follows :
In this strategy , We have stop loss protection for bulls , It is found that in this mean reversion oscillation algorithm test , You can't add stop loss to a certain extent , Otherwise, no one can do it .
The logic is as follows :
Two 、 visualization
T_long
CJ_short
SR_long
Nr_short
In fact, the main usage is in the oscillation algorithm of Fisher inverse transform we have built , Look for reverse signal points similar to mean regression .
Specifically, the algorithm , I already shared it in the heterogeneous community last month , You can read the original text or my translated articles in detail .
3、 ... and 、 The performance of
5 Combinations of varieties
I eliminated Soybean meal 、 Rubber and other varieties due to historical market reasons , for example : The rubber fell 10 year , Natural bears are definitely better . Bulls in general . Choose the varieties that are always in the concussion type .
T
In fact, the most satisfactory thing is the performance and results of national debt , This piece has been rolled 2 In addition to the samples of treasury bonds in the second half of the year , It still conforms to the valid range of the parameter . Previously, we used the logic of trend or band to find the strategy of treasury bonds , There have been no research results . This time it was a compensation .
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 .
边栏推荐
- Let genuine SMS pressure measurement open source code
- Shenzhen will speed up the cultivation of ecology to build a global "Hongmeng Oula city", with a maximum subsidy of 10million yuan for excellent projects
- 二叉树解题(一)
- Pytoch --- use pytoch to predict birds
- [graduation season · advanced technology Er] young people have dreams, why are they afraid of hesitation
- Let正版短信测压开源源码
- One click generation and conversion of markdown directory to word format
- Unit testing classic three questions: what, why, and how?
- 60后关机程序
- Realize the function of data uploading
猜你喜欢
UNET deployment based on deepstream
Playing with concurrency: what are the ways of communication between threads?
Pytoch --- use pytoch for image positioning
Vmware安装win10报错:operating system not found
Leetcode- insert and sort the linked list
Realize the function of data uploading
Online incremental migration of DM database
Thinkphp Kernel wo system source Commercial Open source multi - user + multi - Customer Service + SMS + email notification
Deep understanding of lambda expressions
idea自动导包和自动删包设置
随机推荐
FAQ | FAQ for building applications for large screen devices
Alibaba cloud polkit pkexec local rights lifting vulnerability
DJB Hash
Wechat applet JWT login issue token
C - derived classes and constructors
Idea automatic package import and automatic package deletion settings
Solution of DM database unable to open graphical interface
二叉树解题(一)
Unit testing classic three questions: what, why, and how?
Summary of main account information of zhengdaliu 4
Interview question: do you know the difference between deep copy and shallow copy? What is a reference copy?
Win10 disk management compressed volume cannot be started
UNET deployment based on deepstream
Pytoch --- use pytoch to realize u-net semantic segmentation
Yolov5 network modification tutorial (modify the backbone to efficientnet, mobilenet3, regnet, etc.)
Promise all()
One step implementation of yolox helmet detection (combined with oak intelligent depth camera)
Is it safe to open an account with first venture securities? I like to open an account. How can I open it?
cookie、session、tooken
Federal learning: dividing non IID samples according to Dirichlet distribution