Slowest high-frequency trading

I’m trying to improve what I’m doing and to test out new things for fun and profit. If you haven’t figured out I’m curious enough to try new things, it’s what keeps me going and motivated in life. For over a year I’m investing in stocks but I’ve been following financial charts for the past 6 years or more. I’ve been attracted to financial statistics due to all the available possibilities that can occur and the high-risk environment.

What is high-frequency trading?

Before talking about high-frequency trading, you should understand what’s concept behind it.
It takes a human about 1 to 4 seconds to do a chess move. On this assumption, if we would like to take a decision in the stock market it will take us at least 4 seconds to do the decision and then maybe a few more seconds to complete the order. A robot or a piece of software could take decisions way faster, in less than 100 milliseconds, that’s 1/10 of a second or 0.1 seconds.
That’s why there’s a big advantage to build a robot when it comes to stocks because it could do over 10 trades in a second.
This type of robot which is trading in the stock market is being called high-frequency trading.

How to profit from a high-frequency trading

There are plenty of strategies out there for a high-frequency trading algorithm in order to generate income.
One common strategy is to look in the stock market for a spread order at a certain price. The bit will buy all the available quantity at the ask price and sell it for a few more cents 1-3 back in the market to the one with the spread order. This works due to the speed of the HFT algorithm, it will profit from this and will take advantage of that speed.
This is just one strategy, there are way more.

Currency arbitrage strategy:

Here’s another strategy, you know that the stock market is constantly moving, and because of that, there are plenty of opportunities that arise from that movement.
Consider the following scenario:

  • USD/GBP – BUY 1 GBP for 1.2 USD
  • GBP/EUR – BUY 1.3 EUR for 1GBP
  • EUR/USD – BUY 1.4 USD

In this example you’ve gained $0.2 while you started with $1.2, that’s a 16% which is surreal, but it was just an example.
At the current market, I think you’re lucky if you get a 0.001% profit, but you can do this many times.

This is also known as currency arbitrage or triangular arbitrage. It’s an interesting concept that works only when there’s a high volume of trades and it’s available for a short amount of time. This creates opportunities for sellers and for buyers because it will provide even more volume in the stocks, but you have to move very fast. Some statistics that I found are suggesting that this occurs from time to time, but it remains an opportunity for less than 5 seconds. And as this market is moving faster and faster, it will go bellow 1 second.
Some consider this a good thing and other don’t, but either way, I see this as a competitive advantage which I could use to my advantage.

Slowest high-frequency trading

I started writing my first script in PHP, and that web language is one of the slowest ones. It takes over a second just to read the response from the stock market, to analyze the content and the current prices it takes over 4 seconds.
That’s why I’m considering that I’m building one of the slowest high-frequency trading software available.

This journey just started for me, but I’m willing to share what I’m learning and what I’m doing.

What do you think about my experiment?

Leave a Reply

Your email address will not be published. Required fields are marked *