So I started doing a course on Algorithmic Trading using machine learning/AI last year, but in the middle of it, my wife and I had our second child, started moving country, and basically, life got in the way of completing the course.  Now I have started it again, so I wanted to do a bit of a mind dump on things I should remember; some of this will be quite basic, but you know the saying, if you don't use it all the time, then you forget it.

This also reminds me, later I want to write a blog on the differences I see as a DevOps person between normal software engineers and Data-scientist, based on a comment my wife (Software Engineer) said about why people use Python and the fact I have a pure hatred for Python my-self (which is a whole other post :) )


So onto the mind dump of things:

conda update anaconda
conda install <Package Name>

 OANDA Setup

pip install v20 PyYAML
pip install --index-url https://test.pypi.org/simple/ tpqoa

OANDA Config File (oanda.cfg)
Although I would prefer to have this as environment vars and not save in a file

[oanda]
account_id = xxx-xxx-xxxxxxx-xxx
access_token = xxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
account_type = practice

Then in a jupyter-notebook

import pandas as pd
import tpqoa
api = tpqoa.tpqoa("oanda.cfg")

Basic command so that you can test

api.get_account_summary()
api.account_type
api.account_id

Yahoo Finance Setup

pip install yfinance

Then you can import into notebook

import yfinance as yf

A good thing to keep in mind, and yahoo finance is a good example:

jupyter-notebook Keyboard cheatsheet

Time Series Data Basics - https://pdavies.io/blog/time-series-basics-with-pandas/

Visualization of Data Basics - https://pdavies.io/blog/visualization-of-data-basics/