Liberty0 / strategy_find

technical analysis and evaluate strategy with historical prices
0 stars 0 forks source link

scrap from yahoo API #2

Open Liberty0 opened 3 years ago

Liberty0 commented 3 years ago

seems work for both TW & US stocks

Liberty0 commented 3 years ago

analyzed successfully with split function

Show compact curve with time (x-axis) but don't spare crossing day.

Liberty0 commented 3 years ago

020669a17f1141accb50d1bfcbf617f09763561e

Liberty0 commented 3 years ago

d30cc66f3a9a7fa2ecae2d25c4cdc6ef48b2f61f

date_price = scr.price_scraper(Market, Code, Tick)

Liberty0 commented 3 years ago

7a45dfd2fc256321ec8a3a56102c959c8f0860a7

Liberty0 commented 3 years ago

isolate date matching issue

Liberty0 commented 3 years ago

API of yahoo US: https://query1.finance.yahoo.com/v8/finance/chart/GOOG?symbol=GOOG&period1=1529852400&period2=1604156132&interval=1d&includePrePost=true&events=div%7Csplit%7Cearn&lang=en-US&region=US&crumb=a8owf8rmWfk&corsDomain=finance.yahoo.com

data format is different to that of TW

Liberty0 commented 3 years ago

timestamp: num. of seconds of year/month/day/H,M,S.ss from 1970/1/1 0:0:0.0000 round(datetime.datetime.now().timestamp()): timestamp of now round(datetime.datetime(yeaar,month,day,hour,minut,second).timestamp()): timestamp of specified time