export stock prices to csv

Here is a simple script for exporting stock prices into a csv-file.

conditions

linux, bash, and the curl tool

howto call

option 1

bash yahoo_boerse.sh or if script is executable. / yahoo_boerse.sh

Here you get the data from the german index DAX

option 2

bash yahoo_boerse.sh <index>

For example Dow Jones

bash yahoo_boerse.sh http://de.finance.yahoo.com/q/cp?s=%5EDJI

The links to the individual indices can be found by going to http://finance.yahoo.com/ clicking and index and then clicking the components-link

The output can be simply pipe to a csv.

bash yahoo_boerse.sh > DAX.csv

DOWNLOAD SCRIPT

Ein Kommentar zu “export stock prices to csv

  1. Hello there! This is my first comment here so I just wanted to
    give a quick shout out and say I really enjoy reading through your posts.
    Can you suggest any other blogs/websites/forums that deal
    with the same subjects? Thank you so much!