I made an alternative module for japandas.DataReader

Overview

You can get information on domestic stocks from Yahoo! Finance by using the remote data access function of japandas, but there were various points I wanted to improve, so I made the one I made before during fin-py Mokumokukai # 2. I completed it with.

Task

--Extra records are acquired during the stock split --I also want company information ――I also want financial information

In the japandas implementation, HTML is scraped with ``` pd.read_html ()` ``, but since it simply picks up the table on the screen as it is, it picks up the split event depending on the acquisition period. ..

Example of getting with japandas


import japandas as jpd
jpd.DataReader('8411', 'yahoojp', '2008-12-15', '2009-01-15')

Execution result

Open price High price Low price closing price Volume Adjusted closing price*
date
2008/12/19 259400 270600 253200 259900 281076 259.9
2008/12/22 266400 276000 265800 270200 164024 270.2
2008/12/24 262200 268100 254400 257700 96027 257.7
2009/1/5 Split:1 share->1000 shares NaN NaN NaN NaN NaN
2009/1/5 283 294 279 292 91382100 292
2009/1/6 297 299 287 289 112779100 289
2009/1/7 293 298 289 296 79444700 296

Not good ... If you want to display the four prices on the chart, you have to modify other than the closing price.

What was made

That's why I made it here. It inherits pandas_datareader like japandas, so it can be used in almost the same way. sawadyrr5/YahooJapanDataReader

It seems that it is about 20% faster even if measured with% timeit of Jupyter. Is it because the internal processing is parsed by XPath?

Recommended Posts

I made an alternative module for japandas.DataReader
I made an Ansible-installer
I made an Xubuntu server.
I made an automated program for pasting screenshots in Excel
I made an Anpanman painter discriminator
I made an Angular starter kit
I made a dash docset for Holoviews
I made a library for actuarial science
I made a python dictionary file for Neocomplete
I made an extenum package that extends an enum
I made a spare2 cheaper algorithm for uWSGI
I made a useful tool for Digital Ocean
Obstacle (black) I made an automatic avoidance caterpillar.
I made a downloader for word distributed expression
I made an image for qemu with Yocto, but I failed and started over
I made a peeping prevention product for telework.
I made an Amazon Web Service Dash button
I made a user management tool for Let's Chat
I made a window for Log output with Tkinter
I made a cleaning tool for Google Container Registry
I made a Python module to translate comment outs
I wrote an automatic installation script for Arch Linux
[Python] I made a classifier for irises [Machine learning]
I made an Android application that displays Google Map
I made an action to automatically format python code
I made a method to automatically select and visualize an appropriate graph for pandas DataFrame
I made my goimports
[VSCode] I made a user snippet for Python print f-string
I made an IoT device to naturally acquire positive thinking
I made an emotion radar chart of Aozora Bunko's work
I made a resource monitor for Raspberry Pi with a spreadsheet
I made a learning kit for word2vec / doc2vec / GloVe / fastText
I made a face diagnosis AI for a female professional golfer ③
I made an animation to return Othello stones with POV-Ray
I made an anomaly detection model that works on iOS
I made an original program guide using the NHK program guide API.