Using python and dtale to analyze correlations

I can´t say this enough times, correlations matter and correlations are in deed a traders best friend.

Correlations are very useful but very hard to plot without some code knowledge. Fortunately the guys that made dtale are life savers.
dtatle is a library that allows you to manipulate data, you can re-order it, plot it, export it, etc.

Today I will share with you a simple way to plot ETF correlations.
For starters you should go to my shared content and download the spreadsheet with the ETF data, I will update this file at least monthly. click on the “Reports” link and download the file.

I will assume you have python installed on your machine.

For starters you need to install dtale

pip install dtale

After dtale is installed you can copy paste this snippet.

import pandas as pd
import dtale

data = pd.read_excel("YOUR_FILE_PATH.xlsx") 

Replace “YOUR_FILE_PATH.xlsx” with your file path and run it.
You will see something like this.

dtale start up

After this, go to the top left corner and click on the arrow. Select the correlation menu.

dtale correlation menu

A new window will pop up, now you are free to explore. search for specific correlations, change the Rolling Window for a smother data, have fun.

Find more stuff on my github:

If you have any questions or want help to try some strategies up, feel free to drop me a message.

Have an awesome day,


R + Quandl Dollar Vs Commodities correlations

The opportunity set for itself DXY had a major pump and the correlation between the dollar and commodities is unparalleled.

Correlations are a major tool on a traders belt and if you know a little of R here is a notebook that will give you the correlation between DXY and all major Commodity futures.

You just need to sign up for a Quandl account and get your free API key

You can find the code on my GitHub:

Quandl and Python CoT report

This week I will show you how to extract the CoT report data to an excel using Python and Quandl.

Fist of all, you will need to sign up to Quandl. Quandl is a Freemium quote provider.

Go to and create your free account.

After you create your account you will need to get your private API Key

Just click on your account menu and your API Key will be displayed under the “Profile” tab.

If you don’t have Python installed on your machine I would recommend installing it via Anaconda.

Before getting into the code, just one last step. You will need to install the Python package for Quandl.
just run the command “pip install Quandl” on your console.

The code snippet is very big, so I will just post the link to the bitbucket Snippet.

In case you have any question just leave a comment or DM me on Twitter.