Skip to content

A simple Python script that, by using the great Yahoo Finance APIs, downloads the data for a list of trades of your choice and draws the respective charts, plus a comparison chart for all the trades together.

Notifications You must be signed in to change notification settings

rm1984/TradesPlotter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TradesPlotter

TradesPlotter is a simple Python script that, by using the great Yahoo Finance APIs, downloads the data for a list of trades of your choice and draws the respective charts, plus a comparison chart for all the trades together.

Usage:

usage: python tradesplotter.py [-h] -i INPUT_FILE -o OUTPUT_DIR

Example:

First of all, prepare a text file (for example, trades_example.txt) with a list of the ISIN codes of all your trades, like in this example:

US0378331005
US88160R1014
IA00B1M62Q52
IE00B0M62Q58
JE00B1VS3770
IE00B3VTMJ91

Then run the script like this:

$ ./tradesplotter.py -i trades_example.txt -o out

In the out/csv directory you will find, for each trade, a CSV file with all its closing prices of his entire lifespan to date.

In the out/img directory you will find, for each trade, the relative chart, plus a comparison chart for all the trades together, like in the following image.

TradesPlotter

As you can see, the example subdirectories contain the following files:

$ ls -1 out/*

out/csv:
IE00B0M62Q58.csv
IE00B3VTMJ91.csv
US0378331005.csv
US88160R1014.csv

out/img:
ALL.png
IE00B0M62Q58.png
IE00B3VTMJ91.png
US0378331005.png
US88160R1014.png

Trades for which no information can be retrieved are automatically skipped.

About

A simple Python script that, by using the great Yahoo Finance APIs, downloads the data for a list of trades of your choice and draws the respective charts, plus a comparison chart for all the trades together.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages