Creating Crypto Signals

Louis Brown
Coinmonks
3 min readMay 8, 2021

--

In this article, I wanted to extend the work discussed in the first article, “Sourcing Intra-day crypto data”, which discussed sourcing up to the minute OHLC bitcoin data using different data sources. In the article, I mentioned using the data to run a production model or for crypto trading strategies; in this article, I will show how this can be done using AWS marketplace models to create a buy, hold or sell trading signal.

Lets do something interesting

AWS Marketplace models bitcoinpredict10 for prediction and BitcoinTrend10 to provide a 2-week price trend, which we will use as a crossover point for the 10-minute price prediction to see whether the forecast price is above/below the trend model price, which we will use as an opportunity to buy/sell bitcoin.

Now let’s deploy the models; you will need an AWS account to do this. The first code blocks will deploy the trend model:

The variable model_package_arn will be provided in your AWS account after you subscribe to the model. The following code blocks will deploy the price prediction model:

Now we have the models, we need to do some data wrangling to ensure that the data produced in the last article can be used in the models, and then we will use the deployed models to predict the future 10-minute price and the future 10-minute trend.

Now let’s create a function to handle the values passed back by the two models.

We will create a simple function that will multiply the trend by a strike percentage and check if the predicted price us above or below so that we can take a sell/buy position or just hold our current position.

Let’s put it all together and see what was predicted and what the signal would have predicted.

Let’s do a second run using the GetOnePoint function and see the results of the prediction and what the signal says in the code block below:

A notebook with the complete code can be found in this GIT repository.

Conclusion

This is one way to use the above models to create a technical trading indicator, which could be used in trading strategies or automated with a trading bot. I hope you have some fun creating your own technical indicators!

Oh, before I end the article, the trading graph at the beginning represents the day and approximate time the models were run to predict, give or take a few minutes from Bitstamp exchange.

Also, Read

--

--