Skip to product information
An easy-to-follow Python stock automated trading system
An easy-to-follow Python stock automated trading system
Description
Book Introduction
From setting up a development environment to transitioning to actual investment
Create your own automated stock trading system with Python!


This book details the entire process of creating an automated stock trading system using Python.
This course covers the basic Python grammar required to build a development environment and create a project, as well as how to use the Kiwoom Securities API to exchange stock data, how to select trading stocks using web crawling, and how to use RSI for practical trading strategies.
Anyone can complete an automated trading system by following the process step by step.
  • You can preview some of the book's contents.
    Preview

index
Chapter 1: Setting Up the Development Environment

1.1 Installing Anaconda
__1.1.1 Installing Anaconda
__1.1.2 Setting up an Anaconda virtual environment
1.2 Installing PyCharm
__1.2.1 Installing PyCharm
__1.2.2 Creating a new project

Chapter 2: Python Basics

2.1 Printing Hello World
2.2 Variables
2.3 Comments and Indentation
2.4 Data Types
__2.4.1 string
__2.4.2 Tuples and Lists
__2.4.3 Dictionary
2.5 Basic Operations
__2.5.1 Arithmetic operations
__2.5.2 Parentheses
2.6 Various operators
__2.6.1 Comparison Operators
__2.6.2 Logical Operators
__2.6.3 Member Operators
2.7 Conditional statements
__2.7.1 if statement
__2.7.2 elif-else statement
2.8 Loops
__2.8.1 for statement
__2.8.2 while statement
__2.8.3 Nested loops
__2.8.4 Loop Control
2.9 Function
__2.9.1 Basic
__2.9.2 Return
__2.9.3 Validity
__2.9.4 Things to know more about
2.10 Class
__2.10.1 Indentation
__2.10.2 Instantiation
__2.10.3 Object Creation
__2.10.4 self
__2.10.5 _ _init_ _
__2.10.6 properties
__2.10.7 Check the instance
__2.10.8 Inheritance
2.11 Modules and Packages
__2.11.1 import
__2.11.2 from import
__2.11.3 as
__2.11.4 package
2.12 Exception Handling
__2.12.1 Checking for exceptions
__2.12.2 try-except-else-finally

Chapter 3 Using Kiwoom API

3.1 Setting up the environment
__3.1.1 Creating a Kiwoom Securities Account
__3.1.2 Creating a Securities Certificate
__3.1.3 Download Open API
__3.1.4 Download KOA Studio
__3.1.5 Sign up for mock investment
3.2 How to Use KOA Studio
3.3 PyQt5 Overview and Installation
3.4 Project Structure
3.5 Understanding How the API Works
3.6 Log in to Kiwoom Securities
3.7 Setting up automatic login
3.8 Retrieving account information
3.9 Obtaining stock information
__3.9.1 Get the stock code
__3.9.2 Get the stock name
__3.10 Obtaining price information (daily chart)
3.11 Obtaining deposit
3.12 Confirming Order Receipt and Conclusion
__3.12.1 Accepting orders
__3.12.2 Confirming the contract
3.13 Retrieving Order Information
3.14 Get balance
3.15 Obtaining real-time transaction information

Chapter 4: Practical Trading Strategies

4.1 Strategy Description
4.2 Buy/Sell Conditions
4.3 Universe Composition
4.4 Backtesting Results

Chapter 5 Project

5.1 Project Structure
5.2 Using the Database
__5.2.1 Inserting data: insert
__5.2.2 Data Retrieval: select
__5.2.3 Data Modification: update
__5.2.4 Data Deletion: delete
__5.2.5 Terminating a connection object: with
5.3 Creating a Universe
__5.3.1 Data Crawling
__5.3.2 Configuring the Universe
5.4 Saving and Viewing Universes
5.5 Saving and viewing daily charts
5.6 Configuring the Initialization Function
5.7 Implementing the Strategy
__5.7.1 Configuring the Frame
__5.7.2 Checking the selling conditions
__5.7.3 Sell order acceptance
__5.7.4 Confirm purchase conditions and accept orders
5.8 Final Finishing
__5.8.1 Receiving LINE notifications and handling exceptions
__5.8.2 How to run a program infinitely
__5.8.3 Response when an error occurs in the program
__5.8.4 How to Convert to Real Investment

Download Appendix A Example Code

Detailed image
Detailed Image 1

Into the book
Investing in stocks is gaining popularity because it's easy to get started and you can invest even with small amounts.
But investing in stocks is by no means easy.
When I think I bought, it is the highest point, and when I endure the downward trend and sell, it goes up repeatedly.
I'm worried that I might miss the timing, so I can't take my eyes off the HTS/MTS at home or at work.
You regret it by saying, 'I should have bought it then, I should have sold it then,' and later you feel regretful as if you had suffered a loss because your idea was right but you didn't have time to execute it.
But even if we had the time, would we have been able to buy or sell stocks "back then"? The fear and greed we feel in that moment hinder our choices, so we think but fail to act. Only after "back then," when it felt like a windfall, do we regret it.
This is where system trading can help.
Automated trading systems, which trade according to established rules, trade according to the rules and take actions that we would otherwise not take.
It also saves us a lot of time because while the stock market is open, it checks whether hundreds or thousands of stocks meet my buy and sell conditions.
Developing a trading system that selects stocks for me and buys and sells them when conditions are met may not be a quick win, but I believe it's about creating an avatar that can consistently make money in the stock market on my behalf.
But this process is not easy either.
You will need to know Python programming and also learn how to use the somewhat complex brokerage API.
But studying like that doesn't mean it's over.
It takes a process to create a tradable, practical system based on what you've learned.
This book is about this angle
Each step is explained in as much detail as possible, and the final chapter covers project development.
I sincerely hope that this will help you learn the principles of automated stock trading and develop your own strategies, bringing you closer to financial freedom.
--- Among
GOODS SPECIFICS
- Publication date: October 14, 2021
- Page count, weight, size: 420 pages | 183*235*30mm
- ISBN13: 9791165217167
- ISBN10: 1165217163

You may also like

카테고리