je-suis-tm / graph-theory

Julia and Python complex system applications in ecology, epidemiology, sociology, economics & finance; network science models including Bianconi-Barabási, Barabási-Albert, Watts-Strogatz, Waxman Model & Erdős-Rényi; graph theory algorithms involving Gillespie, Bron Kerbosch, Ramsey, Bellman Ford, A*, Kruskal, Borůvka, Prim, Dijkstra, DSatur, Randomized Distributed, Vizing, Topological Sort, DFS, BFS
https://je-suis-tm.github.io/graph-theory
Apache License 2.0
346 stars 90 forks source link

graph theory portfolio #2

Closed waudinio27 closed 8 months ago

waudinio27 commented 3 years ago

Hola je-suis-tm! Cómo estás?

I came to your page because of the Monte Carlo simulation project - which is really funny :-)

Could you show one day whenever it suits you how one can use the clique centrality for trend following? This would be fascinating.

Muchas gracias y saludos

je-suis-tm commented 3 years ago

Olá, waudinio27, bem, e tu?

Sorry for the late reply. I assume this is a conceptual question for brainstorming. Could you please elaborate more on clique centrality for trend following? Clique centrality is merely a measurement of which asset exhibits the most correlations with others. It gives us some hints of who is the vital asset inside our portfolio but it is no leading or lagging indicator for trend following. Maybe I am missing something so I am open to your thoughts.

T.M.

waudinio27 commented 3 years ago

Olá je-suis, está tudo bem - e obrigado por perguntar!

Your answer is correct. It is a more philosophical question to do a brainstorming.

I was revering to this page: http://jonathankinlay.com/2019/09/applications-graph-theory-finance/

And there to this part in particular - We might, for example, explore the relative performance of members of this sub-group over time and perhaps investigate whether relative out-performance or under-performance is likely to persist, or, given the correlation characteristics of this group, reverse over time to give a mean-reversion effect.

Have a look at it, maybe it can give you some insights to my thinking.

In the end one would need to take the degeneracy ordering or the clique centrality - depending on the preference - and perform a link prediction on the next biggest movements of the subgroup that will happen in the steps ahead. In the end like this it will turn itself into a GNN - Graph Neural Network. A trend following system can be built out of this that will process the information of the whole market and enters only into the most promising positions or assets of the subgroup.

I hope my thoughts make some sense to you ;-)

Best regards and keep up your interesting research!

je-suis-tm commented 3 years ago

We might, for example, explore the relative performance of members of this sub-group over time and perhaps investigate whether relative out-performance or under-performance is likely to persist, or, given the correlation characteristics of this group, reverse over time to give a mean-reversion effect.

In the end one would need to take the degeneracy ordering or the clique centrality - depending on the preference - and perform a link prediction on the next biggest movements of the subgroup that will happen in the steps ahead. In the end like this it will turn itself into a GNN - Graph Neural Network. A trend following system can be built out of this that will process the information of the whole market and enters only into the most promising positions or assets of the subgroup.

Oulala, this is a very interesting idea. It does inspire me to do some exploring work, e.g. how different spatial structures of a subgroup can impact the portfolio performance (correlation characteristics). Well, I don't have enough knowledge in GNN but I will certainly look into it. Besides the topological features, time dependent properties of a graph (something like predicting a link or its weight between nodes) is also worth investigating. Many thanks for the conversation! A lot of research opportunities ahead. I will ping you if I really come up with some concrete result.

T.M.

waudinio27 commented 3 years ago

Perfect!

Here are some ideas as an inspiration to start your journey :-D

https://www.investopedia.com/articles/fundamental-analysis/09/intermarket-relations.asp

HATS: A Hierarchical Graph Attention Network for Stock MovementPrediction: https://arxiv.org/pdf/1908.07999.pdf

A transformer model that generates a prediction for every input column with the help of a graph with tf.reset_default_graph(): https://github.com/marvin-hansen/Stock-Prediction-Models/blob/master/deep-learning/20.only-attention.ipynb

M.