Financial Time Series Analysis using Wavelets

  Рет қаралды 26,140

VoglData

VoglData

Күн бұрын

Пікірлер: 38
@guliyevshahriyar
@guliyevshahriyar 2 ай бұрын
seeing ``time-series", ``fourier analysis", ``wavelets", ``w-neural networks'' = i said, ooh lovely 🤓🤓🙌🙌
@vogldata
@vogldata 2 ай бұрын
@@guliyevshahriyar Let us talk about that lovely part again once we throw in the "look ahead bias" and "edge-effects" 😁🤣😭. However, I'm happy that you enjoy the content.
@hurstcycles
@hurstcycles Жыл бұрын
Excellent analysis Markus. One question on the interpretation of the time frequency analysis of log returns. The localisation in time is sharp but the frequency information diffuse. Is it a case of making the assumption that if *any* significant frequency information is obtained at any timepoint that can be interpreted as indicative of predictability? Rather than trying to tune the uncertainty principle by adjusting wavelet parameters to focus in on specific frequencies while accepting some smearing in time?
@vogldata
@vogldata Жыл бұрын
So this question has several dimensions. First, the CWT you see there is done with raw log returns. This was one of my first videos, so I didn't know better. Now, if you denoise (e.g. by cascading wavelet filter) the returns before calculating CWT, you get a clear and distinct picture. You'll see the frequency spikes before and during crises. Take a look at my Hurst dynamics paper for that visualisation (doi.org/10.1016/j.chaos.2022.112884 ). So the rest is just coloured noise disrupting the picture. So the optimisation of uncertainty is done by Dr Berghorn (DOI 10.1080/14697688.2014.941912). In terms of predictions, it is complicated. You can get information, however, the problem with wavelet in trading is look ahead bias and edge effects. See here: doi.org/10.1016/j.jhydrol.2018.05.003 Hope this helps :)
@HKHasty
@HKHasty 2 жыл бұрын
As I lover of physics, I especially liked the Heisenberg principle reference.
@vogldata
@vogldata 2 жыл бұрын
I also like the concept of it. Yet it yields a bitter taste since it represents an upper limit of resolution, thus the maximum capability boundary of the wavelet methods. In the future we will explore EMDs and VMDs though. :)
@eladwarshawsky7587
@eladwarshawsky7587 3 жыл бұрын
So in financial prediction it's important to only calculate the wavelet transform locally (in segments of "x" length), so as to make sure that the shifting/scaling does not create data leakage?
@vogldata
@vogldata 2 жыл бұрын
I am really sorry for the very late response. A wavelet function is locally bounded, thus, it can be shifted through the signal iteratively by means of translation and dilation. Therefore different resolutions of the time frequency domain are obtained. Problems can be found at the respective borders of the signal. At the ends of the signal overlapping effects may occur and need to be respected as well as be accounted for. Hope this helps :)!
@mentalistize
@mentalistize 2 жыл бұрын
The intresting thing would be creating a strategy based on non linear stochastic wavelet like a mathematician on arxiv made.
@vogldata
@vogldata 2 жыл бұрын
Yes indeed, that is a very intriguing conception. Thus, it would require the definition of a valid customised wavelet, which is not trivial at best. Therefore achieving a realisation is a respectable accomplishment. Another solution is including random times as stated by Yang and Wang (2021), proposing different wavelet network approaches to determine energy series. doi.org/10.1016/j.eswa.2020.114097 All the best, Markus
@gabriellara7456
@gabriellara7456 2 жыл бұрын
Awesome work. Do you have a website containing links and references to your articles and thesis?
@vogldata
@vogldata 2 жыл бұрын
You can find my paper on WNNs here: doi.org/10.1016/j.mlwa.2022.100302 My other papers are here: papers.ssrn.com/sol3/cf_dev/AbsByAuth.cfm?per_id=2905561 My PhD thesis is in its final stage and soon be ready. My website is vogl-datascience.de/
@franzmoser9739
@franzmoser9739 3 жыл бұрын
Not bad! On the last slide you mixed up HP- and LP-Filter with Approx. and Detail coefficients. Details are connected with HP and Approximations with LP
@vogldata
@vogldata 3 жыл бұрын
True, I mixed up the labels. You are right. Approximation coefficients belong to the LPs and detail coefficients to HPs respectively. Thanks for noticing :)
@FreeMarketSwine
@FreeMarketSwine 2 жыл бұрын
Is it possible to decompose the signal and train a separate model on each component and then recombine the predictions of the component models?
@vogldata
@vogldata 2 жыл бұрын
The two main approaches within the academic literature is either to feed a decomposition into a normal network topology or to feed a normal time series into a wavelet network, which subsequently decomposes the data. I am not sure in what degree your proposition varies from the latter wavelet network approach. Nonetheless, just try and test the performance, would be interesting to see a kind of 'time-layered' model based on scale coefficients.
@nirajpaija7310
@nirajpaija7310 4 жыл бұрын
How can we estimate fourier analysis in R?
@markusvogl3457
@markusvogl3457 4 жыл бұрын
Hey, sorry for the late response! You can find a quick start in R using FTs on this website: www.di.fc.ul.pt/~jpn/r/fourier/fourier.html Hope this will help. All the best!
@MlNECRAFT69
@MlNECRAFT69 7 ай бұрын
oh so i can just max decompose CWT any power of 2 set of return data, break that down into power, phase , or even just the coefficients as those alone are time/scale dependent, then just feed the 2 3d arrays of data into a combination of cnn and lstm custom architecture . i could feed that with the original signal for cross validation or whatever it called so the model can tie in frequency understanding, with M.I.N.N. kinda vibes or whatever and then like predict the future but like with the nice colors of your heatmap. its like extending the heatmap into time, shifting the focus of the CWT, performing a discretized iCWT with respect to the original order of decomposition so our resolution is perfecto r something nd yeah perfect
@vogldata
@vogldata 7 ай бұрын
Unfortunately, it's not that simple. Despite the Heisenberg uncertainty as a limit of resolution, there are other issues. For example, edge effects or look ahead biases at the end of the spectrum. However, this is the part we're mostly interested in. Nonetheless, compared to other models such as stochastic processes or GARCH methods, with a WNN you actually have consistent out-of-sample predictions that are halfway decent . Take a look at one of our recent papers: doi.org/10.1016/j.physa.2023.129397 Write me an email if you need the pdf file. PS: Furthermore, we have a book chapter in print. It contains a POC about predictive performance of AI/ML methods versus others. LSTM is one of the worst models for financial predictions.
@MlNECRAFT69
@MlNECRAFT69 6 ай бұрын
thanks a ton for responding. indeed every form of LSTM I've tried has been very poor at capturing the way price moves. i made heatmaps just like yours, continuous Morlet wavelet transform of return data in segments of 32x32 using days as my basis, each segment sequential, and the one after is the heatmap of the original data shifted forward by one day. My hypothesis is only really testable in time frames of between 0.5 and 2.5 minutes, but i havent figured out how to get price data minutely easily yet, at least not historical haha. I am under the impression that at a particular time frame ( or essentially a particular candle size ) holds the key to the multidimensional analysis of return series. Im not really college educated, just passionate and interested so pardon my tangent. But Ive seen the redundancy you mention when i make all these hundreds of heatmaps sequentially shifting forward one pixel, one day forward at a time. there are areas that dont change, bubbles of low energy shifting, and sitting still in spots even while the rest of the pixels are shifting. Its so brilliant to me. Ever since i saw your heatmap i knew there was something missing. So now i have a video of the heatmaps and i see really obvious areas that are redundant, while other areas and scale sets show patterns. The thing is, this extra dimension i kinda buffed in is only half of what i need. I still need to better understand the Heisenberg uncertainty, but I'm just a distracted sushi restaraunt worker haha. Imagine adding another dimension to my video of the heatmap shifting forward, and that dimension being the granularity of the return data's representation. Whether we use 1 minute points, 2, 5, 15, or even hours, or days like i am (just cause i was trying to speed run understanding things.) well if i had an arbitrary granularity slider that could morph the heatmaps representation and watch it shift over time, i could manually maybe find out some even newer really cool stuff. I got very distracted trying to embed the segment's return data values into the heatmaps images and use a dual modality convolutional lstm neural network i found another paper taklking about cause it had a github but I couldnt figure it out. then i started just feeding the heatmap images into a custom network for future frame predictions to see if my terrible cpu could learn something and predict 3 seconds of images at 20fps, and it actually did. Now im thinking im just going to try to learn more about heisenberg uncertainty and learn how to read papers better or more. I really appreciate you invigorating my old passion for math. Ive never felt such conviction before that i might find a novel approach. much love @@vogldata
@MlNECRAFT69
@MlNECRAFT69 6 ай бұрын
there is a particular segment size and representation granularity that hold the key and both of those things may be dependent on time itself as well maybe. so many possible angles of viewing this its SOO COOOOL :DDD
@vogldata
@vogldata 6 ай бұрын
@@MlNECRAFT69 So, since it is a large topic, I hope my answer can somehow satisfy your remarks. 1) The uncertainty principle of Heisenberg illustrates the upper limit of how granular the resolution of frequency to time can get. We cannot exceed it unfortunately. 2) Regarding the time scales, is "a hell of a topic" due to several reasons. a) Financial series are mostly multifractal and scaling, this means they act mostly similar on different time scales in a persistent manner. However, an encompassing analysis of this is currently still a gap. b) Asymmetry. It is caused by the time intervals we humans defined for financial price evolutions, i.e., hourly, daily. These are symmetrical or evenly large time distances leading to a constancy in "reading the data". This causes asymmetry. If you regard clock times or intra-trade durations, you get a wholly different set of characteristics. Yet, also almost a gap in the literature. 3) Clusters of significant frequencies. a) If you filter noise from the financial series (not done in the video), the CWT mostly only highlights significant levels of frequencies during all scales, which are localised during crises periods and none outside of these periods. This means crises and frequencies are related. The rest is (you guess it) a gap again. In my Hurst paper, I found that these shifts in frequency even occurr on an averaged level too. 4) Wavelet networks. They can predict something out of sample at all, which is a win, I guess. Especially, compared to standard models. But it is not good enough to earn money yet... Disregarding the topology a WNN, it can create frequency based predictions, which are halfway decent but not a holy grail. If you just plug a standard NN you can trash the results immediately in almost all cases. These networks aren't able to/nor designed to display the complex data generating process of financial series. They even loose against naive predictions in some scenarios. 5) Trading these things. Take a look at the papers of Dr. Berghorn concerning momentum. 6) If you have more questions just write me an email.
@MlNECRAFT69
@MlNECRAFT69 6 ай бұрын
@@vogldata It couldn’t make money trading but it definitely will via selectively market making concentrated liquidity AMMs solely via predicting which ones are getting enough volume to outpay possible losses from the price exiting range on the downside. there many ways to use this to “make money” and all we must do is recognize constraints as best as possible, and you my friend have done this. I will email you with any little experiment or findings I come up with, I greatly appreciate you covering essentially everything I ever could have wanted to have answered. You’re like an oracle for me. I wish I was still in uni just to ask smart people questions. I greatly value your feedback beyond measure. Won’t ever forget how you inspired me my friend
@lukaszmajkowski
@lukaszmajkowski 4 жыл бұрын
very nice tut, how are your results ?:)
@vogldata
@vogldata 4 жыл бұрын
There are many interesting facts and figures emerging from the analysis and study of this respective field. Nevertheless, I can try to break it down into two statements. First, financial returns yield frequency information. Second, its nature is non-periodic. Speaking in terms of WNNs it is possible to deduct the analysis calculations following both stated ways. The determination of which topology in combination with what Wavelet function yields the best performance is still ongoing though. We will publish the results as a research paper in the near future.
@kasrasehat1376
@kasrasehat1376 3 жыл бұрын
@@vogldata was your paper published??
@vogldata
@vogldata 3 жыл бұрын
@@kasrasehat1376 Most of my papers are still under review, i.e. take lots of time to be published. Nonetheless, I am in the process of writing down my Ph.D. thesis, which has strong indications of primarily demonstrated frequency information. Additionally, after denoising the data the indications of frequency implying financial crisis via wavelet becomes imminent. Keep tuned, once things are done more books, papers and videos are planned for you guys :)!
@valor36az
@valor36az 4 жыл бұрын
Nice tutorial
@WahranRai
@WahranRai 4 жыл бұрын
Why not choosing synthetic voice for your presentation ?
@vogldata
@vogldata 4 жыл бұрын
Personally, I believe that doing the presentation in person is a sign of dedication and respect towards my audience. Even if, unlike the current lecture videos, the sound quality is not optimal.
@eugene-d
@eugene-d 3 жыл бұрын
What's wrong with the natural voice? A slight German accent makes it sound even more scientific ;-) Personally, I much dislike synth voice videos, they are too boring...
@abhishekpratapsingh4156
@abhishekpratapsingh4156 2 жыл бұрын
@@vogldata Hey, You're doing great! Don't use a synth voice. Also, Awesome presentation, and very insightful, Cheers!
@vogldata
@vogldata 2 жыл бұрын
@@eugene-d Working on that accent though xD ... Tanks for the comment. Yes, sync voice longer videos are not really appealing.
@vogldata
@vogldata 2 жыл бұрын
@@abhishekpratapsingh4156 Thank you very much for the positive feedback. I am still only making videos recorded by myself. I am convinced that sync voice is diminishing quality. Especially, since we fixed the recording quality in the latest videos.
Wavelets: a mathematical microscope
34:29
Artem Kirsanov
Рет қаралды 636 М.
龟兔赛跑:好可爱的小乌龟#short #angel #clown
01:00
Super Beauty team
Рет қаралды 13 МЛН
Running With Bigger And Bigger Lunchlys
00:18
MrBeast
Рет қаралды 137 МЛН
My Daughter's Dumplings Are Filled With Coins #funny #cute #comedy
00:18
Funny daughter's daily life
Рет қаралды 30 МЛН
Бенчик, пора купаться! 🛁 #бенчик #арти #симбочка
00:34
Симбочка Пимпочка
Рет қаралды 3,1 МЛН
Wavelets and Multiresolution Analysis
15:12
Steve Brunton
Рет қаралды 142 М.
Stéphane Mallat: A Wavelet Zoom to Analyze a Multiscale World
46:43
The Abel Prize
Рет қаралды 20 М.
Time Frequency Analysis & Wavelets
51:46
Nathan Kutz
Рет қаралды 90 М.
Detrending and deseasonalizing data with fourier series
12:16
The Wavelet Transform for Beginners
14:14
Andrew Nicoll
Рет қаралды 167 М.
Ingrid Daubechies: Wavelet bases: roots, surprises and applications
45:52
龟兔赛跑:好可爱的小乌龟#short #angel #clown
01:00
Super Beauty team
Рет қаралды 13 МЛН