For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

Forex triangular arbitrage

  • Hi Everyone

    I want to develop a backtest for the well known forex triangle (path) arbitrage strategy, e.g.: arbitrage is a risk,the short window they exist.

    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:

    1. buy a foreign currency (and see how much of that currencies I hold)

    2. 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


Log in to reply