Automated Currency Arbitrage

Discussion in 'Automated Trading' started by Radarcontact, Jan 24, 2022.

  1. #11     Jan 25, 2022
  2. Thanks for explaining. I'm not trolling. Trying to learn.
     
    #12     Jan 25, 2022
  3. Here's a scrape of that page
    Code:
    {"USD_JPY": "89.1429750", "USD_USD": "1.0000000", "JPY_EUR": "0.0085736", "BTC_USD": "126.7888830", "JPY_BTC": "0.0000916", "USD_EUR": "0.6768007", "EUR_USD": "1.2169689", "EUR_JPY": "124.6882453", "JPY_USD": "0.0110213", "BTC_BTC": "1.0000000", "EUR_BTC": "0.0106548", "BTC_JPY": "12978.8979972", "JPY_JPY": "1.0000000", "BTC_EUR": "93.5226992", "EUR_EUR": "1.0000000", "USD_BTC": "0.0072229"}
    Well for a start according to Google USDJPY is currently 113.90; not 89.14. It hasn't been at that level for 10 years. Similarly JPYUSD is 0.0088 not 0.0110213.

    And BTCUSD certainly isn't 126.78! That's also a very old price. I don't know where they got these figures from, it doesn't look like an official page since it only contains raw text, maybe it's something they use for testing - randomly generated figures, which they don't seem to have defined to be consistent with each other (eg if USDJPY really was 89.142975 then JPYUSD should be 0.011212).

    PS I just scraped the page again, and got this:

    Code:
    {"USD_JPY": "88.9302529", "USD_USD": "1.0000000", "JPY_EUR": "0.0085893", "BTC_USD": "126.1388064", "JPY_BTC": "0.0000917", "USD_EUR": "0.6751856", "EUR_USD": "1.2239066", "EUR_JPY": "125.3990728", "JPY_USD": "0.0110416", "BTC_BTC": "1.0000000", "EUR_BTC": "0.0107155", "BTC_JPY": "12912.3521224", "JPY_JPY": "1.0000000", "BTC_EUR": "93.0431863", "EUR_EUR": "1.0000000", "USD_BTC": "0.0072057"}
    I'm fairly sure USDJPY hasn't moved by one big figure in 2 minutes, so that strongly suggests that these are just garbage random numbers.

    GAT
     
    #13     Jan 25, 2022
  4. And the mystery is solved - it's a game!

    https://priceonomics.com/jobs/puzzle/

    "In this puzzle you'll be working in a market where prices are independent of supply and demand. Also, the currency exchange broker is a close friend of ours, so all trading costs are waived.

    Your job is to write a program that efficiently finds the best arbitrage opportunities.

    To access real-time exchange rates, use our API:

    http://fx.priceonomics.com/v1/rates/

    Output will look like the JSON below, where USD_JPY is the quantity of JPY that you can purchase for 1 USD.

    {
    USD_JPY: "95.7422091",
    USD_USD: "1.0000000",
    JPY_EUR: "0.0080872",
    BTC_USD: "105.5641218",
    ...
    }

    These are not real actual market prices; we've set them algorithmically. They change every second and contain both a periodic and noise component to them. You only have to pull the data once per run of your algorithm."

    So these are artifical prices deliberately set up to include arbitragable opportunities.... I'm curious how you got this web link without understanding the context?

    GAT
     
    #14     Jan 25, 2022
    guest_trader_1 likes this.
  5. Snuskpelle

    Snuskpelle

    At least the mindset that I had developed as a programmer used to be that coding = productive work, and that time doing everything else should be minimized. I could see myself making this error being in a hurry and having no prior market experience (in fact, I sort of did back when that was the case, at least as in making immensely optimistic profitable backtests based on garbage in data).
     
    #15     Jan 25, 2022
  6. rb7

    rb7

    LOL....that's a very good one.
     
    #16     Jan 25, 2022
  7. After getting data from a game, thinking that they are live FX quotes, if I were you I wouldn't like myself that much.
     
    #17     Feb 5, 2022
  8. Yeah it's def legit but you need to trade a cdf on 1/S because you want jpyeur payour in jpy. Easeir to choose 3 currencies and 3 pairs like eurchf eurusd usdchf. You have to do it on the forward as well.
     
    #18     Feb 5, 2022