Python cryptocurrency trading bot

Bittrex

As a fun toy to explore trading, I built a “flipper” cryptocurrency trading bot in python for the Bittrex exchange. It has a trading strategy of attempting to flip between two cryptocurrencies, such as Ethereum and NEO, in hopes to obtain a small position growth each time it flips. Of course, this is just a very basic “strategy” and you will certainly need to modify it to avoid getting stuck on a losing bet.

Read More

Algorithmic trading using 100 lines of python code, using OANDA v20 API

After reading Dr. Yves Hilpisch’s article, “Algorithmic trading using 100 lines of python code,” I was inspired to give it a shot. I wanted to apply his guide on how to use a time series momentum algorithm because I have been interested in forex trading with cryptocurrencies. I set up a free forex trial account on OANDA, jumped into a jupyter notebook, and got to work. I hit an issue. OANDA changed their API from “v1” to “v20” and all new accounts default to the new API. I ended up rewriting his sample code to work with the new OANDA v20 API using a third party python library.

Read More

Stop using R plot and learn to love ggplot

ggplot Diamond Comparison

When I first got started I always found myself using R’s “plot” capability because, well, it is easy! Unfortunately, it lacks some advanced features — and the plots it produces are really ugly looking (subjective, but I bet you will agree with me). Luckily, there is a better tool for the job – ggplot. With only a few tricks you will find it just as easy to use.

Read More

Comparing diamonds with linear regressions using python R in jupyter notebooks

Buying a ring is a big decision. You have the whole “are they the one” decision. I can’t help you with that. Then you have the reality that this could likely be the first major financial decision that will impact both of you. Wouldn’t it be nice if you could save hundreds or even thousands of dollars?

I am not here to convince you to avoid buying a diamond (thanks, De Beers). Instead, I am going to show you a basic statistical programming technique with python and R known as a “linear regression model.” I will use a jupyter notebook to execute data analysis so you can see step by step how it works.

You might be able to use this to shop smartly by allowing you to compare an actual cost in store to a predicted price. My wife and I built and used this code in 2013 while engagement ring shopping together. Hope it helps others!

Let’s get started!

Read More