Category: System trading

stock backtesting, realtime trading using python


How to get stock data (Pandas)

Let’s start with getting stock data first.

There are three ways to receive stock price.

Using brokerage API
crawl webpages
Using APIs provided by Google, Yahoo, Morningstar, etc.

First of all, in this post, we will try to import stock price data in third ways which is most simple.


Python development environment (Virtualenv)

Once you’ve finished installing Pycharm, you should now set up a virtual environment for your development.

A virtual environment is a clone of the Python Interpreter installed on your system so that it can be used only for desired projects.
You have to go into that path and run python, or else you have to catch the environment variable differently.


Python development environment (Python install)

Python is an intuitive and easy-to-develop language. There are lots of libraries and it’s easy to get help from Google.

It is also an interpreter language, so you do not have to compile like C, C ++, or JAVA, so you can see the results quickly.

There are various versions of Python, but I will use Python3.6 32bit version.

The reason I use this version is to link API of Kiwoom Securities. It seems to work only with 32bit Python. 

And we will proceed with development in Windows environment.