Python Charting Stocks/Forex for Technical Analysis Part 7 – Basic Financial Graph







This is the seventh video in the series for stock price analysis and financial charting, showing you how to make a very basic stock price chart. The purpose …




9 Comments


  1. sentdex (December 28th, 2013 at 1:35 am)

    +Azzi Dalas For some reason it is not letting me comment on your post.
    Annoying! Anyway, what version of python and what version of matplotlib do
    you have? Sounds like you possibly mixed a 32bit and 64 bit there.

  2. Xanthos Dalas (December 28th, 2013 at 2:09 am)

    what is the cause of this error: i use python 2.7

    Traceback (most recent call last):
    File ““, line 1, in
    import matplotlib.pyplot as plt
    File “C:Python27libsite-packagesmatplotlib__init__.py”, line 111, in

    raise ImportError(“matplotlib requires dateutil”)
    ImportError: matplotlib requires dateutil

  3. sentdex (December 28th, 2013 at 2:25 am)

    Are you working with python 3 or python 2.7?

  4. Hrishikesh Bj (December 28th, 2013 at 3:08 am)

    HI sentdex, while importing matplotlib got this error raise
    ImportError(“matplotlib requires dateutil”) ImportError: matplotlib
    requires dateutil what do i need to do?

  5. sentdex (December 28th, 2013 at 3:31 am)

    Sounds like you’re trying to plot with the intra-day data maybe? Open the
    file. Are the time stamps in unix time? Or date time format?

  6. Stu J (December 28th, 2013 at 3:36 am)

    And of course everything below that – YouTube wont let me paste as it says
    it has (ascii) art in it…..grrr

  7. Stu J (December 28th, 2013 at 4:11 am)

    Hi there, me again!! Sorry to keep bothering you – I am at the point where
    I am trying to show the graph, but i get the following error when trying to
    run it: failed main loop unconverted data remains: 8499 I have copied the
    following instructions:

  8. Stu J (December 28th, 2013 at 4:12 am)

    import time import datetime import numpy as np import matplotlib.pyplot as
    plt import matplotlib.ticker as mticker import matplotlib.dates as mdates
    eachStock = ‘TSLA’,’AAPL’ def graphData(stock): try: stockFile =
    stock+’.txt’ date, closep, highp, lowp, openp, volume =
    np.loadtxt(stockFile,delimiter=’,’,unpack=True, converters={ 0:
    mdates.strpdate2num(‘%Y%m%d’)})

  9. Stu J (December 28th, 2013 at 4:23 am)

    Eesh they were in unix time, I had downloaded 10D data rather than 1Y –
    Schoolboy error!! Thanks again for your help!


Share Your Thoughts!


XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>