[Concept] A strategy to analyze data with python and aim for a decline after shareholder benefits to make a profit

background

We are proceeding with the analysis by analyzing the data well, finding the one who is logically strange before and after the shareholder benefit, and thinking that we can make money at that timing.

Now, while pulling all the stock price data since 2000, there is a wait, so let's take a look at the mechanism of the preferential treatment during that time. So, let's take a look at the analysis procedure and the aim.

By the way, stocks are almost beginners who buy only their favorite companies. And, as the title says, it's just a ** concept **, so the actual code doesn't come out.

Click here for the blog that we run: Effort 1mm

Points to make money

The first two points I thought about were the following.

--Credit sale on the vesting date of shareholder benefits. Collected on the falling day. --Buy order on the ex-rights day of shareholder benefits. Sell order near the next vesting date

If it is 1, the risk of credit selling will increase, but the risk of holding stocks in the medium term seems to be just as large (there are many things such as the bursting of the bubble in China), so the shorter the period, the better the results can be seen. It's fun, so I'll try it with 1.

2 can be assembled with the same logic, so it might be a good idea to implement it. Of course there is a risk of holding shares in the medium term, though.

What to do with data analysis

When I write so far, I feel like I hear a voice saying ** "You can do it without analyzing the data" **. That's not the case. ..

In the world of finance, there are three important indicators, each of which has something like risk, return, and expected value (theoretical value) of return. So, by analyzing the data, ** the stock with the closest return to the theoretical value ** can be extracted with the minimum risk.

To put it in more detail, it will be possible to ** list stocks that are almost certainly profitable **. In my case, the risk of getting money is finite, so I have to do something like this. ..

Therefore, this time as well, analysis to find stocks that are likely to be profitable.

What to do

The best thing I know is to standardize the return index with the Nikkei 225 return index and look at the cycle of fluctuations before and after the preferential treatment date. Then, ** Extract the day when the difference is large between the day before the special treatment day and the day after the special treatment day **.

Considering the fluctuation range and the minimum number of transactions, we will calculate the expected return value (average value) and the return volatility (degree of dispersion / variation).

The data obtained by this analysis is

--The day to buy --Day to sell --Expected return --Return volatility (risk)

Wonder?

After that, you can purchase it considering the return you want and the risk. If it seems to be a hassle to do with the eyes, I will apply it to the standard normal distribution

Ideally, I think it would be better to calculate the distribution of the days to buy and the days to sell, taking that into consideration.

I would be very happy if I could automate this. I haven't been able to eliminate the risk of the Nikkei 225 up and down, but I wonder if I can accept it. ..

Recommended Posts

[Concept] A strategy to analyze data with python and aim for a decline after shareholder benefits to make a profit
Experiment to make a self-catering PDF for Kindle with Python
How to make a surveillance camera (Security Camera) with Opencv and Python
[Pandas] I tried to analyze sales data with Python [For beginners]
I tried to make a periodical process with Selenium and Python
Fractal to make and play with Python
Make a decision tree from 0 with Python and understand it (4. Data structure)
I tried to make a periodical process with CentOS7, Selenium, Python and Chrome
I want to make a game with Python
Try to make a "cryptanalysis" cipher with Python
WEB scraping with python and try to make a word cloud from reviews
Try to make a dihedral group with Python
[Introduction to Python] How to get the index of data with a for statement
Quickly create a Python data analysis dashboard with Streamlit and deploy it to AWS
For those who are new to programming but have decided to analyze data with Python
Try to make a command standby tool with python
Let's make a simple game with Python 3 and iPhone
I tried to analyze J League data with Python
I want to make a voice changer using Python and SPTK with reference to a famous site
I want to be able to analyze data with Python (Part 3)
I tried to make various "dummy data" with Python faker
I want to be able to analyze data with Python (Part 1)
Associate Python Enum with a function and make it Callable
Installation procedure for Python and Ansible with a specific version
I want to be able to analyze data with Python (Part 4)
How to make a Python package (written for an intern)
Analyze stocks with python and look for favorable trading phases
I want to be able to analyze data with Python (Part 2)
Try to bring up a subwindow with PyQt5 and Python
Build a Python environment and transfer data to the server
I tried to make GUI tic-tac-toe with Python and Tkinter
Library for specifying a name server and dig with python
Get additional data to LDAP with python (Writer and Reader)
Make a fortune with Python
[Python] A data infrastructure for acquiring and publishing tweets from Twitter API to BigQuery was built on GCP (with negative / positive score).
[5th] I tried to make a certain authenticator-like tool with python
Rubyist tried to make a simple API with Python + bottle + MySQL
[2nd] I tried to make a certain authenticator-like tool with python
Make multiple numerical elevation data into a single picture with Python
Create a striped illusion with gamma correction for Python3 and openCV3
[3rd] I tried to make a certain authenticator-like tool with python
Python environment construction 2016 for those who aim to be data scientists
Make a simple OMR (mark sheet reader) with Python and OpenCV
Get data from MySQL on a VPS with Python 3 and SQLAlchemy
I tried to make a 2channel post notification application with Python
[Introduction] I want to make a Mastodon Bot with Python! 【Beginners】
Make a scraping app with Python + Django + AWS and change jobs
Throw something to Kinesis with python and make sure it's in
I tried to make a todo application using bottle with python
[4th] I tried to make a certain authenticator-like tool with python
[1st] I tried to make a certain authenticator-like tool with python
Move data to LDAP with python Change / Delete (Writer and Reader)
I tried to make a strange quote for Jojo with LSTM
Create a USB boot Ubuntu with a Python environment for data analysis
Beginners want to make something like a Rubik's cube with UE4 and make it a library for reinforcement learning # 4
Introduction of "scikit-mobility", a library that allows you to easily analyze human flow data with Python (Part 1)
I tried to get and analyze the statistical data of the new corona with Python: Data of Johns Hopkins University
[Python] How to create a dictionary type list, add / change / delete elements, and extract with a for statement
Beginners want to make something like a Rubik's cube with UE4 and make it a library for reinforcement learning # 5
Beginners want to make something like a Rubik's cube with UE4 and make it a library for reinforcement learning # 6
Let's make a GUI with python.