Mean-reversion on the price of OldSchool Runescape Lobsters.
Mean-reversion refers to a financial market assumption that as asset's price will converge to its
average value given enough time. This assumption is best applied to stable data, for example body temperature;
even though there may be spikes in temperature it will always evetually return to it's true average. Or, a more topically
stable asset prices. Lobster prices on the Grand Exchange in OldSchool Runescape are stable
around a slow moving average. If nothing fundamental changes their price will remain relatively samey. Their
avaiablility means they will never climb too high in price, and because of their usefullness the price will never drop too low. This
makes them a good asset for the mean-reversion algorithm. The alogorithm is implemented (see Maths section below) so that when the price drops far enough
below the moving average, we buy. And when it climbs
far enough above, we go short. Finally, when the price returns
to the middle, it closes and waits.
It may be worth noting that this
is impossible to replicate in game because there is no broker in game from
whom you can borrow the lobster asset thus making shorts impossible.\n Prices come from the OSRS Wikipedia real-time API.
Graph depicting the price of lobsters. The dashed line is the 2-hourly average; the blue band is the entry threshold (corresponding to a Z-score of 1.5) and the green band is the exit threshold (corresponding to a Z-score of 0.3). The centre dashed line depicts the monthly average.
Waiting for the first price tick…