An Object in Motion Will Stay in Motion

As we watch with excitement the price of bitcoin tumble up and down I wanted to give an update on the cryptocurrency trading platform that I have been developing. I know, I know, there’s a lot of comments I haven’t responded to as of yet from the last couple weeks, but there’s been some breakthroughs on the platform I wanted to tell everyone about. Let me know what you think about the update, and as always thanks for reading.

After roughly the last three weeks of work the platform itself has reached a stable point in development. What we’re working with is an engine that can reliably look up the value of bitcoin on a loop, or be passed bitcoin values in a simulation using the past month of actual market data. In both of these cases selling and buying decisions are made according to an algorithm defined by the user and imported into the engine.

As development continues the scripts will create a graph to track the progress of different user defined algorithms. Currently the algorithm that performs the best over the amount of data we have involves the implementation of a slow stochastic oscillator. The slow stochastic oscillator method of investment and trading was developed by Dr. George Lane in the 1950s. The oscillator involves the tracking of two variables, referred to as %K, and %D.


In this case, %D is a moving average of the past three periods of %K. Where %K indicates the momentum of a commodity’s current value. To quote George Lane, who sums it up nicely, “Stochastics measures the momentum of price. If you visualize a rocket going up in the air – before it can turn down, it must slow down. Momentum always changes direction before price.” By this rule we can say when %K rises above the trend being observed in %D, one can predict a rise in the commodity’s value.

This with minor changes represents my user defined algorithm. Where the output graphs from a recent simulation can be seen below.


The red shaded areas on the graph represent periods where the user defined algorithm would have pulled the money out of the bitcoin market. The green shaded regions represent periods where the user defined algorithm would have bought into the bitcoin market. Note the relationship to the overlaid slow stochastic oscillator. At first this graph may look complicated, but the graphing library I use – plotly – allows for zooming in that scales the graph accordingly.


This second graph shows a rather profitable moment during the simulation. Thanks to plotly, when we zoom in on important moments in the simulation we’re provided a clear picture of what trends are being observed in the market and what the algorithm does in response.

All in all this approach is in some cases matching the growth of the market. As one might be able to tell from the graph the oscillator data isn’t very dense as its period is nearly twelve hours. Future work will involve decreasing that period to give the algorithm a better chance to respond quickly to emerging market trends. There’s a lot of work to go! Stay tuned for more updates!



One thought on “An Object in Motion Will Stay in Motion

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s