Forums  > Trading  > A Bayesian Filtering Theory Based Approach to Algorithmic Trading, Pairs Trading and Relative Value Trading.  
     
Page 1 of 1
Display using:  

amin


Total Posts: 301
Joined: Aug 2005
 
Posted: 2021-06-19 11:18
For Pairs trading and relative value trades, we model mean-reversion parameter as a slowly moving hidden parameter that is dynamically filtered using our approach and greatly helps in automated trading decision making. Read here:
https://lnkd.in/efgH5qS

For general Statistical trading read my views here:
https://lnkd.in/ekEQGTX

How to calibrate the filter in presence of heteroscedastic volatility, please read here:
https://lnkd.in/e-mxTsz

If you want me to help with algorithmic trading using bayesian filtering theory or with other problems in quantitative trading or option pricing and risk management, please feel free to contact me trough linkedin or email me at anan2999(at)yahoo(dot)com

amin


Total Posts: 301
Joined: Aug 2005
 
Posted: 2021-06-24 12:16
A Bayesian Kalman Filtering Theory Based Approach to Divergence Between Realized Returns and Theoretical Returns of a Stock( as Predicted by Orthogonal factors or PCA). New Research in Algorithmic Trading.

I believe trading is about relative value and in "market" we have to put dynamics of every financial asset in context relative to each other or relative to a common market. As a start, we suppose that market is defined by a certain number of orthogonal factors. But in general the realized return of the stock after (accumulation over) T intervals R(T) would not be equal to theoretical projected return calculated from orthogonal factor returns due to factor misspecification of factors or due to idiosyncratic factors. Usually many stocks would remain within a very small error limit from the theoretical projected returns but some few stocks would seriously start to diverge from the theoretical projected returns. We precisely want to find the dynamics of stocks that are diverging from the theoretical projected returns(in either direction) and try to capture the dynamics of this divergence of returns.
Read my post here:
https://lnkd.in/ekuSf-i

If you want my help with algorithmic trading using bayesian Kalman filtering theory or with other problems in quantitative trading or option pricing and risk management, please feel free to contact me trough linkedin or email me at anan2999yahoocom

amin


Total Posts: 301
Joined: Aug 2005
 
Posted: 2021-06-25 05:34
https://lnkd.in/ekuSf-i

In my post above What I have suggested has been reviewed in slightly different mathematical framework especially by Dr. Marco Avellaneda in one of his papers on pairs trading. I have not read his paper for years but I think when I was brainstorming about pairs trading with kalman filtering, many of the ideas I learnt in his paper were getting processed in back of my brain. Here is link to his paper that where he gives the concept of eigenportfolio returns which I have called theoretical expected return in previous post: https://www.math.nyu.edu/~avellane/AvellanedaLeeStatArb071108.pdf
I think my contribution is that I presented mean-reversion in a kalman filtering framework. I think uses of this Kalman filtering application to find dynamics of divergence between eigenportfolio returns and actual realized return go beyond pairs trading and can be used in many other types of algorithmic trading strategies. And it is also not limited to equities.

amin


Total Posts: 301
Joined: Aug 2005
 
Posted: 2021-06-30 05:12
A Bayesian Kalman Filtering Approach to filtering drift (due to market supply and Demand Imbalance) While Taking into account Mean-reversion towards a time dependent Target.

In many financial markets, we have a time changing drift in prices of financial assets due to changing supply and demand imbalance pressure on the asset prices but on the longer run we have a mean-reversion towards a theoretical time dependent target price. We can model the changing drift due to supply and demand imbalance as a hidden variable whose dynamics are given by another SDE and dynamics of this hidden variable are found by kalman filtering. Since our dynamics of drift are multivariate, we would be collecting a lot of information about drift of a particular asset from cross-section of market drift of other correlated financial assets. Mean-reversion parameter would also be slowly changing with time but we do not give it any hidden dynamics and only change its value when we recalibrate/re-optimize the model possibly after every hour/every few hours/every day.
Please read here (post 1176):https://lnkd.in/ed7K74e

amin


Total Posts: 301
Joined: Aug 2005
 
Posted: 2021-07-07 04:17
For the context please read previous posts here: https://forum.W****tt.com/viewtopic.php?f=4&t=99702&p=867150#p867150

Friends, I want to share my "little secret algorithm" that I used to make money as I mentioned in the previous post (If it were in my powers, I would give everyone money equal to Jeff Bezos' wealth)
First some background. I have been of the view that there are three types of markets
a. market that hovers around in a certain band. A much better and scientific definition of this market is that it has negative auto-correlation between logarithmic stock returns (log price differences).
b. Positive autocorrelation with positive drift.
c. Positive autocorrelation with negative drift.

I was able to handle the markets where autocorrelation between returns is negative with a very simple algorithm. You do not need very high negative correlation for the algorithm to work. It would work great when market has autocorrelation coefficient on regression lesser than -.025. For autocorrelation coefficients on regression below -.05, the method would work wonders. For this you do not use autocorrelation on filtered returns but on realized returns.
I took trading signals from Kalman filtered returns and not from realized returns even though autocorrelation was measured on realized returns. In my filter, I had arbitrarily divided the variance between brownian motion associated with hidden process and brownian motion associated with observation process (that is realized returns). I will post my filter matlab algorithm later today or possibly tomorrow. I had noticed how you divide the variance between two brownian motions affects the quality and profits of the algorithm quite a bit.
Coming to the algorithm, when filtered value of log returns would exceed +.0001 (this can be altered but it was a great benchmark value probably since it was log difference. Please note that this value was from filtered returns and not realized returns.), I would go short and end the trade by buying when I would encounter another negative return of -.00008. And similarly when I would encounter a negative log return of value -.0001, I would buy the stock only to end the trade by selling when I encounter a return of +.00008. As long as the correlation coefficient on regression on previous values remains negative, this algorithm works wonders. Sorry I forgot to mention that all logarithmic returns are on 15 seconds interval. As long as regression coefficient on autocorrelation regression remains even mildly negative the algorithm makes good profits. I was playing with returns that are differences of log prices.
However the algorithm has pitfalls that I wanted to fix in my later research. When stock price moves consistently in a certain direction in episodes of sentiment, the algorithm loses big money. This can be fixed by making stop loss so algorithm ends the trade when stock moves significantly in a certain direction. I wanted to find out from the market cross-section about episodes of sentiment in the market to be able to trade on sentiment appropriately and differently but that is only future research. For the two month time period I had AMZN had great profits in "log difference" terms since this stock had larger negative auto-correlation between log returns during most of this period. "TSLA" was second with large profits. AAPL also had nice profits. Only "MSFT" had small profits since its autocorrelation was most positive of all four stocks and it had more bursts of sentiment and correlated activity. I still think that even MSFT can be very profitably traded but for that to do, you would need to know about intervals of sentiment in the market possibly from market cross-section data.
I will post my filter matlab algorithm later today or possibly tomorrow but I will not include the whole trade setup.
Previous Thread :: Next Thread 
Page 1 of 1