Charting Stocks Part 26 - Using Yahoo's API for our stock price technical analysis in matplotlib

preview_player
Показать описание
This is the twenty-sixth video in the series for stock price analysis, showing you how to improve the RSI

indicator on your chart. The purpose of the videos in this series is to teach you how to program your own

charting and technical analysis of stocks or Forex.

This is beneficial for you if you plan to do any sort of algorithmic, high-frequency, or any sort of

automated trading.

Рекомендации по теме
Комментарии
Автор

This is incredible! I can't believe how much time I saved by doing this. Thank you so much!

suckyboy
Автор

There are a few ways you could do this, but the easiest would be to just plot the text on the axis. Not too sure the best way to "mark" the candle, but you could probably plot some sort of marker as well other than a line, like a dot or x to denote it then have the text under.

I can eventually do a tutorial on that, but I am pretty far backlogged. I'll try to slip it in somewhere

sentdex
Автор

Hi Sentdex,

I've just watched and followed all videos and wanted to say thank you for this fantastic tutorial series! I've learnt a lot and will definitely now watch other series you have!

jamestyrrell
Автор

Check out video 27, should be close to what you are looking for.

sentdex
Автор

I got a request: Could you make a video about adding text to the chart, i.e. show when news happened on an intraday chart, marking the candle, and showing text with the name of the news (i.e. for EURUSD Federal Funds Rate)?

reinerheiner
Автор

Mr. Sentdex - would the missing data be due to the fact that we start plotting from our longest Moving Average? Therefore, a 200 period moving average wouldn't plot the full 10 year data or 3 year data... just a thought

antoniozeus
Автор

Hey, great videos! I've been following along. I think I have copied you exact. But, I have an issue.:

Stock to chart: ebay

pulling data on ebay


Then, the error comes back like this:

global name 'urllib2' is not defined failed to organize pulled data

Warning (from warnings module):
File "C:\Python27\lib\site-packages\numpy\lib\npyio.py", line 795
warnings.warn('loadtxt: Empty input file: "%s"' % fname)
UserWarning: loadtxt: Empty input file: "[]"
main loop list assignment index out of range

piddli
Автор

I am from INDIA, the yahoo API is not working. Instead I used ::
Could you please suggest a generic yahoo API?
Also I am getting one issue and it says ::
" Stock to plot: INFY
Currently Pulling INFY
10-Jan-2018 09:35:46
main loop time data 'window._perfMeasure = function _perfMeasure (name' does not match format '%Y%m%d' "


Any solution to resolve it?

anirbanphy
Автор

Hi Harrison,
I have tried trace back to what your code is doing and at
if  len( splitLine ) == 6 :
        if  ' values ' not in eachLine :
                  stockFile.append(eachLine)
the if len(splitLine) ==6:  is reading the value as" 0" ???
this arrangement works fine for downloading the stock to file but dynamic input seems to throw a wobbly. any suggestion. python 2.7.9
thanks
ashok

Автор

Hi Sentdex,
i've watched your tutorial but when i try to run the module i come across this problem "failed main loop time data 'EBAY' does not match format '%Y%m%d'". Could you help me to figure that out please?

luigigiangrande
Автор

Hey Harrison -- love the videos, big thanks!
-- I tried out a couple of edge cases to see what would happen. With New Relic, NEWR (Dec 2014 IPO-- so <1month of data), I get the error "failed main loop x and y must have same first dimension" + the programs renders a candlestick chart w/o any of the splines/ticks/labels etc (basically just the candlesticks on black)

Any way that you could suggest some additional logic to add to better handle these type of edge cases?

jasonsercu
Автор

(Note):
At the top, for this to work, you need to add:
import urllib2

thaskef
Автор

Hello Sentdex,

Awesome tutorial but i get this error:
EOFError: EOF when reading a line

jsands
Автор

Hello Sentdex,

I am getting this error:
Warning (from warnings module):
  File "C:\Python27\lib\site-packages\numpy\lib\npyio.py", line 816
    warnings.warn('loadtxt: Empty input file: "%s"' % fname)
UserWarning: loadtxt: Empty input file: "[]"
Failed main loop list assignment index out of range
Can you please help me out on what I am doing wrong?
Thank you very much for all of your tutorials they are very helpful

andresalvarez