Re: While they are at it...
Does anyone know the extent such "algos" lurk in financial trading apps?
Ken, I can answer this, but please forgive my crude attempt to squeeze what would need to be a small book or long article into a blog post.
I'm afraid the answer is no. Nobody knows the extent of alogrithmic trading because it is extremely secretive even within an organisation. The department I write algo trading apps for does not share knowledge of them outside the business unit. If your desk knew what my desks algos did, you could write an algo to eat our lunch - make the money in our place. Desks within a bank are in competition with each other to produce revenue and obtain funding from their treasury and var from their RO's.
Each algo operates in isolation of each other, even within our desk (business unit). I actually do understand the complexity involved in the algorithms my code implements - I won't pretend it's easy, but then we're pretty well compensated for the fact that there's very few people can do what we do.
I suspect many developers are not themselves aware because of complexity (how do you test every input/output?)
The testing itself is actually remarkably simple compared to what you'd imagine. Algos ultimately produce a signal which tells the OMS what to do trading wise. The data they take in to generate that isn't a wide data set, but it is fast flowing. You're usually looking at correlated pairs - so if Shell & Tesla move in opposite directions within a short space of time, the behaviour of one factors into your trading in the other - but by far and away most algos trade FX. You're swapping from USD to GBP and back, for example. There's a list of about 10 to 15 common pairs that have a large and fluid market that we use.
When trading FX you're selling the currency you hold to buy the one you don't. My dollars for your pounds for instance. The data used for that varies but typically will be the tick data for this session and possibly a couple previous, from a number of hotspots (data sources - LSE, NYSE, Simex for example). A tick is one millisecond, so we might have say 10 data items per millisecond to process, but they're all just decimals.
The current decimal is compared to the others for the tick in question and that is fed into the algo model which decides to either do nothing, or to change the balance we hold in the currency pair - reduce dollars and increase pounds, or increase dollars and reduce pounds.
The second class of data is the hotspot order book - what orders exist in the market, and where they are positioned in the spread. There are three prices involved - the bid, offer, and mid price. The mid price is halfway between the bid and the offer. Bid is the price you buy at, offer is the lower price you sell at. The difference between them is the spread, which is where market makers profit.
FX is literally a zero sum game - all that changes is the balance of currencies you hold - for me to hold more dollars, someone has to hold fewer.
I'm massively simplifying this and trying to use terms at least passingly familiar to most people. Hopefully you can see that the inputs are readily knowable and easy to test in terms of bounds etc. I'm not suggesting mistakes don't happen (google knight capital for a great example), simply offering that the difficulty in testing is lower than that of say a 777 software system, or lane guidance system on a car.