Skip to main content

Posts

Showing posts from January, 2020

Installing R on Ubuntu 19.10

Download R Source code from https://cran.rstudio.com/index.html extract the .tar.gz file to a location gzip -dc R-x.y.z.tar.gz | tar -xf - current sources for the recommended packages, which can be obtained by rsync or downloaded from CRAN. To use rsync to install the appropriate sources for the recommended packages, run ./tools/rsync-recommended from the top-level directory of the R sources. Install necessary packages to add repository over HTTPS sudo apt install apt-transport-https software-properties-common Add CRAN external repository sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/' edit /etc/apt/sources.list and remove comments for deb-src for line containing cran35/ (mostly last line of this file) execute sudo apt-get update to read the sources files. Install package dependencies using sudo apt-get...

My algorithmic Trading journey

Like many i used to manually watch and trade stocks, ETFs. Its non-productive and involves our emotions in trading decisions. So I wanted to automate trading. Initially used Trailing Stop and Limit orders. But they can automate only in a prescribed way. I started thinking about a way to trade programatically, where we have more control. My quest pointed to Zipline, a python algorithmic trading library. It support backtesting (testing algorithm with historic data) and most importantly supports live trading In this blog, I will walk you through my algorithmic trading journey. Zipline Installation From  https://www.zipline.io/index.html , I see it only supports python 2.7 or Python 3.5 Since python 2 was sun set on Jan 1 2020, there is no point in trying it. I went ahead with Python 3. For programming, installed latest Ubuntu 19.10 in a virtual machine . Ubuntu 19.10 comes bundled with Python 3.7.5. You can check your python version by typing python3  -V ...