kaizen-ai / kaizenflow

KaizenFlow is a framework for Bayesian reasoning and AI/ML stream computing
GNU General Public License v3.0
111 stars 77 forks source link

Implement Avellaneda model #3

Open gpsaggese opened 1 year ago

gpsaggese commented 1 year ago

Specs at: https://docs.google.com/document/d/1ELLDf7dg3nli6nLYMpQ9IxuTW5dYdN15nluNCZbZmD4/edit#heading=h.4roctfx0ehs6

gpsaggese commented 1 year ago

Assigned to @aryananwar Let's improve the specs in the gdoc

gpsaggese commented 1 year ago

Assigned also to @aniketnayak

This is project has lots of tasks so we will split / coordinate among the team members.

aniketnayak commented 1 year ago

Is there a name for the equation (1) shown on page 2 of the Avellaneda paper? I'm looking to understand more about that system. I'm confused as to how that equation was derived and what the role of Xt (the residual) is.

Also, should I ask questions here or on another platform?

gpsaggese commented 1 year ago

This forum is perfect.

Eq (1) is saying that the log price of P and Q are "co-integrated", which means that they differ only by a drift (the \alpha term) and some stationary noise X_t. IIRC the notion of co-integration is one of the results that Granger won the Nobel prize for. Without referring to complicated I(1) stationarity etc. the intuition is that the two time series "move together". @gitpaulsmith can probably talk at length about this differential stochastic equation. The whole idea of this paper is to generalize pair trading where two assets (e.g., Coca Cola and Pepsi Cola) move together. So Avellaneda wants to find which linear combination of assets are out of balance, given they typically move together, since the equation (1) says that the prices will converge somehow and so one can trade ahead of this.

If the team on this paper is interested we can do a Zoom call going over the paper to discuss the math.

In practice implementing the paper is much simpler than all the math to justify why and how the result holds.

I've googled around and have found a few implementations that can help you focus on the meaning of the paper.

Some reference for implementations

aniketnayak commented 1 year ago

Thanks for the explanation and resources. The first link really helped me understand the main ideas of the paper.

If @aryananwar is interested as well, I think a Zoom call would be great to clarify the main math concepts, and it would help us get to implementing the paper quicker.

aryananwar commented 1 year ago

That sounds good to me, whenever you guys would like to schedule a meeting works for me!

On Mon, Feb 6, 2023 at 7:41 PM aniketnayak @.***> wrote:

Thanks for the explanation and resources. The first link really helped me understand the main ideas of the paper.

If @aryananwar https://github.com/aryananwar is interested as well, I think a Zoom call would be great to clarify the main math concepts. I think that would help us get to implementing the paper quicker.

— Reply to this email directly, view it on GitHub https://github.com/sorrentum/sorrentum/issues/3#issuecomment-1419995899, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARKM67OFVUYKMRZOCOJ3YNDWWGK3XANCNFSM6AAAAAAURPTCP4 . You are receiving this because you were mentioned.Message ID: @.***>

DanilYachmenev commented 1 year ago

probably obsolete, moving to P1 for now