Forex triangular arbitrage
watsonjr last edited by
I want to develop a backtest for the well known forex triangle (path) arbitrage strategy, e.g.:
I am still relatively new to Backtrader (and algorithmic trading): I can see how one can purchase and hold certain currency pairs, but I cannot see how these trades converts into ownership of foreign currency, with which to continue the arbitrage path.
So, more specifically, can any of you let me know how to code:
buy a foreign currency (and see how much of that currencies I hold)
purchase other foreign currencies using a chosen currency that I hold (i.e. not always USD).
For example, I know how to purchase USD/EUR and then sell it, but I don’t know how to buy EUR using USD, and then use that EUR to buy GBP say.
Thanks so much