250 epochs
Tuesday, 31 December 2019
Slight progress
250 epochs
Monday, 30 December 2019
Failure 3. Tried to improve accuracy by modifying and adding more data to the dataset.
I did use only drastically-up and drastically-down data to build a model this time. I got something like this.
52% accuracy is no better than an average human.
This result indicates either, Machine learning, as far as I tested, supports that the stock market is random walking, or there is something wrong with my code or model.
The latter case is likely. I need to research further.
Second attempt.
Okay, the first one is not working. This time I will do a basic like a simple "up" and "down" analysis but this time with a more significant amount of data, including the following in a period of 2001-01-01 to today :
^N225 nikkei 225
AAPL Apple Inc.
^GSPC S%P 500
TM TOYOTA
GOOGL Alphabet Inc Class A
BA Boeing Company
AMZN Amazon.com Inc.
PYPL PayPal
TWTR Twitter, Inc.
V Visa Inc.
I got this result.
Third attempt.
In that training dataset in the second attempt, price up by even 1 or 2 cents could cause promotion from “down” to “up” and vice versa.
Data with minor price changes might confuse the algorithm. This time only price movement of 1% or more can be considered up or down. I will ignore slight changes.
Now, I got this.
Sunday, 29 December 2019
The second failure, stock price prediction attempt 2.
Saturday, 28 December 2019
Stock price prediction is possible.
- Classified price charts into two types, 1. One that the price went up after the period the chart shows. 2. One that the price went down after the period the chart describes.
- type 1(sample): promising charts
Look at my previous article. Since the next goal was clear, I was trying to label my raw data manually one by one in the morning today, and I realized it could be done automatically with python, and I actually did it.
What I did
- type 2(sample): unpromising charts
- I forced my computer to learn that data with the same method an AI model distinguishes between a dog and a cat.
- In Training it reached 58% accuracy.
- In Testing it has 55% accuracy.
What I will do next.
I will make it 75%+
After achieving it, I will upload the code to GitHub.
After the project, I will organize the whole process and explain the techniques. Stay tuned.
I can also increase the number of classes by two by adding drastically up and drastically down.
Thursday, 26 December 2019
Stock price chart clustering
What I did.
- I got historical financial data from the pandas_datereader. This time it was S&P500
- I made the data candlestick charts and separated them into 80 pieces of PNGs.
- I did clustering those pictures with Keras to see if something was interesting.
Results
- Nothing was interesting, but Keras showed its ability to do cluster analysis.
- Keras made 49 labels.
Labels that contain three or more price charts will be shown below.
label 5 ▽
label 9 ▽
label 15 ▽
label 18 ▽
label 23 ▽
label 27 ▽
label 36 ▽
Possible usage of this clustering in the future
This approach could be helpful if those pictures had labels of future price movement as some form of "answer". And I have the data, which is the equivalent of the "answer" data. The future price can be predicted when the specific pattern, that is pretty common before the price hikes, appears. That is theoretically possible with my hands now, but I want it done automatically.
Next milestone.
After clustering, we call answer pictures to compare and see whether or not the clustered patterns are firm.
reference
複数画像をKerasのVGG16で特徴抽出してk-means++でクラスタリング - test.py http://testpy.hatenablog.com/entry/2017/07/22/195400
Market Prediction with Artificial Intelligence. Demonstration.
We finally managed to actualise what We wanted to make. We developed A model that can predict the stock market and auto...
-
We finally managed to actualise what We wanted to make. We developed A model that can predict the stock market and auto...
-
I plan to develop an algorithm to forecast the stock market from scratch. To achieve that goal, I need to acquire more Mathematical and St...
-
Many people utilise chart patterns for their decision-making process in their investments. The question here is can we automate a ...