- improved
git-svn-id: http://moon:8086/svn/projects/Stock@295 fda53097-d464-4ada-af97-ba876c37ca34
This commit is contained in:
+3
-1
@@ -16,6 +16,8 @@ import datetime
|
|||||||
|
|
||||||
# Knowledge
|
# Knowledge
|
||||||
# https://www.investopedia.com/articles/technical/02/050602.asp
|
# https://www.investopedia.com/articles/technical/02/050602.asp
|
||||||
|
# https://ntguardian.wordpress.com/2016/09/19/introduction-stock-market-data-python-1
|
||||||
|
|
||||||
key = '0UO7Z2MVZ2YSQSVE'
|
key = '0UO7Z2MVZ2YSQSVE'
|
||||||
|
|
||||||
|
|
||||||
@@ -43,8 +45,8 @@ def macd(data):
|
|||||||
|
|
||||||
return ema_short - ema_long
|
return ema_short - ema_long
|
||||||
|
|
||||||
# Get stock price via data reader
|
|
||||||
if 0:
|
if 0:
|
||||||
|
# Get stock price via data reader
|
||||||
start = datetime.datetime(2016,1,1)
|
start = datetime.datetime(2016,1,1)
|
||||||
end = datetime.date.today()
|
end = datetime.date.today()
|
||||||
apple = web.DataReader("AAPL", "av-monthly", start, end, api_key=key)
|
apple = web.DataReader("AAPL", "av-monthly", start, end, api_key=key)
|
||||||
|
|||||||
Reference in New Issue
Block a user