A CryptoCurrency Environment

How do we create a programmatic environment to explore the Cryptocurrenct environment?

We obtained versions of crytocurrency price histories online. Our data consists of the opening and closing prices of 20+ cryptocurrencies.

bitcoin prices

We knew that we wanted something that adheres to the OpenAI gym api, which is a MDP environment useful for reinforcement learning.

mdp env

Normally in an OpenAI Gym, the state of the system is the graphics of the game. However, in our case, it’s the prices of the cryptocurrencies.

Our state includes various technical trading features, such as current_price, rolling_mean, rolling_std, cross_upper_band, cross_lower_band, upper_band, lower_band, price_over_sma.

Our environment allows users to step through each day of the cryptocurrency.

### Sample Usage:

env = Environment(coin_name="ethereum")
print env.step()
print env.step()
print env.step()
env.plot()

For more, see our implementation here.

Written on November 15, 2017