当前位置:网站首页>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 .
边栏推荐
- 【ClickHouse】How to create index for Map Type Column or one key of it?
- Binary tree problem solving (2)
- Federal learning: dividing non IID samples according to Dirichlet distribution
- Free drawing software recommended - draw io
- LeetCode-归并排序链表
- Its appearance makes competitors tremble. Interpretation of Sony vision-s 02 products
- Learn AI safety monitoring project from zero [attach detailed code]
- Social media search engine optimization and its importance
- Flag bits in assembly language: CF, PF, AF, ZF, SF, TF, if, DF, of
- WiFi 5GHz frequency
猜你喜欢

Gin framework learning code

How much can a job hopping increase? Today, I saw the ceiling of job hopping.

6月书讯 | 9本新书上市,阵容强大,闭眼入!

Summary of main account information of zhengdaliu 4

Playing with concurrency: what are the ways of communication between threads?

What methods should service define?

2022-003arts: recursive routine of binary tree

CorelDRAW Graphics Suite2022免费图形设计软件
![Learn AI safety monitoring project from zero [attach detailed code]](/img/a9/cb93f349229e86cbb05ad196ae9553.jpg)
Learn AI safety monitoring project from zero [attach detailed code]

CorelDRAW graphics suite2022 free graphic design software
随机推荐
Mapping location after kotlin confusion
Thinkphp Kernel wo system source Commercial Open source multi - user + multi - Customer Service + SMS + email notification
Exposure X8标准版图片后期滤镜PS、LR等软件的插件
正大美欧4的主账户关注什么数据?
Ognl和EL表达式以及内存马的安全研究
Solution of DM database unable to open graphical interface
万卷共知,一书一页总关情,TVP读书会带你突围阅读迷障!
What are the rules and trading hours of agricultural futures contracts? How much is the handling fee deposit?
geotrust ov多域名ssl證書一年兩千一百元包含幾個域名?
Unity particle Foundation
Ruby replaces gem Alibaba image
WiFi 5GHz frequency
Spring moves are coming. Watch the gods fight
Pit encountered in win11 pytorch GPU installation
Pytoch --- use pytoch to realize u-net semantic segmentation
Cache consistency solution - how to ensure the consistency between the cache and the data in the database when changing data
二叉树解题(二)
Dare to go out for an interview without learning some distributed technology?
【提高课】ST表解决区间最值问题【2】
Play with concurrency: what's the use of interruptedexception?