Skip to content

adminho/trading-stock-thailand

Repository files navigation

🔥 ... The project will be updated continuously ...... 🔥

Trading example codes (not yet)

This repository collects my example codes in Python for studing in The Stock Exchange of Thailand (SET) (not yet).

Requirement

All examples are written in Python language, so you need to setup your environments as below.

  • First, install ANACONDA.
  • For Deep learning, I used 2 library including TensorFlow and Keras.

You can install TensorFlow from PyPI with the command.

pip install tensorflow

And you can also install Keras from PyPI with the command.

pip install keras

  • Install pandas_datareader for getting data from yahoo finance and also install fix_yahoo_finance (fix bugs).

pip install pandas_datareader

pip install fix_yahoo_finance

pip install googlefinance

  • Install tqdm to make my loops show a smart progress meter on console

pip install tqdm

Download datasets (EOD data files from SET)

My source codes

Since Bank of Thailand (BOT) has provided 21 APIs for query data including Exchange rate, Interest Rate and Debt securities auction so I would like to show examples howto use 2 APIs such as

  • Daily Weighted-average Interbank Exchange Rate - THB / USD
  • Daily Average Exchange Rate - THB / Foreign Currency

For example codes in HTML+JavaScript, JavaScript with Node.js and Python, I shared at here

image bot api

An example when using "Daily Weighted-average Interbank Exchange Rate - THB / USD" API

I use datasets from http://siamchart.com/stock/ that is a EOD file.

There are my examples to compute the technical indicators for securities including

I'm trying to apply Deep Learning (LSTM network) to predict a stock trend (not complete).

.... ✍ Pending

7) Deep Reinforcement Learning

I'm trying to apply Deep Reinforcement Learning (Deep Q-learning) as stated in the paper Playing Atari with Deep Reinforcement Learning to automatic trading (work in progress)

8) Example: get stock information on Colab

  1. My example codes at here
  2. All codes

Thank you

I Borrowed some codes from

Knowledge

ขออนุญาตประชาสัมพันธ์ (แอบขายของ)

ท่านใดสนใจซื้อ "หนังสือ AI ไม่ยาก เข้าใจได้ด้วยเลขม. ปลาย" สามารถคลิกเข้าไปในลิงค์ตามรูปได้

Releases

No releases published

Packages

No packages published