Paper on "Application of deep and reinforcement learning to boundary control problems"

Recently, I wrote a paper based on my master thesis project, which I had attempted to submit to AAAI conference. However, the attempt was futile as the reviewers did not really like it. It was quite interesting to see that at least some of the comments by the reviewers are contradictory with each other; it looks like I am not the only one who is lazy to read. Anyway, I decided to make it available for the public via arXiv and viXra. The following are the links to the same. https://arxiv.org/abs/2310.15191 https://vixra.org/abs/2310.0118 Originally, I had only planned on submitting this to arXiv. When I checked the submission portal a couple of hours after the scheduled publishing time, I saw that the article was put "On Hold" from being published. I searched for the reasons for the same, and I read in a few places that sometimes arXiv takes a lot of time to publish them once put on hold, and sometimes they just don't publish them at all. Therefore, I decided to submit it

Extracting Stock Price Data Trend from Google Search to Train LSTM Network

I am not very good with designing my own neural networks. I have attempted to create a few in the past, some worked out fine for proving certain points that I wanted to make, but whenever I tried to make something to participate in a competition, things were not very well. In this post, I do not intent on creating an LSTM based neural network to predict stock prices, rather simply use Google as a tool to extract the stock trends from the graphs.

To get started, search for "Amazon stock price" on google. You would be able to see a pretty nice graph. On right clicking on the graph and clicking on Inspect and reading through Elements in the Developer tools, it can be observed that the graph is rendered using Scalable Vector Graphics or SVG. This is an XML-based vector image format and the data required to create such a graphic would be available in a format that we'll be able to read. I also observed that the required SVG image has a class name uch-psvg and there is only one element with that class name.

Let us start observing the data inside the SVG image. It can be seen that identical data is being stored in the first two path tags inside the SVG. This represents the data trend. To train an LSTM, you don't necessarily need the data with right numbers; you just need the data with the right trend. Let us extract this data into variables named xValues and yValues.

svg = document.getElementsByClassName('uch-psvg')[0];
pathStr = svg.getElementsByTagName('path')[1].outerHTML;
valueStr = pathStr.split('d="M ')[1].split('"')[0];
valueStrSplit = valueStr.split(" L ");
var xValues = [];
var yValues = [];
for(var i = 0; i < valueStrSplit.length; i++){
    xy = valueStrSplit[i].split(" ");
    xValues.push(parseFloat(xy[0]));
    yValues.push(-1 * parseFloat(xy[1]));
}



It can be observed that xValues are just equidistant values and from analyzing a trend perspective, it would not provide a lot of information. Let us ignore that.

The reason for adding a -1 multiplier to yValues is because in browsers, while rendering, the coordinate axes start from the top left corner of your screen and positive Y-direction is downward and hence SVG would have values adjusted accordingly. We are only interested in the right trend and hence to flip it, we simply have to add a negative sign.

You can use this method to create a training data with trends from different stock prices and create a huge training data and train an LSTM network.

Comments

Popular posts from this blog

Bought a new domain - chickfort.com

Started a blog under HexHoot

Created a video to help people get started with HexHoot